/* ════════════════════════════════════════════════════════════════
   Continual Learning Bench · styles.css
   ════════════════════════════════════════════════════════════════ */

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

/* ── Light theme (default) ──────────────────────────────────────── */
:root,
[data-theme="light"] {
  --c-bg:         #fffdf8;
  --c-bg-0:       rgba(255, 253, 248, 0);
  --c-scroll-shadow: rgba(0,0,0,0.10);
  --c-surface:    #f3eee4;
  --c-border:     #ded4c4;
  --c-border-hi:  #bfb19c;
  --c-text:       #1a1917;
  --c-muted:      #5f5a50;
  --c-dim:        #8d8374;
  --c-accent:     #0f766e;
  --c-accent-lo:  rgba(15, 118, 110, 0.1);
  --c-code-bg:    #efeeeb;
  --c-code-text:  #374151;

  /* terminal */
  --c-term-bg:    #1e2228;
  --c-term-bar:   #282d35;
  --c-term-bd:    #3a4150;
  --c-term-text:  #abb2bf;
  --c-term-muted: #5c6370;
  --c-term-hi:    #e5c07b;
  --c-term-green: #98c379;
  --c-term-blue:  #61afef;
}

/* ── Dark theme ─────────────────────────────────────────────────── */
[data-theme="dark"] {
  --c-bg:         #111318;
  --c-bg-0:       rgba(17, 19, 24, 0);
  --c-scroll-shadow: rgba(0,0,0,0.45);
  --c-surface:    #191d26;
  --c-border:     #252d3a;
  --c-border-hi:  #3a475a;
  --c-text:       #dde4ed;
  --c-muted:      #8090a4;
  --c-dim:        #506070;
  --c-accent:     #5b99f7;
  --c-accent-lo:  rgba(91, 153, 247, 0.1);
  --c-code-bg:    #1f2b3e;
  --c-code-text:  #b0c4d8;

  /* terminal stays dark in both modes */
  --c-term-bg:    #151820;
  --c-term-bar:   #1c2030;
  --c-term-bd:    #2a3244;
  --c-term-text:  #abb2bf;
  --c-term-muted: #4a5568;
  --c-term-hi:    #e5c07b;
  --c-term-green: #98c379;
  --c-term-blue:  #61afef;
}

/* ── Base ───────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
  overflow-x: hidden;
}

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

/* ── Reveal animation ───────────────────────────────────────────── */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ════════════════════════════════════════════════════════════════
   LAYOUT HELPERS
   ════════════════════════════════════════════════════════════════ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ════════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  transition: background 0.25s, border-color 0.25s;
}

.nav.scrolled {
  border-bottom-color: var(--c-border);
}

[data-theme="dark"] .nav.scrolled {
  background: rgba(17, 19, 24, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  position: relative;
  z-index: 130;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-text);
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-logo-text {
  display: inline;
}
.logo-bench { color: var(--c-accent); }

.nav-logo-img {
  height: 26px;
  width: auto;
  display: block;
  border-radius: 4px;
  flex-shrink: 0;
}

/* White background on logo shows in dark mode — give it a light pill */
[data-theme="dark"] .nav-logo-img,
[data-theme="dark"] .hero-logo {
  background: #fff;
  border-radius: 6px;
  padding: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--c-muted);
  padding: 0.35rem 0.7rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--c-text); background: var(--c-surface); }

.nav-backdrop {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--c-border);
  background: none;
  color: var(--c-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--c-text);
  background: var(--c-surface);
}

.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--c-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-icon-link:hover {
  color: var(--c-text);
  background: var(--c-surface);
}
.nav-icon-link svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Show/hide sun vs moon */
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover { background: var(--c-surface); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--c-muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--c-accent);
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:active { transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.btn-secondary:hover { color: var(--c-text); border-color: var(--c-text); }

/* ════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════ */
.hero {
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--c-border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 3rem;
  align-items: center;
}

.hero-logo {
  height: 72px;
  width: auto;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.hero-affil {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--c-dim);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  color: var(--c-text);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}
.hero-subtitle a {
  color: var(--c-accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.hero-subtitle a:hover { border-bottom-color: var(--c-accent); }
.hero-blog-link {
  display: block;
  margin-top: 0.55rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ── Terminal ────────────────────────────────────────────────────── */
.terminal {
  background: var(--c-term-bg);
  border: 1px solid var(--c-term-bd);
  border-radius: 8px;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: var(--c-term-bar);
  border-bottom: 1px solid var(--c-term-bd);
}
.terminal-dots { display: flex; gap: 5px; flex-shrink: 0; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  font-size: 0.7rem;
  color: var(--c-term-muted);
  margin: 0 auto;
}

.terminal-body {
  padding: 1.1rem 1.25rem 1.25rem;
  font-size: 0.74rem;
  line-height: 1.9;
  min-height: 210px;
  overflow: hidden;
}

.tl { display: block; opacity: 0; animation: tl-in 0.2s ease forwards; }
@keyframes tl-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: none; }
}

.tl-cmd     { color: var(--c-term-text); }
.tl-info    { color: var(--c-term-muted); }
.tl-success { color: var(--c-term-green); }
.tl-prompt  { color: var(--c-term-hi); }

.tl-ep { display: flex; align-items: center; gap: 0.65rem; }
.tl-ep-label { color: var(--c-term-muted); flex-shrink: 0; min-width: 7.5rem; }
.tl-ep-rate  { color: var(--c-term-text); flex-shrink: 0; min-width: 4.5rem; }
.tl-ep-bar   { height: 3px; border-radius: 2px; }

.tl-cursor {
  display: inline-block;
  width: 6px;
  height: 0.85em;
  background: var(--c-term-text);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ════════════════════════════════════════════════════════════════
   SECTIONS
   ════════════════════════════════════════════════════════════════ */
.section { padding: 5rem 0; }

.section-ruled {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  color: var(--c-text);
}

.section-lead {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 620px;
  margin-bottom: 3rem;
  line-height: 1.75;
}
.section-lead a {
  color: var(--c-accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.section-lead a:hover { border-bottom-color: var(--c-accent); }

/* ════════════════════════════════════════════════════════════════
   ABOUT GRID
   ════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}

.about-card {
  background: var(--c-bg);
  padding: 1.75rem 1.5rem;
  transition: background 0.15s;
}
.about-card:hover { background: var(--c-surface); }

.about-card h3 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--c-text);
}

.about-card p {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════════
   STEPS
   ════════════════════════════════════════════════════════════════ */
.steps { max-width: 640px; }

.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--c-border);
}
.step:last-child { border-bottom: none; }

.step-n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--c-accent);
  padding-top: 0.15rem;
  font-weight: 500;
}

.step h3 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--c-text);
}

.step p {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════════
   TASKS
   ════════════════════════════════════════════════════════════════ */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}

.task {
  padding: 1.75rem;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
  transition: background 0.15s;
}
.task:last-child { border-bottom: none; }
.task:hover { background: var(--c-surface); }

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

.task-tag {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-dim);
  margin-bottom: 0.2rem;
}

.task-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

.task-diff {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.diff-hard   { background: rgba(220, 38, 38, 0.08); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.18); }
.diff-medium { background: var(--c-accent-lo); color: var(--c-accent); border: 1px solid rgba(37, 99, 235, 0.18); }
.diff-custom { background: var(--c-surface); color: var(--c-muted); border: 1px solid var(--c-border); }

[data-theme="dark"] .diff-hard { color: #f87171; border-color: rgba(248, 113, 113, 0.2); background: rgba(248, 113, 113, 0.08); }

.task > p {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.task-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.task-attrs span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.67rem;
  color: var(--c-dim);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════════
   PAGE HEADER (tasks page and other subpages)
   ════════════════════════════════════════════════════════════════ */
.page-header {
  padding: 6rem 0 3rem;
  border-bottom: 1px solid var(--c-border);
}

.page-header-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--c-accent);
  margin-bottom: 0.85rem;
}

.page-header-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: 1rem;
}

.page-header-lead {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 600px;
  line-height: 1.75;
}

/* ════════════════════════════════════════════════════════════════
   TASK CARDS (tasks.html)
   ════════════════════════════════════════════════════════════════ */
.task-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}

.task-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--c-bg);
  padding: 1.75rem;
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
  min-height: 160px;
}
.task-card:hover { background: var(--c-surface); }

/* last card: if odd count, span full width */
.task-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.task-card-body {
  flex: 1;
}

.task-card-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.task-card-desc {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.75;
}

.task-card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.95rem;
  color: var(--c-dim);
  transition: color 0.15s, transform 0.15s;
}
.task-card:hover .task-card-arrow {
  color: var(--c-accent);
  transform: translate(2px, -2px);
}

/* ════════════════════════════════════════════════════════════════
   LEADERBOARD
   ════════════════════════════════════════════════════════════════ */
.lb-wrap {
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 430px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background:
    linear-gradient(var(--c-bg-0), var(--c-bg)) bottom / 100% 36px no-repeat local,
    radial-gradient(farthest-side at 50% 100%, var(--c-scroll-shadow), transparent) bottom / 100% 18px no-repeat scroll,
    var(--c-bg);
}
.lb-table tbody tr:hover { background: var(--c-surface); }
.lb-fade { display: none; }

.lb-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lb-table thead tr {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.lb-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-muted);
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  text-align: left;
  white-space: nowrap;
}

.lb-table th:not(:first-child):not(:nth-child(2)) { text-align: right; }

.lb-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.lb-table tr:last-child td { border-bottom: none; }

.lb-ghost { opacity: 0.35; }

.table-scroll-hint {
  display: none;
  margin-top: 0.45rem;
  color: var(--c-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
}

.lb-bar {
  display: inline-block;
  height: 8px;
  background: var(--c-border);
  border-radius: 3px;
}

.lb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--c-bg);
  opacity: 0.95;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lb-overlay p {
  font-size: 0.9rem;
  color: var(--c-muted);
  max-width: 340px;
  text-align: center;
  line-height: 1.65;
}

/* Rank column */
.lb-rank-medal { font-size: 1.05rem; line-height: 1; display: inline-block; }
.lb-rank-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--c-dim);
  font-weight: 500;
}

/* Colored dot in preview table */
.lb-sys-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
  flex-shrink: 0;
}

/* System name */
.lb-sys-name {
  display: inline;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
  font-family: 'IBM Plex Mono', monospace;
  vertical-align: middle;
}

.lb-sys-pill {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

/* System pill colours */
.lb-pill-icl {
  background: var(--c-accent-lo);
  color: var(--c-accent);
  border: 1px solid rgba(15, 118, 110, 0.2);
}
[data-theme="dark"] .lb-pill-icl {
  border-color: rgba(91, 153, 247, 0.25);
}
.lb-pill-icl-notepad {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.18);
}
[data-theme="dark"] .lb-pill-icl-notepad {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(167, 139, 250, 0.08);
}
.lb-pill-mem0 {
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.18);
}
[data-theme="dark"] .lb-pill-mem0 {
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.22);
  background: rgba(251, 146, 60, 0.08);
}
.lb-pill-ace {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.18);
}
[data-theme="dark"] .lb-pill-ace {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.08);
}

/* Numeric cells */
.lb-num {
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Adaptation score colours */
.lb-score-hi  { color: #16a34a; }
.lb-score-mid { color: var(--c-text); }
.lb-score-neg { color: #dc2626; }
[data-theme="dark"] .lb-score-hi  { color: #4ade80; }
[data-theme="dark"] .lb-score-neg { color: #f87171; }

/* Warning indicator for partial runs */
.lb-warn { color: #ca8a04; font-size: 0.8rem; }
[data-theme="dark"] .lb-warn { color: #fbbf24; }

/* Error row */
.lb-load-error {
  text-align: center;
  padding: 2rem;
  color: var(--c-muted);
  font-size: 0.875rem;
}

/* Footer note below table */
.lb-footer-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--c-dim);
  font-family: 'IBM Plex Mono', monospace;
}
.lb-footer-note a {
  color: var(--c-accent);
  transition: opacity 0.15s;
}
.lb-footer-note a:hover { opacity: 0.75; }

.metric-guide-card {
  margin-top: 1.35rem;
  padding: 1.1rem 1.25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.metric-guide-title {
  margin-bottom: 0.7rem;
  color: var(--c-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metric-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.metric-row:last-of-type { margin-bottom: 0; }

.metric-term {
  min-width: 10.5rem;
  flex-shrink: 0;
  color: var(--c-text);
  font-weight: 500;
}

.metric-def { color: var(--c-muted); }

.metric-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.8rem;
}

.metric-links a {
  color: var(--c-accent);
  transition: opacity 0.15s;
}
.metric-links a:hover { opacity: 0.75; }

.home-baseline-viewer {
  margin-top: 2rem;
}

.lv-section-title {
  margin-bottom: 0.4rem;
  color: var(--c-text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lv-section-hint {
  margin-bottom: 1rem;
  color: var(--c-text);
  font-size: 0.84rem;
  line-height: 1.6;
  opacity: 0.72;
}

.lv-task-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
  color: var(--c-text);
  font-size: 0.85rem;
}
.lv-task-bar label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.lv-task-bar select {
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: 0.82rem;
}

.lv-chart-host {
  position: relative;
  margin-bottom: 0.75rem;
}
.lv-chart-host svg {
  display: block;
  width: 100%;
  height: auto;
}
.lv-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 150px;
  max-width: 240px;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  background: var(--c-text);
  color: var(--c-bg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 0.12s ease;
}
.lv-tooltip.visible { opacity: 1; }
.lv-tooltip.below { transform: translate(-50%, 12px); }
.lv-tooltip strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.lv-axis { stroke: var(--c-border-hi); stroke-width: 1; }
.lv-gridline { stroke: var(--c-border); stroke-width: 1; }
.lv-label {
  fill: var(--c-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.lv-line {
  fill: none;
  stroke-width: 2.2;
}
.lv-chart-box {
  fill: var(--c-accent-lo);
  stroke: none;
}
.lv-point {
  stroke: var(--c-bg);
  stroke-width: 1.5;
  cursor: pointer;
}
.lv-point-hit {
  fill: transparent;
  cursor: pointer;
}
.lv-point-dot { transition: r 0.12s ease, stroke-width 0.12s ease; }
.lv-chart-point:hover .lv-point-dot,
.lv-chart-point:focus .lv-point-dot {
  r: 7;
  stroke-width: 2.5;
}

.lv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.6rem;
  color: var(--c-muted);
  font-size: 0.8rem;
}
.lv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.lv-swatch {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--c-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-name {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 0.2rem;
}

.footer-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--c-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--c-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--c-text); }

.benchmark-canary {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
  color: var(--c-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  line-height: 1.5;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .task-card-grid { grid-template-columns: 1fr; }
  .task-card:last-child:nth-child(odd) { grid-column: unset; }
  .page-header { padding: 5rem 0 2.5rem; }
}

@media (max-width: 700px) {
  body.nav-open { overflow: hidden; }

  .nav-inner {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .nav-logo {
    min-width: 0;
    flex: 1;
  }

  .nav-logo-text {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-right { margin-left: 0; }

  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    width: min(82vw, 310px);
    background: var(--c-bg);
    border-right: 1px solid var(--c-border);
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    align-items: flex-start;
    padding: 4.75rem 1.25rem 1.25rem;
    gap: 0.25rem;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 7px;
    font-size: 0.95rem;
  }
  .nav-toggle { display: flex; }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    border: 0;
    background: rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .hero { padding: 6rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }

  .about-grid { grid-template-columns: 1fr; }

  .lb-table {
    min-width: 560px;
  }

  .table-scroll-hint {
    display: block;
  }

  .metric-row {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .metric-term {
    width: 100%;
    min-width: unset;
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .terminal { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .nav-logo-text { font-size: 0.82rem; }
  .nav-github { display: none; }
}
