/* ─────────────────────────────────────────────────────────────────────────
   cap-evolve site — dark-first, on-brand with the product dashboard.
   Palette + Fira fonts match the dashboard (blue #3b82f6 primary, amber #f59e0b
   "champion" accent). Light theme via html[data-theme="light"]; a tiny inline
   head script sets the attribute before paint (no FOUC) and adds html.js so the
   scroll-reveal animation only hides content when JS is present.
   Bump the ?v=... string on the <link> in each HTML file when this changes.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* dark (default) */
  --bg: #07090d;
  --bg-soft: #0d1117;      /* surface / cards */
  --bg-2: #141b24;         /* surface-2 / raised */
  --bg-code: #0c1320;      /* inline code bg */
  --border: #1e2733;
  --border-soft: #161d26;
  --ink: #e6edf3;          /* headings / strong fg */
  --body: #c2ccd8;         /* body text */
  --muted: #8b98a9;
  --sub: #6b7888;
  --accent: #3b82f6;       /* primary blue */
  --accent-deep: #1e40af;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-ink: #93c5fd;   /* links */
  --amber: #f59e0b;        /* champion / best */
  --amber-ink: #fbbf24;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --success: #22c55e;
  --success-ink: #4ade80;
  --success-soft: rgba(34, 197, 94, 0.13);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --seed: #64748b;
  /* code blocks stay dark in both themes (matches dashboard) */
  --code-bg: #0b1017;
  --code-fg: #e6edf3;
  --code-border: #1c2530;
  /* effects */
  --shadow: 0 18px 48px -24px rgba(0, 0, 0, 0.9);
  --glow-a: rgba(59, 130, 246, 0.30);
  --glow-b: rgba(245, 158, 11, 0.14);
  --radius: 14px;
  --maxw: 1120px;
  --maxw-narrow: 760px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --bg-2: #eef1f6;
  --bg-code: #f1f3f7;
  --border: #e4e7ec;
  --border-soft: #eef0f3;
  --ink: #0f1620;
  --body: #333a45;
  --muted: #5b6472;
  --sub: #8a929e;
  --accent: #2563eb;
  --accent-deep: #1e40af;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-ink: #1d4ed8;
  --amber: #f59e0b;
  --amber-ink: #b45309;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --success: #16a34a;
  --success-ink: #15803d;
  --success-soft: rgba(22, 163, 74, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.10);
  --seed: #64748b;
  --shadow: 0 16px 40px -24px rgba(20, 20, 40, 0.28);
  --glow-a: rgba(37, 99, 235, 0.16);
  --glow-b: rgba(245, 158, 11, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Fira Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-ink); }

/* subtle page-wide top glow behind the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 100% at 50% -10%, var(--glow-a), transparent 70%),
    radial-gradient(40% 80% at 85% 0%, var(--glow-b), transparent 70%);
  opacity: 0.9;
}
:root[data-theme="light"] body::before { opacity: 0.7; }

/* keep content above the glow layer */
.nav, main, .footer { position: relative; z-index: 1; }

/* ─────────────────────── top navigation ─────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-brand-logo {
  width: 30px; height: 30px; border-radius: 50%;
  display: block; border: 1px solid var(--border);
}
/* flat "cap·evolve" wordmark — amber middle dot, matches the dashboard BrandLogo */
.wordmark { font-weight: 650; }
.wordmark-dot { color: var(--amber); font-weight: 800; padding: 0 0.06em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.9rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.14s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent-ink); font-weight: 600; }
.nav-links .gh {
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.nav-links .gh:hover { border-color: var(--accent); color: #fff; background: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* hamburger — hidden at desktop, revealed under 860px by the responsive block below */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.nav-toggle:hover { color: var(--ink); border-color: var(--accent); }
.nav-toggle svg { width: 18px; height: 18px; display: block; }

/* keyboard focus has to stay visible on every nav control */
.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─────────────────────── page containers ─────────────────────── */

.page { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
.page-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }

/* two-column doc layout with sticky TOC on long pages */
.with-toc { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 960px) {
  .with-toc { grid-template-columns: minmax(0, 1fr) 210px; align-items: start; }
  .with-toc .toc { order: 2; }
  .with-toc .doc-main { order: 1; min-width: 0; }
}
.toc {
  position: sticky; top: 5rem;
  font-size: 0.85rem;
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}
.toc-title {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.7rem; color: var(--sub); margin: 0 0 0.6rem;
}
.toc a {
  display: block; color: var(--muted); text-decoration: none;
  padding: 0.22rem 0; border: none; line-height: 1.35;
  transition: color 0.14s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 959px) { .toc { display: none; } }

/* ─────────────────────── hero ─────────────────────── */

.hero { text-align: center; padding: 2.5rem 0 1rem; }
.hero-logo {
  width: 128px; height: 128px; margin: 0 auto 1.5rem; display: block;
  border-radius: 50%;                 /* clip the mascot PNG's square canvas to a clean circle */
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  padding: 0.32rem 0.8rem; border-radius: 999px;
  margin: 0 0 1.4rem;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  margin: 0 0 0.9rem; color: var(--ink);
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent-ink), var(--amber-ink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline { font-size: 1.3rem; color: var(--muted); margin: 0 0 1.4rem; font-weight: 500; }
.hero .description {
  font-size: 1.12rem; max-width: 660px; margin: 0 auto 2rem;
  color: var(--body); line-height: 1.6;
}
.hero .description strong { color: var(--ink); }

.btn-row { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin: 0 0 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 650; font-size: 0.98rem; text-decoration: none;
  padding: 0.72rem 1.35rem; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(59, 130, 246, 0.55);
}
.btn-primary:hover { background: #4f8ef7; box-shadow: 0 14px 36px -8px rgba(59, 130, 246, 0.7); }
.btn-ghost { background: var(--bg-soft); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

.pill-row { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 2rem; }
.pill, .badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 500;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
}
.pill svg { width: 13px; height: 13px; color: var(--success-ink); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge-success { background: var(--success-soft); color: var(--success-ink); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.badge-amber { background: var(--amber-soft); color: var(--amber-ink); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }

/* affiliation strips */
.hero-affil {
  display: flex; justify-content: center; align-items: center; gap: 1rem;
  margin: 1.5rem 0 0; color: var(--sub); font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.hero-affil-logos { display: inline-flex; align-items: center; gap: 1.2rem; }
.hero-affil-logos img { display: block; }
.hero-affil-logos .logo-ibm, .hero-affil-logos .logo-redhat { height: 24px; width: auto; }
/* IBM/Red Hat marks: keep full colour in both light and dark themes */

/* ─────────────────────── quickstart CTA panel ─────────────────────── */

.cta {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; margin: 0 auto 3rem; max-width: 760px;
  box-shadow: var(--shadow);
}
.cta h3 { margin: 0 0 0.7rem; font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.cta h3 .badge-success { margin-left: 0.4rem; }

/* code blocks (shared) */
pre, .cta pre {
  margin: 0; padding: 1rem 1.15rem;
  background: var(--code-bg); color: var(--code-fg);
  border: 1px solid var(--code-border); border-radius: 10px;
  font-family: "Fira Code", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86rem; line-height: 1.6; overflow-x: auto;
  position: relative;
}
.cta pre + pre { margin-top: 0.4rem; }
pre code { color: inherit; font-family: inherit; background: none; padding: 0; }
.cta-note { margin: 1rem 0 0; font-size: 0.86rem; color: var(--muted); }
.cta-note a { color: var(--accent-ink); }

/* copy button injected by site.js */
.copy-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font: inherit; font-size: 0.72rem;
  background: var(--bg-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.2rem 0.5rem; cursor: pointer; opacity: 0; transition: opacity 0.14s ease, color 0.14s ease;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--ink); }
.copy-btn.done { color: var(--success-ink); }

/* ─────────────────────── screenshots / gallery ─────────────────────── */

.hero-screenshot, .shot {
  margin: 0 auto 1rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.hero-screenshot { max-width: 1000px; margin-bottom: 3rem; }
.hero-screenshot img, .shot img { display: block; width: 100%; height: auto; }
.hero-screenshot .caption, .shot-cap {
  padding: 0.7rem 1rem; font-size: 0.83rem; color: var(--muted);
  border-top: 1px solid var(--border); text-align: center; background: var(--bg-soft);
}
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 2rem; background: rgba(0, 0, 0, 0.85); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); background: #fff; cursor: zoom-in;
}
.lightbox.full { display: block; overflow: auto; }
.lightbox.full img { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox-close {
  position: fixed; z-index: 1001; top: 0.75rem; right: 1rem; width: 2.5rem; height: 2.5rem; border: 0;
  border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.6rem;
  line-height: 1; cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible { background: rgba(255, 255, 255, 0.3); }
body.lightbox-open { overflow: hidden; }
@media (max-width: 640px) { .lightbox { padding: 0.75rem; } }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }

/* ─────────────────────── sections ─────────────────────── */

.section { padding: 3rem 0 1rem; border-top: 1px solid var(--border-soft); }
.section:first-child { border-top: none; }
.section > h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 750; letter-spacing: -0.02em;
  margin: 0 0 0.6rem; color: var(--ink);
}
.section > .section-intro { color: var(--muted); font-size: 1.04rem; margin: 0 0 1.8rem; max-width: 720px; }
.section[id], .doc h2[id], .doc h3[id] { scroll-margin-top: 5.5rem; }

/* ─────────────────────── how-it-works flow ─────────────────────── */

.flow { display: flex; align-items: stretch; gap: 0.6rem; flex-wrap: wrap; margin: 1.5rem 0; }
.flow-step {
  flex: 1 1 150px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.1rem; position: relative;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.flow-step:hover { border-color: var(--accent); transform: translateY(-2px); }
.flow-step .fs-k {
  font-family: "Fira Code", monospace; font-size: 0.72rem; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 5px; padding: 0.05rem 0.4rem;
}
.flow-step h4 { margin: 0.6rem 0 0.3rem; font-size: 0.98rem; color: var(--ink); font-weight: 650; }
.flow-step p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.flow-step.is-gate { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); }
.flow-arrow { align-self: center; color: var(--sub); font-size: 1.2rem; }
@media (max-width: 720px) { .flow-arrow { transform: rotate(90deg); } }

/* ─────────────────────── stat strip / before→after ─────────────────────── */

.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem;
  margin: 1.5rem 0;
}
.stat {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.2rem 1.3rem; text-align: center;
}
.stat-num {
  font-family: "Fira Code", monospace; font-size: 2rem; font-weight: 600;
  color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.stat-num.amber { color: var(--amber-ink); }
.stat-num.success { color: var(--success-ink); }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

.beforeafter {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; margin: 1.5rem 0; text-align: center;
}
.beforeafter .ba-num { font-family: "Fira Code", monospace; font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.beforeafter .ba-num.base { color: var(--muted); }
.beforeafter .ba-num.best { color: var(--amber-ink); }
.beforeafter .ba-arrow { color: var(--accent-ink); font-size: 1.6rem; }
.beforeafter .ba-label { font-size: 0.8rem; color: var(--sub); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.3rem; }
@media (max-width: 620px) { .beforeafter { grid-template-columns: 1fr; } .beforeafter .ba-arrow { transform: rotate(90deg); } }

/* ─────────────────────── tables ─────────────────────── */

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 0 0 1.5rem; }
table th, table td {
  padding: 0.72rem 0.9rem; text-align: left;
  border-bottom: 1px solid var(--border-soft); vertical-align: top;
}
table th {
  background: var(--bg-soft); font-weight: 600; color: var(--ink);
  font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase;
}
table tbody tr:hover { background: var(--bg-soft); }
table code {
  background: var(--bg-code); color: var(--ink);
  padding: 0.12rem 0.4rem; border-radius: 5px; font-size: 0.86em;
  font-family: "Fira Code", monospace;
}
.table-hero {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.3rem 1rem; overflow: hidden;
}
.table-hero th, .table-hero td { border-bottom: 1px solid var(--border); }
.table-hero tbody tr:last-child td { border-bottom: none; }
.gain { color: var(--success-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.num { font-family: "Fira Code", monospace; font-variant-numeric: tabular-nums; }

/* ─────────────────────── generic cards / tiles ─────────────────────── */

.card-grid, .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.2rem 0 0; }
.diff-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.2rem 0 0; }

.card, .tile, .diff-tile {
  display: block; padding: 1.15rem 1.25rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft);
  color: var(--body); text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover, .tile:hover, .diff-tile:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7);
}
.diff-tile { display: flex; flex-direction: column; position: relative; }
.diff-tile-num {
  font-family: "Fira Code", monospace; font-size: 0.72rem; font-weight: 600;
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 5px; padding: 0.08rem 0.42rem; align-self: flex-start; margin: 0 0 0.6rem;
}
.card-title, .tile-title, .diff-tile-title {
  font-weight: 650; color: var(--ink); font-size: 1rem; margin: 0 0 0.35rem;
  display: flex; align-items: center; gap: 0.4rem; line-height: 1.3;
}
.card-desc, .tile-desc, .diff-tile-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin: 0; }
.diff-tile-desc { flex: 1; margin-bottom: 0.7rem; }
.diff-tile-link { color: var(--accent-ink); font-size: 0.83rem; font-weight: 500; margin-top: auto; }
.diff-tile:hover .diff-tile-link { color: var(--accent); }
.tile-badge {
  font-size: 0.68rem; font-weight: 500; padding: 0.1rem 0.45rem; border-radius: 999px;
  background: var(--bg-2); color: var(--sub); margin-left: auto; letter-spacing: 0.02em;
}
.tile-badge.on-site { background: var(--accent-soft); color: var(--accent-ink); }
.tile-badge.on-github { background: var(--bg-2); color: var(--muted); }

/* ─────────────────────── numbered steps (e2e page) ─────────────────────── */

.steps { counter-reset: step; margin: 1.5rem 0; }
.step {
  position: relative; padding: 0 0 1.6rem 3.2rem; border-left: 2px solid var(--border);
  margin-left: 1rem;
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -1.05rem; top: -0.15rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--accent);
  color: var(--accent-ink); font-family: "Fira Code", monospace; font-weight: 600; font-size: 0.9rem;
}
.step h3 { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--ink); }
.step > p:first-of-type { margin-top: 0; }

/* ─────────────────────── content-page typography ─────────────────────── */

.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 0.6rem; color: var(--ink); }
.doc .lead { font-size: 1.18rem; color: var(--muted); margin: 0 0 2rem; line-height: 1.55; }
.doc h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin: 2.8rem 0 0.9rem; color: var(--ink); }
.doc h3 { font-size: 1.16rem; font-weight: 650; margin: 2rem 0 0.6rem; color: var(--ink); }
.doc p { margin: 0 0 1rem; }
.doc ul, .doc ol { margin: 0 0 1rem 1.3rem; padding: 0; }
.doc li { margin: 0.3rem 0; }
.doc a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.doc a:hover { border-bottom-color: var(--accent); }
.doc code {
  font-family: "Fira Code", "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--bg-code); padding: 0.12rem 0.4rem; border-radius: 5px;
  font-size: 0.88em; color: var(--ink);
}
.doc pre { margin: 0 0 1.3rem; }
.doc blockquote {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  color: var(--body); padding: 0.9rem 1.2rem; margin: 0 0 1.3rem; border-radius: 0 8px 8px 0;
}
.doc blockquote p:last-child { margin-bottom: 0; }

/* ─────────────────────── callouts ─────────────────────── */

.callout {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--seed);
  border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin: 0 0 1.5rem; font-size: 0.94rem;
}
.callout-title { font-weight: 650; color: var(--ink); margin: 0 0 0.4rem; }
.callout-accent { border-left-color: var(--accent); background: var(--accent-soft); }
.callout-amber { border-left-color: var(--amber); background: var(--amber-soft); }
.callout-warn { border-left-color: var(--amber); background: var(--amber-soft); }

.muted { color: var(--muted); font-weight: 400; }

/* external links out to GitHub from rendered skillsbench-history docs */
.doc a.ext-link::after { content: " ↗"; }

/* signed deltas in generated heatmap tables */
.delta-pos { color: var(--success-ink); font-weight: 650; }
.delta-neg { color: var(--danger); font-weight: 650; }
.delta-zero { color: var(--muted); }

/* ─────────────────────── footer ─────────────────────── */

.footer { border-top: 1px solid var(--border); padding: 2.5rem 1.5rem; color: var(--muted); font-size: 0.86rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent-ink); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-affil { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--sub); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-affil-logos { display: inline-flex; align-items: center; gap: 0.7rem; }
.footer-affil-logos img { display: block; }
.footer-affil-logos .logo-ibm, .footer-affil-logos .logo-redhat { height: 15px; width: auto; }

/* ─────────────────────── scroll-reveal (JS-gated) ─────────────────────── */

html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal-2 { transition-delay: 0.08s; }
html.js .reveal-3 { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .tile:hover, .diff-tile:hover, .flow-step:hover { transform: none; }
  .flow-anim-dash { animation: none !important; }
}

/* ─────────────────────── architecture pipeline SVG (tokenized for theme) ─────────────────────── */

.arch-diagram {
  margin: 1.5rem 0 2rem; padding: 1.4rem 0.6rem 0.7rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.arch-diagram svg { display: block; width: 100%; height: auto; max-width: 760px; margin: 0 auto; }
.arch-diagram .phase-box { fill: var(--bg-2); stroke: var(--border); stroke-width: 1; }
.arch-diagram .phase-box-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.arch-diagram .phase-label { fill: var(--ink); font-size: 12px; font-family: inherit; font-weight: 600; text-anchor: middle; }
.arch-diagram .phase-sub { fill: var(--muted); font-size: 10px; font-family: inherit; text-anchor: middle; }
.arch-diagram .arrow { stroke: var(--sub); stroke-width: 1.5; fill: none; }
.arch-diagram .arrow-accent { stroke: var(--accent-ink); stroke-width: 1.5; fill: none; }
.arch-diagram .loop-box { fill: transparent; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; }
.arch-diagram .loop-label { fill: var(--accent-ink); font-size: 11px; font-family: inherit; font-weight: 600; }
.arch-diagram .loop-step { fill: var(--ink); font-size: 11px; font-family: inherit; }
.arch-diagram .caption { fill: var(--muted); font-size: 10px; font-family: inherit; text-anchor: middle; }
/* animated flow dashes (respect reduced-motion via rule above) */
.arch-diagram .flow-anim-dash { stroke-dasharray: 5 4; animation: dashmove 1.1s linear infinite; }
@keyframes dashmove { to { stroke-dashoffset: -18; } }

/* ─────────────────────── dumbbell chart SVG (results, tokenized) ─────────────────────── */

.chart-figure { margin: 2rem 0 1rem; }
.chart-figure svg { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; }
.chart-caption { color: var(--muted); font-size: 0.85rem; text-align: center; margin: 0.6rem auto 0; max-width: 620px; line-height: 1.5; }
.chart-figure .grid-line { stroke: var(--border-soft); stroke-width: 1; }
.chart-figure .axis-tick { stroke: var(--border); stroke-width: 1; }
.chart-figure .axis-label { fill: var(--sub); font-size: 11px; font-family: inherit; }
.chart-figure .row-label { fill: var(--ink); font-size: 12px; font-family: inherit; font-weight: 500; }
.chart-figure .row-sub { fill: var(--sub); font-size: 10px; font-family: inherit; }
.chart-figure .connector { stroke: var(--seed); stroke-width: 2; }
.chart-figure .dot-base { fill: var(--bg); stroke: var(--muted); stroke-width: 2; }
.chart-figure .dot-opt { fill: var(--success); stroke: var(--success); stroke-width: 2; }
.chart-figure .val-label { fill: var(--body); font-size: 11px; font-family: "Fira Code", monospace; font-variant-numeric: tabular-nums; }
.chart-figure .val-label-opt { fill: var(--success-ink); font-size: 11px; font-family: "Fira Code", monospace; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-figure .gain-label { fill: var(--success-ink); font-size: 11px; font-family: "Fira Code", monospace; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-figure .legend-text { fill: var(--muted); font-size: 11px; font-family: inherit; }

/* ─────────────────────── benchmark-runs history page ─────────────────────── */

.running-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.running-list li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.running-list .elapsed { color: var(--muted); font-variant-numeric: tabular-nums; }

.filters { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.filters label { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--muted); gap: 0.25rem; }
.filters label[hidden] { display: none; }   /* custom From/To hidden unless Time = Custom (beats display:flex above) */
.filters select, .filters input {
  font: inherit; font-size: 0.88rem; padding: 0.4rem 0.6rem;
  background: var(--bg-soft); color: var(--ink);
  border: 1px solid var(--border); border-radius: 8px;
}
#runs thead th { cursor: pointer; user-select: none; }
.run-row { cursor: pointer; }
.run-row:hover { background: var(--bg-soft); }
.detail-row > td { background: var(--bg-soft); padding: 0.5rem 1rem; }
table.detail { width: 100%; font-size: 0.85rem; }
.badge.success { background: var(--success-soft); color: var(--success-ink); border-color: color-mix(in srgb, var(--success) 30%, transparent); font-weight: 600; }
.badge.failure { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); font-weight: 600; }
.badge.cancelled { background: var(--bg-2); color: var(--muted); font-weight: 600; }

/* ─────────────────────── responsive ─────────────────────── */

@media (max-width: 860px) {
  .nav-inner { flex-wrap: wrap; gap: 0.75rem 1rem; padding: 0.7rem 1rem; }
  /* stacked menu instead of the old horizontal scroll strip, which had no affordance */
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-left: 0;
    gap: 0.9rem;
    padding: 0.6rem 0 0.3rem;
    border-top: 1px solid var(--border);
  }
  /* gated on html.js: with JS off the links stay visible and the toggle never appears,
     so there is no dead control. With JS on the list becomes a disclosure. */
  html.js .nav-toggle { display: inline-flex; }
  html.js .nav-links { display: none; }
  html.js .nav-links.open { display: flex; }
}
@media (max-width: 640px) {
  .page, .page-narrow { padding: 2.2rem 1.1rem 3.5rem; }
  .hero { padding: 1.5rem 0 0.5rem; }
  .hero-logo { width: 100px; height: 100px; }
  .hero .tagline { font-size: 1.08rem; }
  .hero .description { font-size: 1rem; }
  .btn { width: 100%; justify-content: center; }
  .hero-affil { flex-direction: column; gap: 0.5rem; }
  table { font-size: 0.84rem; }
  table th, table td { padding: 0.55rem 0.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .step { padding-left: 2.6rem; }
}
