/* Anamorph landing page — design tokens + layout.
 *
 * Tokens are the canonical Anamorph palette, mirrored from
 * docs/shared-styles/branding.css in AnamorphLab/anamorph. Keep the two in
 * sync: the CLI docs, the PDF report, and this page are one brand.
 *
 * Monochrome navy over neutral surfaces, system fonts only (no webfonts, so
 * the page renders instantly and offline), hairline borders, no gradients,
 * no drop shadows.
 */

/* ─── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --navy: #2C3849;
  --ink: #1b1b2b;
  --paper: #ffffff;
  --muted: #5c5f72;
  --surface: #f5f5fa;
  --border: #e3e3ee;
  --link: #33567D;

  --ink-dark: #e6e6f0;
  --paper-dark: #16161e;
  --surface-dark: #1f1f2b;
  --border-dark: #2b2b38;
  --link-dark: #9FB4CC;
  /* Secondary text is lighter on dark surfaces so it still clears WCAG AA
     (4.5:1) — #5c5f72 would only reach 2.85:1 on #16161e. */
  --muted-dark: #8b91a5;

  --color-bg: var(--paper);
  --color-fg: var(--ink);
  --color-surface: var(--surface);
  --color-border: var(--border);
  --color-link: var(--link);
  --color-accent: var(--navy);
  --color-muted: var(--muted);
  --sel-bg: var(--navy);
  --sel-fg: #fff;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 8px;
  --radius-sm: 6px;
  --topbar-h: 40px;
  --transition: .15s ease;
}

/* Theme resolution mirrors the docs' segmented Auto/Light/Dark control:
 *   • Auto (no [data-theme]) — follow the reader's OS preference.
 *   • [data-theme="dark"]   — force dark, even under a light OS.
 *   • [data-theme="light"]  — force light; opt out of the media query below.
 * A pre-paint script in index.html sets the attribute from the shared
 * `anamorph-theme` cookie so the choice matches (and, on *.anamorphlab.com,
 * follows the reader to) the docs. */
:root[data-theme="dark"] {
  --color-bg: var(--paper-dark);
  --color-fg: var(--ink-dark);
  --color-surface: var(--surface-dark);
  --color-border: var(--border-dark);
  --color-link: var(--link-dark);
  --color-muted: var(--muted-dark);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: var(--paper-dark);
    --color-fg: var(--ink-dark);
    --color-surface: var(--surface-dark);
    --color-border: var(--border-dark);
    --color-link: var(--link-dark);
    --color-muted: var(--muted-dark);
  }
}
/* The mark is navy line-art on transparency — invert it to read on dark. */
:root[data-theme="dark"] .hero-mark { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-mark { filter: brightness(0) invert(1); }
}

/* ─── Base ────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}
a:hover { text-decoration: underline; }

::selection { background: var(--sel-bg); color: var(--sel-fg); }

/* Keyboard focus affordance — matches the docs (branding.css :focus-visible).
   --color-link is already theme-aware, so one rule covers light and dark. */
:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }

/* Thin, themed scrollbars — the same cross-tool micro-polish the docs apply
   (branding.css). --color-border remaps per theme, so one rule serves both. */
html { scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--topbar-h);
}

/* ─── Topbar ──────────────────────────────────────────────────────────────
   Byte-for-byte the docs' shared .anamorph-topbar (docs/shared-styles/
   branding.css), remapped onto the landing's --token aliases so the bar is the
   same control set on both surfaces. */
.anamorph-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  height: var(--topbar-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid var(--border-dark);
}
.anamorph-topbar a { color: #fff; text-decoration: none; opacity: .85; }
.anamorph-topbar a:hover { opacity: 1; text-decoration: none; }
/* Active nav — the link for the current page. */
.anamorph-topbar a.active {
  opacity: 1;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 255, 255, .55);
}
.anamorph-topbar .anamorph-brand {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 1;
}
/* Recolor the navy mark to white for the navy bar (keeps alpha). */
.anamorph-topbar .anamorph-brand img { filter: brightness(0) invert(1); }

#anamorph-search {
  margin-left: auto;
  min-width: 240px;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: rgba(0, 0, 0, .25);
  color: #b6b6c6;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
#anamorph-search:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
#anamorph-search svg { width: 14px; height: 14px; flex: none; }
#anamorph-search kbd {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
  padding: 2px 5px;
}

/* Icon-only theme control (system · sun · moon) — quiet and borderless, like
   the Ollama docs. Colours inherit from the (always-navy) topbar via
   currentColor, so the control can never go invisible in either page theme
   and follows the bar automatically if its palette ever changes. */
.theme-seg { display: inline-flex; align-items: center; gap: 2px; }
.theme-seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  opacity: .55;
  cursor: pointer;
  transition: opacity var(--transition), background-color var(--transition);
}
.theme-seg button svg { width: 15px; height: 15px; display: block; }
.theme-seg button:hover { opacity: 1; }
.theme-seg button.active { opacity: 1; background: color-mix(in srgb, currentColor 18%, transparent); }

/* ─── ⌘K search modal ──────────────────────────────────────────────────────
   The docs' modal component (branding.css), themed through the landing's
   theme-aware --color-* aliases so it needs no separate dark-class rules. */
#anamorph-search-modal { position: fixed; inset: 0; z-index: 2147483100; }
#anamorph-search-modal[hidden] { display: none; }
.anamorph-search-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 20, .55); }
.anamorph-search-panel {
  position: relative;
  margin: 10vh auto 0;
  width: min(640px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-fg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  overflow: hidden;
  font-family: var(--font-sans);
}
#anamorph-search-input {
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
}
#anamorph-search-results { overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.anamorph-sr-group {
  padding: 10px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
a.anamorph-sr-item {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
a.anamorph-sr-item:hover, a.anamorph-sr-item.active { background: var(--color-surface); text-decoration: none; }
a.anamorph-sr-item .sr-title { font-size: 14px; font-weight: 600; }
a.anamorph-sr-item .sr-excerpt { margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--color-muted); }
.anamorph-sr-item mark { background: rgba(51, 86, 125, .14); color: inherit; font-weight: 600; border-radius: 2px; padding: 0 1px; }
:root[data-theme="dark"] .anamorph-sr-item mark { background: rgba(159, 180, 204, .18); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .anamorph-sr-item mark { background: rgba(159, 180, 204, .18); }
}
.anamorph-sr-more, .anamorph-sr-note { padding: 4px 10px 10px; font-size: 12px; color: var(--color-muted); }

/* ─── Layout ──────────────────────────────────────────────────────────── */
main {
  width: 100%;
  max-width: 900px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 120px;
}

.hero-mark {
  width: 120px;
  height: auto;
  display: block;
}

/* Hero tagline — a lighter display weight than the docs h1 (Ollama-style), so
   the hero reads elegant rather than shouty. */
.hero-line {
  margin: 24px 0 0;
  max-width: 600px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  text-wrap: balance;
}

/* The install block is the one thing a stranger copies, so it carries the
   complete sequence — clone included, not just the build step. */
.install {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-top: 36px;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  text-align: left;
}
.install pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-fg);
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.copy-btn:hover {
  color: var(--color-fg);
  border-color: var(--color-muted);
}

.caption {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-muted);
  text-align: center;
}
.caption a { color: var(--color-muted); text-decoration: underline; }
.caption a:hover { color: var(--color-link); }
.caption code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-fg);
}

/* ─── Terminal demo ───────────────────────────────────────────────────── */
.demo {
  width: 100%;
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-lede {
  margin: 0 0 18px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  text-wrap: pretty;
}

/* The demo panel mirrors ollama.com's terminal card: a theme-following card
   (white in light mode, dark surface in dark mode) with the macOS traffic-light
   buttons floating at the top-left inside the card — no title strip, no label. */
.terminal {
  width: 100%;
  max-width: 620px;
  background: var(--color-bg);
  color: var(--color-fg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.terminal-bar {
  display: flex;
  align-items: center;
  padding: 14px 16px 0;
}
/* macOS-style traffic-light buttons, top-left. */
.terminal-dots { display: inline-flex; gap: 6px; }
.terminal-dots i { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dots i:nth-child(1) { background: #ff5f57; }
.terminal-dots i:nth-child(2) { background: #febc2e; }
.terminal-dots i:nth-child(3) { background: #28c840; }
.terminal-body {
  margin: 0;
  padding: 12px 18px 18px;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ─── Personas (choose-your-track cards) ──────────────────────────────── */
/* The same card component as the docs hub (mdbook-theme.css a.card), so the
   "pick your path" block reads identically on both surfaces. */
.personas {
  width: 100%;
  margin-top: 96px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
a.card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-fg);
  transition: border-color var(--transition), background var(--transition);
}
a.card:hover {
  background: var(--color-surface);
  border-color: var(--color-muted);
  text-decoration: none;
}
a.card .card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}
a.card .card-title::after { content: "→"; color: var(--color-muted); font-weight: 400; }
a.card .card-desc { font-size: 13.5px; color: var(--color-muted); line-height: 1.5; }
a.card .card-desc code { font-family: var(--font-mono); font-size: 12.5px; }
/* Icon-led cards (Ollama-style) — a muted line glyph above the title. */
.card-icon { display: block; width: 22px; height: 22px; margin-bottom: 10px; color: var(--color-muted); }
.card-icon svg { width: 100%; height: 100%; display: block; }

/* ─── Content sections (Ollama-style informative blocks) ──────────────────
   Each section teaches one thing; generous vertical rhythm, centered by
   default, with a two-column .feature variant. */
.section {
  width: 100%;
  margin-top: 160px;   /* Ollama-scale breathing room between sections */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* The demo sits right under the hero — slightly tighter than full sections.
   (section.demo outranks the later .section rule by specificity.) */
section.demo { margin-top: 140px; }
.section-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.section-title {
  margin: 0;
  max-width: 640px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.section-lede {
  margin: 16px 0 0;
  max-width: 620px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--color-fg);
  text-wrap: pretty;
}
.section-lede code { font-family: var(--font-mono); font-size: 14px; }

/* Pill buttons — navy primary, hairline ghost. */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-ghost { border-color: var(--color-border); color: var(--color-fg); }
.btn-ghost:hover { border-color: var(--color-muted); background: var(--color-surface); }

/* "Why you need it" — 2×2 problem grid. */
.pain-grid {
  margin-top: 32px;
  width: 100%;
  max-width: 760px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 36px;
  text-align: left;
}
.pain { font-size: 14.5px; line-height: 1.6; color: var(--color-muted); }
.pain strong { color: var(--color-fg); font-weight: 600; }

/* "How it works" — the Sim2Real loop as monospace step chips. */
.pipeline {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pipe-step {
  padding: 7px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-fg);
}
.pipe-step.accent { border-color: var(--color-link); color: var(--color-link); }
.pipe-arrow { color: var(--color-muted); }

/* Checklists — a drawn ✓ per row. */
.checklist { margin: 20px 0 0; padding: 0; list-style: none; text-align: left; max-width: 580px; }
.checklist li {
  position: relative;
  padding: 9px 0 9px 30px;
  font-size: 15px;
  line-height: 1.5;
  border-top: 1px solid var(--color-border);
}
.checklist li:first-child { border-top: none; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 13px;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--color-link);
  border-bottom: 2px solid var(--color-link);
  transform: rotate(-45deg);
}
.checklist code { font-family: var(--font-mono); font-size: 13px; }

/* Two-column feature block (text | visual), stacks on mobile. */
.feature {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 48px;
  max-width: 840px;
}
.feature .section-eyebrow,
.feature .section-title,
.feature .section-lede { text-align: left; max-width: none; }
.feature-text { flex: 1 1 0; }
.feature-visual { flex: 1 1 0; margin-top: 0; max-width: none; }

/* Ollama-style tag colours (theme-aware), sampled from ollama.com/library. */
:root { --tag-bg: #ddf4ff; --tag-fg: #2563eb; }
:root[data-theme="dark"] { --tag-bg: rgba(37, 99, 235, .16); --tag-fg: #7ab0ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tag-bg: rgba(37, 99, 235, .16); --tag-fg: #7ab0ff; }
}

/* ─── Catalog pages (Models / Datasets directories) ──────────────────────── */
main.catalog { align-items: stretch; text-align: left; padding-top: 88px; padding-bottom: 40px; }
.catalog-title { margin: 6px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.catalog-intro { margin: 12px 0 0; max-width: 680px; font-size: 15px; line-height: 1.6; color: var(--color-muted); }

/* Toolbar: large flat search + facet count + grid/list toggle. */
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
#catalog-search {
  flex: 1;
  min-width: 220px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
#catalog-search::placeholder { color: var(--color-muted); }
/* Flat focus: no heavy ring, but a high-contrast border so keyboard users see it. */
#catalog-search:focus { outline: none; border-color: var(--color-fg); }
.catalog-count { font-size: 13px; color: var(--color-muted); white-space: nowrap; }

/* Sort — a flat select matching the search input (Ollama's "Popular ▾"). */
#catalog-sort {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
#catalog-sort:hover { color: var(--color-fg); }
#catalog-sort:focus { outline: none; border-color: var(--color-fg); }

.view-toggle { display: inline-flex; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.view-toggle button + button { border-left: 1px solid var(--color-border); }
.view-toggle button svg { width: 15px; height: 15px; }
.view-toggle button:hover { color: var(--color-fg); }
.view-toggle button.active { background: var(--color-surface); color: var(--color-fg); }

/* Facet filter chips — flat; active picks up the Ollama blue (no navy fill). */
.catalog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.catalog-tag {
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.catalog-tag:hover { color: var(--color-fg); }
.catalog-tag.active { background: var(--tag-bg); color: var(--tag-fg); }

/* Grid vs list: identical card markup, the container class switches layout. */
.catalog-grid { margin-top: 24px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.catalog-grid.list-view { display: block; }

/* Minimal card — flat, hairline border, no shadow. */
.catalog-card {
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.catalog-card:hover { border-color: var(--color-muted); }
/* List view: full-width Ollama rows — hairline dividers, no box. */
.catalog-grid.list-view .catalog-card {
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  padding: 24px 0;
}
.catalog-grid.list-view .catalog-card:last-child { border-bottom: none; }
.catalog-grid.list-view .catalog-card:hover { border-color: var(--color-border); }
/* Ollama-library typography in rows: a larger name, roomier description. */
.catalog-grid.list-view .card-title { margin-bottom: 4px; }
.catalog-grid.list-view .card-title a { font-size: 17px; }
.catalog-grid.list-view .catalog-card .card-desc { max-width: 760px; }

.catalog-card .card-title { display: block; margin-bottom: 6px; }
.catalog-card .card-title::after { content: none; }
.catalog-card .card-title a { color: var(--color-fg); font-weight: 650; }
.catalog-card .card-title a:hover { color: var(--color-link); text-decoration: none; }
.card-source { font-size: 12.5px; color: var(--color-muted); margin-bottom: 8px; }
.catalog-card .card-desc { font-size: 14px; line-height: 1.6; color: var(--color-muted); margin-top: 2px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.card-tags .chip {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-fg);
  font-size: 13px;
  font-weight: 500;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-muted);
}
.card-meta .card-paper { color: var(--color-link); }
.catalog-empty {
  margin-top: 24px;
  padding: 56px 0;
  text-align: center;
  font-size: 15px;
  color: var(--color-muted);
}

/* ─── 404 ─────────────────────────────────────────────────────────────────── */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 140px;
  padding-bottom: 100px;
}
.notfound-code {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .3em;
  color: var(--color-muted);
}

/* ─── Footer ────────────────────────────────────────────────────────────
   The docs' shared .anamorph-footer (branding.css) — full-width band, centered
   single line, theme-aware via --color-*. Identical on both surfaces. */
.anamorph-footer {
  box-sizing: border-box;
  width: 100%;
  margin-top: 96px;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-muted);
}
.anamorph-footer a { color: var(--color-muted); text-decoration: none; transition: color var(--transition); }
.anamorph-footer a:hover { color: var(--color-link); }
.anamorph-footer-sep { opacity: .55; }

/* ─── Topbar on small screens (matches the docs' 720px collapse) ────────── */
@media (max-width: 720px) {
  .anamorph-topbar { gap: 10px; }
  .anamorph-topbar a:not(.anamorph-brand) { display: none; }
  #anamorph-search { min-width: 0; padding: 0 8px; }
  #anamorph-search span, #anamorph-search kbd { display: none; }
  /* Larger touch targets on mobile (icons unchanged — hit area only). */
  .theme-seg { gap: 6px; }
  .theme-seg button { width: 40px; height: 36px; }
  .view-toggle button { width: 44px; height: 40px; }
}

/* ─── Small screens ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .hero { padding-top: 72px; }
  .hero-line { font-size: 24px; }
  .section, section.demo { margin-top: 96px; }
  .section-title { font-size: 21px; }
  .anamorph-footer { margin-top: 64px; }
  /* Stack the two-column blocks. */
  .feature { flex-direction: column; text-align: center; gap: 24px; }
  .feature .section-eyebrow,
  .feature .section-title,
  .feature .section-lede { text-align: center; }
  .checklist { margin-left: auto; margin-right: auto; }
  .pain-grid { grid-template-columns: 1fr; gap: 16px; }
  /* Long clone URLs wrap rather than pushing the page sideways. */
  .install pre { font-size: 12px; }
  .terminal { font-size: 12px; }
}
