/* awesome-agents — visual system replicated from skills.sh */

:root {
  --radius: .5rem;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-art: "Fira Mono", "Geist Mono", ui-monospace, monospace;
  --font-hero: "Bricolage Grotesque", "Geist", ui-sans-serif, system-ui, sans-serif;
}

/* dark is the default theme (matches skills.sh html.dark) */
:root, :root.dark, :root[data-theme="dark"] {
  --bg: #000000;
  --fg: #ededed;
  --muted-fg: #9b9b9b;
  --dim: #7e7e7e;
  --faint: #5c5c5c;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --card: #0a0a0a;
  --card-hover: #111111;
  --spark: #4d4d4d;
}

:root.light, :root[data-theme="light"] {
  --bg: #ffffff;
  --fg: #101010;
  --muted-fg: #6b6b6b;
  --dim: #8a8a8a;
  --faint: #a8a8a8;
  --border: #e6e6e6;
  --border-strong: #d7d7d7;
  --card: #fafafa;
  --card-hover: #f2f2f2;
  --spark: #c4c4c4;
}

@media (prefers-color-scheme: light) {
  :root:not(.dark):not([data-theme]) {
    --bg: #ffffff;
    --fg: #101010;
    --muted-fg: #6b6b6b;
    --dim: #8a8a8a;
    --faint: #a8a8a8;
    --border: #e6e6e6;
    --border-strong: #d7d7d7;
    --card: #fafafa;
    --card-hover: #f2f2f2;
    --spark: #c4c4c4;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap { max-width: 1088px; margin: 0 auto; padding: 0 16px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--fg); color: var(--bg);
  padding: 8px 14px; border-radius: var(--radius); z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
}
.nav-inner {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  max-width: 1440px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); }
.brand-mark { display: inline-flex; }
.brand-mark svg { width: 17px; height: 17px; display: block; }
.brand-sep { color: var(--faint); font-size: 18px; }
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted-fg); font-size: 14px; transition: color .12s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links a.nav-icon { display: inline-flex; align-items: center; }
.nav-links a.nav-icon svg { width: 17px; height: 17px; display: block; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; margin-left: -4px;
  background: none; border: none; color: var(--muted-fg); cursor: pointer;
  border-radius: 6px; transition: color .12s, background .12s;
}
.theme-toggle:hover { color: var(--fg); background: var(--card); }
.theme-toggle svg { width: 16px; height: 16px; }
.ico-moon { display: none; }
:root.light .ico-sun, :root[data-theme="light"] .ico-sun { display: none; }
:root.light .ico-moon, :root[data-theme="light"] .ico-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not(.dark):not([data-theme]) .ico-sun { display: none; }
  :root:not(.dark):not([data-theme]) .ico-moon { display: block; }
}

/* ---------- eyebrow ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .02em;
  color: var(--fg); margin: 0 0 16px;
}

/* ---------- hero ---------- */
.hero { padding: 44px 0 12px; }
.wordmark {
  margin: 0;
  font-family: var(--font-hero);
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  line-height: 1; letter-spacing: -.045em;
  color: var(--fg);
}
.wordmark .w1 { font-weight: 300; }
.wordmark .w2 { font-weight: 800; }
.roster-line {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(14px, 2.2vw, 20px); line-height: 1.5;
  color: var(--dim);
}
.roster-prefix { color: var(--faint); margin-right: .4ch; }
.roster-role {
  color: var(--fg); font-weight: 500;
  transition: opacity .26s ease;
}
.hero-desc {
  margin: 20px 0 0;
  font-size: clamp(15px, 2.1vw, 19px); line-height: 1.5; font-weight: 400;
  color: var(--muted-fg);
  letter-spacing: 0;
  max-width: 48ch;
}

/* ---------- try it now ---------- */
.try {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px; align-items: start;
  padding: 48px 0;
}
.try-col { min-width: 0; }

.terminal {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
}
.cmd {
  font-family: var(--font-mono);
  font-size: 14px; line-height: 1.4;
  color: var(--fg); white-space: nowrap; flex: 1;
}
.tok-prompt { color: var(--faint); margin-right: 2px; }
.tok-arg { color: var(--muted-fg); }
.tok-flag { color: var(--muted-fg); }
.tok-val { color: var(--fg); }
.copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none;
  background: none; border: none; cursor: pointer;
  color: var(--dim); border-radius: 6px; transition: color .12s, background .12s;
}
.copy:hover { color: var(--fg); background: var(--card-hover); }
.copy.copied { color: var(--fg); }
.copy svg { width: 15px; height: 15px; }

.harnesses { display: flex; align-items: flex-start; gap: 36px; flex-wrap: wrap; }
.harness {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted-fg); transition: color .12s;
}
.harness:hover { color: var(--fg); }
.harness svg { width: 34px; height: 34px; display: block; }
.harness-name {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--dim); letter-spacing: .01em;
}

/* ---------- leaderboard ---------- */
.board { padding: 24px 0 40px; }

.search {
  position: relative; display: flex; align-items: center;
  border-bottom: 1px solid var(--border-strong);
  padding: 4px 0;
}
.search-icon { width: 16px; height: 16px; color: var(--dim); flex: none; }
.search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--fg); font-family: var(--font-mono); font-size: 14px;
  padding: 10px 12px;
}
.search input::placeholder { color: var(--dim); }
.search-kbd {
  font-family: var(--font-mono); font-size: 12px; color: var(--dim);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 7px; line-height: 1.4;
}

.tabs { display: flex; gap: 22px; margin: 16px 0 4px; }
.tab {
  background: none; border: none; cursor: pointer; padding: 6px 0;
  font-family: var(--font-mono); font-size: 14px; color: var(--dim);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color .12s;
}
.tab:hover { color: var(--muted-fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }

/* ---------- table ---------- */
.table { margin-top: 6px; }
.thead, .trow {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 150px 128px;
  align-items: center;
  column-gap: 16px;
}
.thead {
  padding: 10px 8px; border-bottom: 1px solid var(--border);
}
.th {
  font-family: var(--font-mono); font-size: 12px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .03em; color: var(--dim);
}
.col-activity, .col-installs { text-align: right; }

.trow {
  padding: 16px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.trow:hover { background: var(--card); }

.rank { font-family: var(--font-mono); font-size: 14px; color: var(--dim); align-self: start; padding-top: 1px; }

.cell-main { min-width: 0; }
.main-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.agent-slug { font-size: 15px; font-weight: 600; color: var(--fg); letter-spacing: -.01em; }
.agent-src { font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.agent-desc {
  margin: 5px 0 0; font-size: 13.5px; color: var(--muted-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch;
}
.role-noun { color: var(--fg); font-weight: 600; }
.agent-empty {
  margin: 9px 0 0; font-size: 12.5px; line-height: 1.5;
  color: var(--dim); max-width: 66ch;
}
.agent-empty a {
  color: var(--muted-fg); font-family: var(--font-mono);
  font-size: 12px; white-space: nowrap;
}
.agent-empty a:hover { color: var(--fg); }
.agent-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.proof {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-fg);
  cursor: default;
}
.proof svg { width: 12px; height: 12px; color: var(--muted-fg); }
.proof b { color: var(--fg); font-weight: 500; }
.proof-source {
  color: var(--dim);
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 2px 7px; line-height: 1.4;
}

.cell-activity { display: flex; justify-content: flex-end; align-self: center; }
.spark { width: 132px; height: 30px; display: block; }
.spark .line { fill: none; stroke: var(--spark); stroke-width: 1.4; }
.spark .fill { fill: var(--spark); opacity: .10; stroke: none; }

.cell-installs {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  align-self: start; padding-top: 1px;
}
.cell-installs .verified { width: 13px; height: 13px; color: var(--dim); flex: none; }
.installs-n { font-family: var(--font-mono); font-size: 14px; color: var(--fg); }

.empty { padding: 28px 8px; color: var(--muted-fg); font-family: var(--font-mono); font-size: 14px; }
.empty span { color: var(--fg); }

.board-note {
  margin: 22px 0 0; font-size: 13px; line-height: 1.55; color: var(--dim);
  max-width: 72ch;
}
.board-note b { color: var(--muted-fg); font-weight: 500; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--border); margin-top: 24px; }
.foot-inner {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 40px;
}
.brand.small .brand-mark svg { width: 14px; height: 14px; }
.brand.small .brand-name { font-size: 13px; color: var(--muted-fg); }
.foot nav { display: flex; gap: 18px; }
.foot nav a { color: var(--muted-fg); font-size: 13px; }
.foot nav a:hover { color: var(--fg); }
.foot-note { margin-left: auto; font-size: 12px; color: var(--dim); }
.foot-note code { font-family: var(--font-mono); color: var(--muted-fg); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--fg); color: var(--bg);
  font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: var(--radius);
  opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- agent card page ---------- */
#card { padding: 8px 0 8px; }

.card-back {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 13px; color: var(--dim);
  margin-bottom: 22px; transition: color .12s;
}
.card-back svg { width: 13px; height: 13px; }
.card-back:hover { color: var(--fg); }

/* identity */
.card-identity { padding: 28px 0 4px; }
.ident-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ident-role {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--dim);
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 3px 8px; line-height: 1;
}
.ident-name {
  margin: 0;
  font-family: var(--font-hero);
  font-size: clamp(2rem, 5.5vw, 3.25rem); line-height: 1; letter-spacing: -.04em;
  font-weight: 700; color: var(--fg);
}
.ident-desc {
  margin: 16px 0 0; font-size: clamp(15px, 2vw, 18px); line-height: 1.5;
  color: var(--muted-fg); max-width: 60ch;
}
.ident-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 20px;
}
.ident-src {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted-fg);
  transition: color .12s;
}
.ident-src svg { width: 15px; height: 15px; }
.ident-src:hover { color: var(--fg); }
.ident-dot { color: var(--faint); }
.ident-harnesses { display: inline-flex; align-items: center; gap: 20px; }
.ident-harnesses .harness { flex-direction: row; gap: 7px; }
.ident-harnesses .harness svg { width: 18px; height: 18px; }
.ident-harnesses .harness-name { font-size: 11px; }

/* section rhythm */
.card-sec {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  margin-top: 30px;
}
.card-install { margin-top: 24px; }

/* tab bar */
.card-tabs {
  display: flex; gap: 24px;
  margin-top: 30px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.card-tabs::-webkit-scrollbar { display: none; }
.card-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 1px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 14px; color: var(--dim);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color .12s;
}
.card-tab:hover { color: var(--muted-fg); }
.card-tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.card-tab-count {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 0 6px; line-height: 1.5;
}
.card-tab[aria-selected="true"] .card-tab-count { color: var(--dim); }

/* tab panel */
.tab-panel { padding-top: 30px; }
.tab-panel > .card-sec:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.eyebrow-good, .eyebrow-not { display: inline-flex; align-items: center; gap: 7px; }
.eyebrow-good::before, .eyebrow-not::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
}
.eyebrow-good::before { background: var(--muted-fg); }
.eyebrow-not::before { background: none; border: 1px solid var(--dim); }

.card-empty {
  margin: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  color: var(--dim); max-width: 66ch;
}

/* work samples */
.samples-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.sample {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 16px 14px;
  transition: border-color .12s, background .12s;
}
.sample:hover { border-color: var(--border-strong); background: var(--card-hover); }
.sample-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sample-type {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted-fg);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 2px 7px;
}
.sample-when { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.sample-title {
  margin: 12px 0 0; font-size: 15px; font-weight: 600; line-height: 1.35;
  letter-spacing: -.01em; color: var(--fg);
}
.sample-summary {
  margin: 7px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted-fg);
}
.sample-note {
  display: flex; align-items: center; gap: 5px;
  margin: 12px 0 0; font-family: var(--font-mono); font-size: 11px; color: var(--dim);
}
.sample-note .verified { width: 12px; height: 12px; color: var(--muted-fg); flex: none; }

/* definition */
.def-block {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow-x: auto;
}
.def-pre {
  margin: 0; padding: 18px 18px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
  color: var(--muted-fg); white-space: pre; tab-size: 2;
}
.def-fence { color: var(--faint); }
.def-key { color: var(--dim); }
.def-val { color: var(--muted-fg); }
.def-head { color: var(--fg); font-weight: 600; }
.def-bullet { color: var(--muted-fg); }

/* best for / not for */
.card-fit {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px;
}
.card-list { margin: 0; padding: 0; list-style: none; }
.card-list li {
  position: relative; padding-left: 18px; margin: 0 0 10px;
  font-size: 14px; line-height: 1.5; color: var(--muted-fg);
}
.card-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 1.4px; background: var(--dim);
}

/* reviews */
.reviews-wrap {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.review {
  margin: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 16px 14px;
}
.review-text {
  margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg);
}
.review-by {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted-fg);
}
.review-when { color: var(--dim); }
.review-when::before { content: "·"; margin-right: 8px; color: var(--faint); }

/* trust strip */
.card-trust {
  display: flex; flex-wrap: wrap; gap: 14px 40px;
}
.trust-item { display: flex; flex-direction: column; gap: 5px; }
.trust-label {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--dim);
}
.trust-value {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--fg); font-family: var(--font-mono);
}
.trust-value .verified { width: 13px; height: 13px; color: var(--muted-fg); }
.trust-value a { color: var(--fg); border-bottom: 1px solid var(--border-strong); }
.trust-value a:hover { border-bottom-color: var(--fg); }
.trust-unclaimed { color: var(--dim); }

/* ---------- docs ---------- */
.docs-page { padding-bottom: 36px; }
.docs-hero {
  padding: 44px 0 34px;
  border-bottom: 1px solid var(--border);
}
.docs-hero-compact {
  padding-bottom: 30px;
}
.docs-title {
  margin: 0;
  font-family: var(--font-hero);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 760;
  color: var(--fg);
  max-width: 12ch;
}
.docs-hero-compact .docs-title {
  max-width: 13.5ch;
}
.docs-desc {
  margin: 18px 0 0;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
  color: var(--muted-fg);
  max-width: 60ch;
}
.docs-terminal { max-width: 690px; margin-top: 28px; }
/* Docs use the full page width (shadcn-docs style), not the narrow column. */
.wrap.docs-page {
  max-width: none;
  padding-left: clamp(20px, 3.5vw, 72px);
  padding-right: clamp(20px, 3.5vw, 72px);
}
.docs-shell {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: start;
}
/* Right-hand "on this page" column. */
.docs-onpage {
  position: sticky;
  top: 78px;
  padding-top: 34px;
  min-width: 0;
}
.docs-onpage-label {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
}
.docs-onpage nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
}
.docs-onpage a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 13px;
  line-height: 1.4;
  color: var(--dim);
  transition: color .12s, border-color .12s;
}
.docs-onpage a:hover { color: var(--fg); border-color: var(--fg); }
/* Drop the right TOC first, then (below) the left nav. */
@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: 212px minmax(0, 1fr); }
  .docs-onpage { display: none; }
}
.docs-toc {
  position: sticky;
  top: 78px;
  padding-top: 34px;
  min-width: 0;
}
.docs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.docs-toc a {
  display: block;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
  transition: color .12s;
}
.docs-toc a:hover { color: var(--fg); }
.docs-toc a[aria-current="page"] { color: var(--fg); }
.docs-content {
  min-width: 0;
  padding-top: 34px;
}
.docs-section {
  min-width: 0;
  padding: 0 0 48px;
  margin: 0 0 48px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 78px;
}
.docs-section-first {
  padding-top: 0;
}
.docs-section:last-child {
  margin-bottom: 0;
  border-bottom: none;
}
.docs-section h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--fg);
}
.docs-section h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--fg);
}
.docs-section p {
  margin: 14px 0 0;
  color: var(--muted-fg);
  line-height: 1.65;
  max-width: 74ch;
}
.docs-section code,
.docs-desc code {
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--fg);
}
.docs-callout {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-fg);
}
.docs-callout strong {
  color: var(--fg);
  font-weight: 600;
}
.docs-callout span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.docs-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color .12s, background .12s;
}
.docs-card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.docs-card strong {
  color: var(--fg);
  font-size: 15px;
  line-height: 1.35;
}
.docs-card span {
  color: var(--muted-fg);
  font-size: 13.5px;
  line-height: 1.5;
}
.docs-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.docs-steps > div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 15px;
}
.docs-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-fg);
}
.docs-steps h3 {
  margin-top: 12px;
  font-size: 15px;
}
.docs-code {
  margin: 14px 0 0;
  padding: 15px;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-fg);
}
.docs-code code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-fg);
  white-space: pre;
}
.docs-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 24px 0 0;
}
.docs-dl div { min-width: 0; }
.docs-dl dt {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.docs-dl dd {
  margin: 6px 0 0;
  color: var(--muted-fg);
  line-height: 1.6;
  font-size: 14px;
}
.docs-command-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.docs-command-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.docs-command-list.compact div { grid-template-columns: 190px minmax(0, 1fr); }
.docs-command-list span {
  color: var(--muted-fg);
  line-height: 1.55;
}
.docs-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.docs-list li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--muted-fg);
  line-height: 1.6;
}
.docs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 6px;
  height: 1.4px;
  background: var(--dim);
}
.docs-table-wrap {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.docs-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--card);
}
.docs-table th,
.docs-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--dim);
  font-weight: 400;
}
.docs-table td {
  font-size: 13.5px;
  color: var(--muted-fg);
  line-height: 1.55;
}
.docs-table td:first-child {
  color: var(--fg);
  font-weight: 600;
}

/* not-found */
.card-missing { padding: 80px 0 100px; max-width: 52ch; }
.missing-title {
  margin: 4px 0 0; font-family: var(--font-hero);
  font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.05; letter-spacing: -.03em;
  font-weight: 700; color: var(--fg);
}
.missing-desc { margin: 16px 0 24px; font-size: 15px; line-height: 1.5; color: var(--muted-fg); }
.missing-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 14px; color: var(--muted-fg);
  transition: color .12s;
}
.missing-link svg { width: 14px; height: 14px; }
.missing-link:hover { color: var(--fg); }

/* row copy icon on the directory */
.row-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none;
  background: none; border: none; cursor: pointer;
  color: var(--dim); border-radius: 6px; transition: color .12s, background .12s;
}
.row-copy:hover { color: var(--fg); background: var(--card-hover); }
.row-copy.copied { color: var(--fg); }
.row-copy svg { width: 15px; height: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { padding-top: 28px; }
  .hero-desc { max-width: none; }
  .try { grid-template-columns: 1fr; gap: 32px; }

  .docs-hero { padding-top: 30px; }
  .docs-title { max-width: none; }
  .docs-shell { grid-template-columns: 1fr; gap: 0; }
  .docs-toc {
    position: static;
    padding: 18px 0 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
  }
  .docs-toc nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 18px;
    scrollbar-width: none;
  }
  .docs-toc nav::-webkit-scrollbar { display: none; }
  .docs-toc a { white-space: nowrap; padding: 12px 0; }
  .docs-content { padding-top: 28px; }
  .docs-steps,
  .docs-dl,
  .docs-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .thead { display: none; }
  .trow { grid-template-columns: 28px minmax(0,1fr) auto; row-gap: 10px; padding: 14px 4px; }
  .cell-activity { display: none; }
  .agent-desc { white-space: normal; }
  .agent-meta { gap: 6px; }

  /* pairing stacks; arrow points down between the two cards */
  .pairing-arrow { transform: rotate(90deg); }

  /* let the install command wrap so the copy button stays on-screen */
  .terminal { align-items: flex-start; overflow-x: visible; }
  .cmd { white-space: normal; overflow-wrap: anywhere; }
  .copy { width: 34px; height: 34px; margin: -4px -4px -4px 0; }
  .copy svg { width: 16px; height: 16px; }

  .foot-note { margin-left: 0; width: 100%; }
  .nav-links { gap: 16px; }
  .nav-links a { display: none; }
  .nav-links a:first-of-type,
  .nav-links a[href="/docs"],
  .nav-links a.nav-icon { display: inline; }

  /* agent card: single column, no horizontal overflow */
  .samples-grid,
  .card-fit,
  .reviews-wrap { grid-template-columns: 1fr; }
  .card-fit { gap: 26px; }
  .card-sec { padding: 26px 0; margin-top: 26px; }
  .ident-meta { gap: 10px 14px; }
  .ident-harnesses { gap: 16px; }
  .card-trust { gap: 16px 28px; }
  .def-pre { font-size: 12px; padding: 14px; }

  .card-tabs { gap: 20px; margin-top: 24px; }
  .tab-panel { padding-top: 24px; }

  .docs-section { padding-bottom: 38px; margin-bottom: 38px; }
  .docs-command-list div,
  .docs-command-list.compact div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .docs-code { padding: 13px; }
  .docs-code code { font-size: 12px; }
}

/* ---------- public builder profiles ---------- */
.social-body { overflow-x: hidden; }
.social-main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.social-nav .nav-inner { max-width: 1520px; }
.github-login {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font: 600 13px/1 var(--font-sans);
}
.github-login:disabled { cursor: not-allowed; opacity: .55; }
.profile-hero,
.model-hero,
.profile-chapter,
.profile-action,
.social-missing {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}
.profile-hero,
.model-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
  min-height: calc(100vh - 56px);
  align-items: center;
  gap: clamp(28px, 5vw, 96px);
  padding: clamp(72px, 10vw, 154px) 0 clamp(84px, 12vw, 170px);
}
.profile-hero::before,
.model-hero::before {
  content: "";
  position: absolute;
  inset: 4% -16% 12% 38%;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 18%, color-mix(in srgb, var(--fg) 8%, transparent) 18% 19%, transparent 19% 100%),
    radial-gradient(circle at 55% 28%, color-mix(in srgb, #42ffd2 18%, transparent), transparent 38%),
    radial-gradient(circle at 82% 72%, color-mix(in srgb, #ff5436 14%, transparent), transparent 42%);
  filter: blur(18px) saturate(120%);
  opacity: .65;
  pointer-events: none;
}
.hero-copy,
.model-copy {
  min-width: 0;
  max-width: min(1120px, 100%);
}
.social-back,
.model-path,
.card-kicker {
  display: inline-block;
  margin: 0 0 18px;
  color: var(--muted-fg);
  font: 600 13px/1.3 var(--font-mono);
  letter-spacing: 0;
}
.social-back:hover { color: var(--fg); }
.profile-hero h1,
.model-hero h1 {
  max-width: min(1120px, 100%);
  margin: 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(3.4rem, 6vw, 5.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .9;
}
.model-hero h1 { font-size: clamp(3.2rem, 5.8vw, 5.6rem); }
.inline-photo {
  display: inline-block;
  width: clamp(76px, 10vw, 152px);
  height: clamp(38px, 5vw, 72px);
  margin: 0 .12em;
  border: 1px solid color-mix(in srgb, var(--fg) 26%, transparent);
  border-radius: 999px;
  background-position: center;
  background-size: cover;
  vertical-align: middle;
}
.hero-copy p,
.model-copy p,
.chapter-head p,
.profile-action p,
.story-pin p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted-fg);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}
.social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.social-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: 0;
}
.social-button.primary {
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
}
.social-button.secondary {
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--fg);
}
.social-button:disabled { cursor: not-allowed; opacity: .58; }
.hero-portrait,
.model-art,
.feedback-image,
.bento-image {
  overflow: hidden;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}
.hero-portrait,
.model-art {
  position: relative;
  min-height: min(620px, 72vh);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 18%, transparent);
}
.hero-portrait::after,
.model-art::after,
.feedback-image::after,
.bento-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 72%, transparent));
  pointer-events: none;
}
.hero-portrait img {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 92px;
  height: 92px;
  border: 1px solid color-mix(in srgb, var(--fg) 34%, transparent);
  border-radius: 999px;
  background: var(--bg);
  object-fit: cover;
  z-index: 1;
}
.fleet-panel {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 360px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--fg) 24%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px);
}
.fleet-panel span {
  color: var(--muted-fg);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0;
}
.fleet-panel div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
}
.fleet-panel strong {
  min-width: 0;
  overflow: hidden;
  color: var(--fg);
  font: 700 14px/1.2 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fleet-panel em {
  color: var(--muted-fg);
  font: normal 12px/1.2 var(--font-mono);
}
.hover-asset:hover,
.hover-asset:focus-visible {
  border-color: var(--border-strong);
}
.profile-chapter { padding: clamp(112px, 15vw, 210px) 0; }
.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(260px, .45fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}
.chapter-head.narrow {
  display: block;
  max-width: 920px;
}
.chapter-head h2,
.profile-action h2,
.story-pin h2,
.feedback-copy h2,
.readme-section h2 {
  margin: 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .98;
}
.profile-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(88px, auto));
  grid-auto-flow: dense;
  gap: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
}
.bento-card {
  min-width: 0;
  min-height: 0;
  padding: clamp(20px, 2.6vw, 34px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--fg);
}
.bento-card h2,
.bento-card h3 {
  margin: 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(1.6rem, 3.2vw, 3.25rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}
.bento-card p,
.repo-line p,
.agent-slice p,
.story-card p,
.readme-block p,
.example-card p,
.model-review blockquote,
.quote-card blockquote {
  color: var(--muted-fg);
  letter-spacing: 0;
}
.bento-large { grid-column: span 7; grid-row: span 4; }
.bento-repos { grid-column: span 5; grid-row: span 4; }
.bento-proof,
.bento-claim,
.bento-review { grid-column: span 4; grid-row: span 2; }
.bento-image {
  position: relative;
  min-height: 220px;
  margin-top: 32px;
}
.repo-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.repo-line:first-of-type { border-top: 0; }
.repo-line h3 { font-size: clamp(1.4rem, 2.2vw, 2.4rem); }
.repo-line span {
  color: var(--fg);
  font: 700 13px/1.2 var(--font-mono);
}
.proof-tile + .proof-tile { margin-top: 14px; }
.proof-tile strong {
  display: block;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(2rem, 4vw, 4.2rem);
  letter-spacing: 0;
  line-height: .9;
}
.proof-tile span {
  display: block;
  margin-top: 8px;
  color: var(--muted-fg);
}
.agent-accordion {
  display: flex;
  min-height: 440px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
}
.agent-slice {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: clamp(22px, 3vw, 38px);
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 78%, transparent), color-mix(in srgb, var(--bg) 94%, transparent)),
    url("https://picsum.photos/seed/agent-accordion/900/1200") center / cover;
}
.agent-slice:last-child { border-right: 0; }
.agent-slice:hover,
.agent-slice:focus-visible {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 66%, transparent), color-mix(in srgb, var(--bg) 88%, transparent)),
    url("https://picsum.photos/seed/agent-accordion/900/1200") center / cover;
}
.agent-slice span {
  color: var(--muted-fg);
  font: 700 12px/1 var(--font-mono);
}
.agent-slice strong {
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(1.7rem, 3vw, 3.4rem);
  letter-spacing: 0;
  line-height: .95;
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 112px);
  align-items: start;
}
.story-pin {
  max-width: 620px;
  will-change: transform;
}
.word-reveal { color: var(--fg); }
.reveal-word { opacity: .18; }
.story-cards {
  display: grid;
  gap: 20px;
}
.story-card,
.example-card,
.readme-block,
.model-review {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(20px, 2.4vw, 32px);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  transition: transform .7s ease, border-color .7s ease, background .7s ease;
}
.story-card:hover,
.example-card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.story-card span {
  color: var(--muted-fg);
  font: 700 12px/1 var(--font-mono);
}
.story-card h3,
.example-card h3,
.readme-block h3 {
  margin: 18px 0 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(1.6rem, 3vw, 3.1rem);
  letter-spacing: 0;
  line-height: 1;
}
.feedback-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(300px, .55fr);
  gap: clamp(32px, 6vw, 92px);
  align-items: center;
}
.quote-stage { margin-top: 30px; }
.quote-card blockquote {
  margin: 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(2rem, 4vw, 4.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}
.quote-card figcaption,
.model-review figcaption {
  margin-top: 20px;
  color: var(--muted-fg);
  font: 700 13px/1.2 var(--font-mono);
}
.quote-controls {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.quote-controls button {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
}
.feedback-image { min-height: 520px; }
.profile-action {
  margin-bottom: clamp(90px, 12vw, 160px);
  padding: clamp(42px, 6vw, 80px);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background:
    linear-gradient(120deg, color-mix(in srgb, #42ffd2 12%, transparent), transparent 34%),
    color-mix(in srgb, var(--card) 92%, transparent);
}
.profile-action .terminal { margin-top: 30px; }
.social-footer { border-top: 1px solid var(--border); }
.social-footer-inner {
  display: flex;
  width: min(1440px, calc(100% - 32px));
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}
.social-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted-fg);
  font-size: 14px;
}
.model-path { display: block; }
.social-terminal {
  max-width: 760px;
  margin-top: 34px;
}
.harness-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}
.harness-cloud span {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fg);
  font: 700 12px/1 var(--font-mono);
}
.model-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted-fg);
}
.model-list li + li { margin-top: 10px; }
.readme-grid,
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.readme-block p,
.example-card p { margin-top: 18px; }
.model-review blockquote {
  margin: 0;
  color: var(--fg);
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.2;
}
.social-missing {
  min-height: calc(100vh - 56px);
  padding: clamp(96px, 14vw, 180px) 0;
}
.social-missing h1 {
  max-width: 900px;
  margin: 0;
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: 0;
  line-height: .95;
}
.social-missing p {
  max-width: 620px;
  color: var(--muted-fg);
  font-size: 20px;
}
@media (max-width: 980px) {
  .profile-hero,
  .model-hero,
  .chapter-head,
  .story-grid,
  .feedback-section { grid-template-columns: 1fr; }
  .profile-hero,
  .model-hero { min-height: auto; }
  .hero-portrait,
  .model-art,
  .feedback-image { min-height: 420px; }
  .profile-bento { display: block; }
  .bento-card { border-right: 0; }
  .agent-accordion {
    min-height: auto;
    flex-direction: column;
  }
  .agent-slice {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .agent-slice:hover,
  .agent-slice:focus-visible { flex: 1 1 auto; }
  .readme-grid,
  .reviews-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .github-login { display: none; }
  .profile-hero,
  .model-hero,
  .profile-chapter,
  .profile-action,
  .social-missing,
  .social-footer-inner {
    width: min(100% - 24px, 1440px);
  }
  .profile-hero h1,
  .model-hero h1,
  .social-missing h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }
  .social-actions,
  .social-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
  .social-button { width: 100%; }
}

/* ---------- social profile and template repository pages ---------- */
.profile-shell,
.template-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 96px;
}

.profile-shell {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.profile-sidebar,
.profile-module,
.template-header,
.template-module,
.template-sidebar .terminal,
.sidebar-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
}

.profile-sidebar {
  position: sticky;
  top: 76px;
  padding: 18px;
}

.profile-avatar {
  display: block;
  width: 116px;
  height: 116px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  object-fit: cover;
}

.profile-sidebar h1,
.template-header h1 {
  margin: 18px 0 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(2rem, 4vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .95;
}

.profile-handle {
  margin: 3px 0 0;
  color: var(--muted-fg);
  font: 600 14px/1.3 var(--font-mono);
}

.profile-bio {
  margin: 18px 0 0;
  color: var(--fg);
  line-height: 1.5;
}

.profile-actions-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.profile-actions-compact .social-button {
  min-height: 38px;
  padding: 0 10px;
}

.profile-details {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.profile-details div,
.template-meta div {
  display: grid;
  gap: 2px;
}

.profile-details dt,
.template-meta dt {
  color: var(--dim);
  font: 700 11px/1.2 var(--font-mono);
}

.profile-details dd,
.template-meta dd {
  margin: 0;
  color: var(--muted-fg);
  font-size: 14px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.profile-tags span,
.repo-agents code,
.artifact-fleet code {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 7px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--muted-fg);
  font: 600 12px/1 var(--font-mono);
}

.profile-stat-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.profile-stat {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.profile-stat strong {
  display: block;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: 2rem;
  line-height: .9;
}

.profile-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted-fg);
  font-size: 13px;
}

.profile-main {
  min-width: 0;
}

.profile-tabs,
.template-tabs {
  position: sticky;
  top: 56px;
  z-index: 10;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar,
.template-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tabs a,
.template-tabs a {
  padding: 13px 0;
  color: var(--muted-fg);
  border-bottom: 1px solid transparent;
  font: 700 13px/1 var(--font-mono);
  white-space: nowrap;
}

.profile-tabs a[aria-current="page"],
.template-tabs a[aria-current="page"],
.profile-tabs a:hover,
.template-tabs a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.profile-module,
.template-module {
  padding: clamp(18px, 3vw, 28px);
}

.profile-module + .profile-module,
.template-module + .template-module {
  margin-top: 16px;
}

.module-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.module-heading h2,
.sidebar-card h2 {
  margin: 0;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(1.45rem, 2.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.module-heading p {
  max-width: 46ch;
  margin: 0;
  color: var(--muted-fg);
}

.repo-grid,
.artifact-grid,
.discussion-grid,
.fork-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.repo-panel,
.artifact-card,
.discussion-card,
.template-artifact,
.template-thread,
.fork-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 52%, transparent);
}

.repo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.repo-panel a,
.artifact-card h3,
.discussion-card h3,
.template-artifact h3,
.template-thread h3,
.fork-card strong {
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.repo-panel p,
.artifact-card p,
.discussion-card p,
.template-artifact p,
.template-thread p,
.fork-card p {
  margin: 8px 0 0;
  color: var(--muted-fg);
}

.repo-panel > span,
.discussion-card > span,
.template-thread > span {
  color: var(--muted-fg);
  font: 700 12px/1.2 var(--font-mono);
  white-space: nowrap;
}

.repo-agents,
.artifact-fleet {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.agent-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.agent-row {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .18s ease;
}

.agent-row:last-child {
  border-bottom: 0;
}

.agent-row:hover {
  background: var(--card-hover);
}

.agent-row-name {
  color: var(--fg);
  font-weight: 800;
}

.agent-row-name em {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font: normal 12px/1.2 var(--font-mono);
}

.agent-row > span:nth-child(2) {
  color: var(--muted-fg);
  font: 700 12px/1.2 var(--font-mono);
}

.agent-row p {
  margin: 0;
  color: var(--muted-fg);
}

.artifact-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--dim);
  font: 700 12px/1.2 var(--font-mono);
}

.split-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
}

.activity-list {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--fg);
}

.activity-item p {
  margin: 0;
  color: var(--fg);
}

.activity-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted-fg);
  line-height: 1.45;
}

.profile-note {
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 52%, transparent);
}

.profile-note h3 {
  margin: 0;
  color: var(--fg);
}

.profile-note p {
  margin: 8px 0 0;
  color: var(--muted-fg);
}

.discussion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.discussion-card .profile-tags {
  grid-column: 1 / -1;
}

.template-shell {
  padding-top: 34px;
}

.template-header {
  padding: clamp(18px, 3vw, 28px);
}

.template-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.template-header h1 {
  margin-top: 0;
}

.template-header p {
  max-width: 72ch;
  margin: 10px 0 0;
  color: var(--muted-fg);
  font-size: 17px;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.template-actions .social-button {
  min-height: 38px;
}

.template-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  color: var(--muted-fg);
  font: 700 13px/1.2 var(--font-mono);
}

.template-stats strong {
  color: var(--fg);
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 18px;
  align-items: start;
}

.template-main {
  min-width: 0;
}

.template-sidebar {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 12px;
}

.template-sidebar .terminal {
  align-items: flex-start;
  overflow-x: visible;
  margin-top: 0;
}

.template-sidebar .cmd {
  white-space: normal;
  overflow-wrap: anywhere;
}

.sidebar-card {
  padding: 16px;
}

.sidebar-card h2 {
  font-size: 1.35rem;
}

.template-meta {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.template-thread-list {
  display: grid;
  gap: 10px;
}

.template-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.fork-card strong {
  display: block;
}

@media (max-width: 980px) {
  .profile-shell,
  .template-layout,
  .template-title-row,
  .split-module {
    grid-template-columns: 1fr;
  }

  .profile-sidebar,
  .template-sidebar {
    position: static;
  }

  .profile-sidebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 18px;
  }

  .profile-sidebar .profile-bio,
  .profile-sidebar .profile-actions-compact,
  .profile-sidebar .profile-details,
  .profile-sidebar .profile-tags,
  .profile-sidebar .profile-stat-grid {
    grid-column: 1 / -1;
  }

  .template-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .profile-shell,
  .template-shell {
    width: min(100% - 24px, 1320px);
    padding-top: 18px;
  }

  .profile-sidebar {
    display: block;
  }

  .profile-avatar {
    width: 92px;
    height: 92px;
  }

  .profile-actions-compact,
  .repo-grid,
  .artifact-grid,
  .discussion-grid,
  .fork-grid,
  .readme-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .module-heading,
  .repo-panel,
  .discussion-card,
  .template-thread {
    display: block;
  }

  .agent-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .template-actions .social-button {
    width: auto;
  }
}

/* ---------- profile/repository polish overrides ---------- */
a:focus-visible,
button:focus-visible,
.social-button:focus-visible,
.profile-tabs a:focus-visible,
.template-tabs a:focus-visible,
.agent-row:focus-visible,
.repo-panel a:focus-visible,
.artifact-card a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fg) 82%, transparent);
  outline-offset: 3px;
}

button,
.social-button {
  touch-action: manipulation;
}

.profile-shell,
.template-shell {
  width: min(1240px, calc(100% - 32px));
  padding-top: 30px;
}

.profile-shell {
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 34px;
}

.profile-sidebar,
.profile-module,
.template-header,
.template-module,
.template-sidebar .terminal,
.sidebar-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-sidebar {
  padding: 0 28px 0 0;
  border-right: 1px solid var(--border);
}

.profile-avatar {
  width: 116px;
  height: 116px;
  border-radius: 999px;
}

.profile-sidebar h1 {
  max-width: 100%;
  margin: 18px 0 0;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(1.75rem, 2.25vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}

.template-header h1 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-family: "Cabinet Grotesk", var(--font-hero);
  font-size: clamp(2.1rem, 4.4vw, 4.25rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .98;
}

.profile-bio {
  color: var(--muted-fg);
  font-size: 14.5px;
}

.profile-actions-compact {
  display: flex;
  flex-wrap: wrap;
}

.profile-actions-compact .social-button {
  flex: 1 1 112px;
}

.profile-details,
.profile-tags,
.profile-stat-grid {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.profile-stat-grid {
  gap: 0;
}

.profile-stat {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.profile-stat strong {
  font-size: 1.55rem;
  line-height: 1;
}

.profile-stat span {
  margin-top: 4px;
}

.profile-stat em {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font: normal 12px/1.35 var(--font-sans);
}

.profile-tabs,
.template-tabs {
  margin-bottom: 0;
  padding: 0;
  border-bottom-color: var(--border-strong);
}

.profile-tabs a,
.template-tabs a {
  padding: 14px 1px;
  transition: color .12s ease, border-color .12s ease;
}

.profile-module,
.template-module {
  padding: 26px 0 40px;
  border-bottom: 1px solid var(--border);
}

.profile-module + .profile-module,
.template-module + .template-module {
  margin-top: 0;
}

.module-heading {
  align-items: start;
  margin-bottom: 20px;
}

.module-heading.compact {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.module-heading h2,
.sidebar-card h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  line-height: 1.14;
}

.module-heading p {
  font-size: 14px;
  line-height: 1.55;
}

.kpi-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.kpi-board .profile-stat {
  min-height: 132px;
  padding: 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.kpi-board .profile-stat:nth-child(3n) {
  border-right: 0;
}

.kpi-board .profile-stat:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.kpi-board .profile-stat strong {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.kpi-board .profile-stat span {
  color: var(--fg);
  font-weight: 750;
}

.repo-panel,
.artifact-card,
.discussion-card,
.template-artifact,
.template-thread,
.fork-card,
.profile-note,
.agent-table {
  background: color-mix(in srgb, var(--card) 52%, transparent);
}

.repo-panel,
.artifact-card,
.discussion-card,
.template-artifact,
.template-thread,
.fork-card {
  transition: border-color .12s ease, background .12s ease;
}

.repo-panel:hover,
.artifact-card:hover,
.discussion-card:hover,
.template-artifact:hover,
.template-thread:hover,
.fork-card:hover,
.agent-row:hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--card-hover) 76%, transparent);
}

.template-header {
  padding: 4px 0 26px;
  border-bottom: 1px solid var(--border);
}

.template-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
}

.template-sidebar {
  gap: 0;
}

.template-sidebar .terminal {
  margin: 20px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.sidebar-card {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.template-meta dd,
.profile-details dd {
  overflow-wrap: anywhere;
}

.readme-module {
  padding-top: 24px;
}

.readme-module .module-heading {
  display: grid;
  grid-template-columns: minmax(160px, .55fr) minmax(0, 1fr);
}

.readme-module .module-heading p {
  justify-self: end;
  max-width: 54ch;
}

.readme-module .module-heading code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.readme-doc {
  max-width: 820px;
  color: var(--muted-fg);
  font-size: 16px;
  line-height: 1.7;
}

.readme-banner {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  height: auto;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
}

.readme-kicker {
  display: grid;
  gap: 4px;
  margin: 0 0 22px;
  text-align: center;
}

.readme-kicker strong {
  color: var(--fg);
}

.readme-kicker em {
  color: var(--muted-fg);
}

.readme-doc h1,
.readme-doc h2 {
  color: var(--fg);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.readme-doc h1 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.1;
}

.readme-doc h2 {
  margin: 34px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.readme-doc p {
  margin: 12px 0 0;
}

.readme-doc code,
.readme-table code {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--card);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: .9em;
}

.readme-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.readme-table th,
.readme-table td {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.readme-table th:last-child,
.readme-table td:last-child {
  border-right: 0;
}

.readme-table tr:last-child td {
  border-bottom: 0;
}

.readme-table th {
  color: var(--fg);
  font-weight: 750;
}

.readme-table td {
  color: var(--muted-fg);
}

@media (max-width: 980px) {
  .profile-shell,
  .template-layout,
  .template-title-row,
  .split-module {
    grid-template-columns: 1fr;
  }

  .profile-sidebar,
  .template-sidebar {
    position: static;
  }

  .profile-sidebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 18px;
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .profile-sidebar h1,
  .profile-sidebar .profile-handle {
    align-self: end;
  }

  .template-sidebar .terminal {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .profile-shell,
  .template-shell {
    width: min(100% - 24px, 1240px);
    padding-top: 18px;
  }

  .profile-sidebar {
    display: block;
  }

  .profile-sidebar h1 {
    font-size: clamp(1.65rem, 9vw, 2.15rem);
  }

  .template-header h1 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  .profile-tabs,
  .template-tabs {
    top: 56px;
    gap: 18px;
  }

  .kpi-board,
  .repo-grid,
  .artifact-grid,
  .discussion-grid,
  .fork-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .kpi-board .profile-stat,
  .kpi-board .profile-stat:nth-child(3n),
  .kpi-board .profile-stat:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .kpi-board .profile-stat:last-child {
    border-bottom: 0;
  }

  .module-heading {
    display: block;
  }

  .readme-module .module-heading {
    display: block;
  }

  .readme-module .module-heading p {
    justify-self: auto;
    max-width: none;
  }

  .module-heading p {
    margin-top: 8px;
  }

  .readme-doc {
    font-size: 15px;
  }
}

/* ============================================================= *
 * DOCS — shadcn-docs style: fixed sidebars, centered content,   *
 * title/actions row, right "On this page" TOC. Scoped to        *
 * .docs-theme so the landing page is untouched.                 *
 * ============================================================= */
.docs-theme { --docs-nav-h: 57px; }

.docs-theme .nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
}
.docs-theme .nav-inner { height: var(--docs-nav-h); }

.docs-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) 256px;
  gap: 0;
  padding: 0 clamp(16px, 2vw, 40px);
  align-items: start;
}

/* Left sidebar */
.docs-sidebar { min-width: 0; }
.docs-side-inner {
  position: sticky;
  top: var(--docs-nav-h);
  max-height: calc(100dvh - var(--docs-nav-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 28px 48px 0;
}
.docs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--dim);
  background: var(--card);
}
.docs-search svg { width: 14px; height: 14px; flex: 0 0 auto; }
.docs-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.docs-search input::placeholder { color: var(--dim); }
.docs-side-group { display: flex; flex-direction: column; gap: 1px; }
.docs-side-label {
  margin: 0 0 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg);
}
.docs-sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted-fg);
  text-decoration: none;
  transition: color .12s, background .12s;
}
.docs-sidebar a:hover { color: var(--fg); background: var(--card-hover); }
.docs-sidebar a[aria-current="page"] {
  color: var(--fg);
  background: var(--border);
  font-weight: 500;
}

/* Center content */
.docs-main { min-width: 0; }
.docs-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 40px 96px;
}
.docs-article-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.docs-article-head h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 600;
  color: var(--fg);
}
.docs-lead { margin: 9px 0 0; color: var(--muted-fg); font-size: 15px; line-height: 1.6; }
.docs-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.docs-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  background: var(--card);
  color: var(--muted-fg);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.docs-copy svg { width: 14px; height: 14px; }
.docs-copy:hover { color: var(--fg); background: var(--card-hover); }
.docs-copy.copied { color: var(--fg); border-color: var(--border-strong); }
.docs-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted-fg);
  text-decoration: none;
  font-size: 15px;
}
.docs-nav-btn:hover { color: var(--fg); background: var(--card-hover); }
.docs-nav-btn.is-disabled { opacity: .35; pointer-events: none; }

/* Content: quieter sections (no heavy per-section border), hide eyebrows */
.docs-theme .docs-section { border: 0; margin: 0; padding: 40px 0 0; }
.docs-theme .docs-section-first { padding-top: 4px; }
.docs-theme .docs-section > .eyebrow { display: none; }
.docs-theme .docs-section h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 4px 0 0;
}
.docs-theme .docs-hero { display: none; }

/* Prev / next pager */
.docs-pager-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 56px;
}
.docs-pager {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 15px 17px;
  text-decoration: none;
  transition: background .12s;
}
.docs-pager.next { text-align: right; grid-column: 2; }
.docs-pager:hover { background: var(--card-hover); }
.docs-pager-dir { font-size: 12px; color: var(--dim); }
.docs-pager-title { color: var(--fg); font-size: 14px; font-weight: 500; }

/* Right "On this page" */
.docs-onthis { min-width: 0; }
.docs-onthis-inner {
  position: sticky;
  top: var(--docs-nav-h);
  max-height: calc(100dvh - var(--docs-nav-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 44px 0 40px 12px;
}
.docs-onthis-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--fg); }
.docs-onthis nav { display: flex; flex-direction: column; gap: 1px; }
.docs-onthis a {
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted-fg);
  text-decoration: none;
  transition: color .12s;
}
.docs-onthis a:hover, .docs-onthis a.is-active { color: var(--fg); }
.docs-promo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px;
  background: var(--card);
  text-decoration: none;
}
.docs-promo:hover { background: var(--card-hover); }
.docs-promo-title { color: var(--fg); font-size: 14px; font-weight: 600; }
.docs-promo-text { color: var(--muted-fg); font-size: 12.5px; line-height: 1.5; }
.docs-promo-cta { color: var(--fg); font-size: 12.5px; font-weight: 500; margin-top: 3px; }

/* Responsive: drop the right TOC, then the left sidebar */
@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-onthis { display: none; }
}
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; padding: 0 16px; }
  .docs-sidebar { display: none; }
  .docs-article { padding: 28px 0 72px; max-width: 720px; }
  .docs-article-head { flex-direction: column; }
}
