:root {
  --ink: #12151a;
  --ink-2: #2a3140;
  --muted: #6b7385;
  --paper: #eef1f4;
  --paper-2: #f7f8fa;
  --surface: #ffffff;
  --line: rgba(18, 21, 26, 0.1);
  --line-strong: rgba(18, 21, 26, 0.16);
  --accent: #2b59ff;
  --accent-ink: #1636c9;
  --ok: #147a45;
  --ok-soft: rgba(20, 122, 69, 0.09);
  --ok-ring: rgba(20, 122, 69, 0.22);
  --fail: #c0392b;
  --fail-soft: rgba(192, 57, 43, 0.09);
  --fail-ring: rgba(192, 57, 43, 0.22);
  --rank: #8a5a12;
  --rank-1: #b8890a;
  --rank-2: #6e7787;
  --rank-3: #9a6234;
  --terminal: #10141c;
  --terminal-fg: #e8edf5;
  --radius: 4px;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --shell: min(1120px, calc(100% - 2.5rem));
  --header-h: 3.75rem;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code, pre, kbd { font-family: var(--font-mono); }
::selection { background: rgba(43, 89, 255, 0.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { width: var(--shell); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(238, 241, 244, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--space-3);
  align-items: center;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  border-radius: .45rem;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(18, 21, 26, 0.08);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.1rem;
  line-height: 1;
}
.nav {
  display: flex;
  gap: .1rem;
  justify-content: center;
  align-items: stretch;
  height: var(--header-h);
}
.nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 .55rem;
  color: var(--ink-2);
  font-weight: 600;
  font-size: .88rem;
  box-shadow: inset 0 -2px 0 transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.header-search { position: relative; display: flex; align-items: center; }
.header-search input {
  width: min(230px, 26vw);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius);
  padding: .5rem .8rem;
  padding-right: 1.9rem;
  outline: none;
  line-height: 1.3;
}
.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 89, 255, 0.14);
}
.header-search kbd {
  position: absolute; right: .45rem;
  font-size: .65rem; color: var(--muted);
  border: 1px solid var(--line);
  padding: .05rem .28rem;
  background: var(--paper);
  line-height: 1.2;
  pointer-events: none;
}
.suggest-panel {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  left: auto;
  width: min(360px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(20, 24, 33, 0.12);
  z-index: 40;
  overflow: hidden;
  padding: .3rem;
}
.suggest-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem .75rem;
  padding: .55rem .65rem;
  border-radius: calc(var(--radius) - 2px);
  color: inherit;
  text-decoration: none;
  line-height: 1.25;
}
.suggest-item:hover,
.suggest-item.is-active {
  background: var(--paper-2);
}
.suggest-item .suggest-name {
  font-weight: 600;
  color: var(--ink);
}
.suggest-item .suggest-source {
  grid-column: 1;
  font-size: .78rem;
  color: var(--muted);
}
.suggest-item .suggest-meta {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: .75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.suggest-empty {
  padding: .7rem .75rem;
  color: var(--muted);
  font-size: .88rem;
}
.nav-toggle {
  display: none;
  width: 2.35rem; height: 2.35rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  align-items: center; justify-content: center;
  gap: .22rem; flex-direction: column;
  border-radius: var(--radius);
  padding: 0;
}
.nav-toggle span {
  display: block; width: .95rem; height: 2px; background: var(--ink);
  transition: transform .2s var(--ease), opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: .55rem 0 .9rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav .shell { display: grid; gap: .15rem; }
.mobile-nav a {
  padding: .75rem .85rem;
  font-weight: 700;
  color: var(--ink-2);
  border-left: 3px solid transparent;
}
.mobile-nav a.is-active,
.mobile-nav a:hover {
  background: var(--paper);
  border-left-color: var(--accent);
  color: var(--ink);
}

/* Home top band */
.home-top {
  background:
    radial-gradient(700px 280px at 12% 0%, rgba(43, 89, 255, 0.07), transparent 60%),
    linear-gradient(180deg, #e7ebf0 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
}

.hero { padding: var(--space-6) 0 var(--space-4); }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 380px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero-copy { animation: rise .7s var(--ease) both; max-width: 34rem; }
.hero-visual { animation: rise .75s .08s var(--ease) both; min-width: 0; }

.brand-lockup {
  margin: 0 0 .85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.5vw, 4.25rem);
  letter-spacing: -0.055em;
  line-height: .92;
  color: var(--ink);
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--ink-2);
  max-width: 16ch;
}
.hero-lede {
  margin: .95rem 0 1.35rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 32rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .65rem; }

.visual-stack {
  background: var(--terminal);
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(16, 20, 28, 0.18);
}
.visual-chrome {
  display: flex;
  gap: .35rem;
  align-items: center;
  padding: .65rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.visual-chrome span {
  width: .55rem; height: .55rem; border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.visual-chrome span:nth-child(1) { background: #ff5f57; }
.visual-chrome span:nth-child(2) { background: #febc2e; }
.visual-chrome span:nth-child(3) { background: #28c840; }
.visual-body {
  padding: 1.1rem 1.15rem 1.2rem;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.75;
  color: var(--terminal-fg);
}
.visual-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visual-line.muted { color: rgba(232,237,245,.42); }
.visual-line.dim { color: rgba(232,237,245,.62); }
.visual-line.ok { color: #5dcea4; }
.visual-line .prompt { color: #7ea0ff; margin-right: .4rem; }

.meta-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
}
.meta-rail div {
  padding: .9rem 1.05rem;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.meta-rail div:last-child { border-right: 0; }
.meta-rail span {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.meta-rail strong {
  display: block;
  margin-top: .3rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: .68rem 1rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.install-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .7rem .65rem .9rem;
  background: var(--terminal);
  color: var(--terminal-fg);
  border-radius: var(--radius);
  max-width: 100%;
  min-width: 0;
}
.install-chip.tall { width: 100%; }
.install-chip .prompt {
  color: #7ea0ff;
  font-weight: 600;
  flex: 0 0 auto;
}
.install-chip code {
  flex: 1 1 auto;
  min-width: 0;
  font-size: .84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.copy-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: .35rem .6rem;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: .8rem;
  line-height: 1.2;
}
.copy-btn:hover { background: rgba(255,255,255,.08); }
.copy-btn.is-copied { border-color: rgba(93,206,164,.45); color: #5dcea4; }

.section-board { padding-bottom: var(--space-5); }
.section-topics { padding: 0 0 var(--space-6); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-3);
  gap: var(--space-3);
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  font-size: 1.3rem;
  line-height: 1.2;
}
.section-head a {
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}

.board {
  background: var(--surface);
  border: 1px solid var(--line);
}
.board-head {
  padding: 1rem 1.1rem .8rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.board-title-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: .7rem;
}
.board-title-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.board-search { min-width: 0; }
.board-search input,
.search-hero input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .55rem .8rem;
  width: min(260px, 100%);
  background: var(--surface);
  outline: none;
  line-height: 1.3;
}
.board-search input:focus,
.search-hero input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 89, 255, 0.12);
}
.board-tabs {
  display: flex;
  gap: .15rem;
  flex-wrap: wrap;
  margin: 0;
}
.tab {
  padding: .4rem .7rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--muted);
  box-shadow: inset 0 -2px 0 transparent;
  line-height: 1.2;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.board-table { min-width: 0; }
.board-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.6fr) minmax(0, .85fr) 4.8rem 5rem;
  gap: .65rem;
  align-items: center;
  padding: .8rem 1.1rem;
  border-top: 1px solid var(--line);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.board-row > * { min-width: 0; }
a.board-row:hover { background: rgba(43, 89, 255, 0.03); }
.board-row-head {
  border-top: 0;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--paper-2);
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  padding-top: .65rem;
  padding-bottom: .65rem;
}
.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.filter-chip:hover { border-color: var(--line-strong); }
.filter-chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--accent-ink);
}
.rank {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .88rem;
  color: var(--rank);
  line-height: 1.2;
}
.rank.is-1 { color: var(--rank-1); }
.rank.is-2 { color: var(--rank-2); }
.rank.is-3 { color: var(--rank-3); }
.skill-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .4rem;
  row-gap: .15rem;
}
.skill-name {
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.skill-desc {
  flex: 1 0 100%;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
  margin: 0;
}
.source-cell {
  color: var(--ink-2);
  font-size: .82rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity {
  color: var(--accent);
  display: flex;
  justify-content: flex-start;
}
.spark { display: block; max-width: 100%; }
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.2;
}
.installs { color: var(--accent-ink); }
.pill {
  display: inline-flex;
  align-items: center;
  padding: .1rem .35rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-2);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}
.more-from-row {
  border-top: 1px solid var(--line);
  background: rgba(43, 89, 255, 0.025);
}
.more-from {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: .55rem 1.1rem;
  color: var(--accent-ink);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}
.more-from:hover { text-decoration: underline; }
.more-from em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.board-empty { padding: 1.75rem 1.1rem; color: var(--muted); }
.board-empty [role="cell"] { padding: 0; }

.pager,
.load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .85rem;
  margin-top: var(--space-3);
  color: var(--muted);
  font-weight: 600;
  flex-wrap: wrap;
}
.load-more-wrap { flex-direction: column; gap: .75rem; }
.load-more-btn[disabled] { opacity: .55; cursor: wait; }
.pager a { color: var(--accent-ink); font-weight: 700; }

.topic-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.topic-rail a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .65rem;
  padding: .95rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.topic-rail a:hover { background: rgba(43, 89, 255, 0.03); }
.topic-rail strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
  min-width: 0;
}
.topic-rail span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .8rem;
  flex: 0 0 auto;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
}
.topic-grid.large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem 1.15rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 6.25rem;
}
.topic-card:hover { background: rgba(43, 89, 255, 0.03); }
.topic-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.topic-card span,
.topic-card p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
  line-height: 1.45;
}

.page-block { padding: var(--space-5) 0 var(--space-6); }
.page-hero { margin-bottom: var(--space-4); }
.page-hero h1,
.skill-page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.page-hero > p {
  margin: .7rem 0 0;
  color: var(--ink-2);
  max-width: 46rem;
  line-height: 1.5;
}
.muted { color: var(--muted); }
.result-meta {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-weight: 600;
}
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .7rem;
  line-height: 1.2;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  font-size: .86rem;
  margin: 0 0 1.1rem;
  line-height: 1.3;
}
.crumbs a { color: var(--accent-ink); font-weight: 600; }

.skill-page { padding: var(--space-5) 0 var(--space-6); }
.skill-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .9fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  align-items: start;
}
.skill-hero > div:first-child { min-width: 0; }
.skill-hero h1 { margin: .15rem 0 .75rem; }
.skill-lede {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  color: var(--ink-2);
  max-width: 40rem;
  line-height: 1.55;
}
.skill-summary-block {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
}
.skill-summary-block h2 {
  margin: 0 0 .55rem;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.2;
}
.skill-summary-body {
  color: var(--ink-2);
  line-height: 1.55;
  max-width: none;
}
.skill-summary-body p { margin: 0; }
.summary-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: .4rem;
}
.summary-list li { padding-left: .1rem; }

.skill-jump {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: -.35rem 0 1.25rem;
  padding: .55rem 0;
  position: sticky;
  top: var(--header-h);
  z-index: 4;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.skill-jump a {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-2);
  padding: .28rem .55rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  line-height: 1.2;
}
.skill-jump a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.skill-page #summary,
.skill-page #install,
.skill-page #audits,
.skill-page #related,
.skill-page #skill-md,
.skill-page #details,
.skill-page #alternatives {
  scroll-margin-top: calc(var(--header-h) + 3.25rem);
}

.btn-compact {
  padding: .45rem .75rem;
  font-size: .84rem;
}

.decision-strip {
  display: grid;
  gap: .75rem;
  margin: 0 0 1rem;
  padding: .85rem .95rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
}
.decision-verdict {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .28rem .6rem;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.verdict-solid { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.verdict-ok { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-ink); }
.verdict-neutral { background: var(--paper); color: var(--ink-2); }
.verdict-mixed { background: color-mix(in srgb, #c47b1a 14%, var(--surface)); color: #8a5608; }
.verdict-caution { background: color-mix(in srgb, var(--fail) 14%, var(--surface)); color: var(--fail); }
.decision-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: .55rem .75rem;
}
.decision-metrics li {
  display: grid;
  gap: .15rem;
  min-width: 0;
}
.decision-k {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.decision-metrics strong {
  font-size: .92rem;
  line-height: 1.25;
  word-break: break-word;
}
.decision-audit-pass,
.decision-fresh-active { color: var(--ok); }
.decision-audit-fail,
.decision-fresh-archived { color: var(--fail); }
.decision-audit-mixed,
.decision-fresh-stale,
.decision-fresh-quiet { color: #8a5608; }
.decision-audit-none,
.decision-fresh-unknown { color: var(--ink-2); }
.decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .85rem;
  align-items: center;
}
.decision-note {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
  max-width: 28rem;
}

/* Topic chips on skill hero */
.skill-topics {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .7rem 0 1rem;
}
.skill-topic-chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  line-height: 1.2;
}
.skill-topic-chip:hover {
  border-color: var(--line-strong);
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

/* Shared discovery rails (similar + alternatives) */
.discover-rail,
.alternatives-rail,
.similar-rail {
  margin-top: var(--space-5);
  padding: 1.1rem 1.15rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}
.alternatives-rail {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}
.discover-rail-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.discover-rail-head h2,
.alternatives-head h2 {
  margin: 0 0 .35rem;
}
.discover-rail-head .section-lede {
  margin: 0;
  max-width: 42rem;
}
.discover-rail-grid,
.alternatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: .65rem;
  margin-top: .95rem;
}
.discover-card,
.alternative-card {
  display: grid;
  gap: .35rem;
  padding: .9rem 1rem .85rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  align-content: start;
}
.alternatives-rail .discover-card {
  background: color-mix(in srgb, var(--surface) 88%, white);
}
.discover-card:hover,
.alternative-card:hover {
  border-color: var(--line-strong);
}
.discover-card-top,
.alternative-top {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  align-items: flex-start;
}
.discover-card-top strong,
.alternative-top strong {
  font-size: .98rem;
  line-height: 1.3;
  padding-right: .15rem;
}
.discover-why,
.alternative-why {
  flex: 0 0 auto;
  max-width: 7.5rem;
  margin: .05rem 0 0;
  padding: .18rem .4rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  line-height: 1.2;
  text-align: right;
}
.discover-source,
.alternative-source {
  color: var(--muted);
  font-size: .78rem;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: .82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-card em,
.alternative-card em {
  margin-top: .2rem;
  font-style: normal;
  font-weight: 700;
  font-size: .84rem;
  color: var(--ink);
}
.discover-compare-hint,
.alternatives-compare-hint {
  margin: .9rem 0 0;
  color: var(--muted);
  font-size: .86rem;
}
.discover-compare-hint .text-link,
.alternatives-compare-hint .text-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

/* Declared agent chips near decision */
.skill-agent-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .4rem;
  margin: .85rem 0 0;
}
.skill-agent-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: .15rem;
}
.skill-agent-chip {
  display: inline-flex;
  align-items: center;
  padding: .22rem .55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 700;
}
.skill-agent-more {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent-ink);
  margin-left: .15rem;
}

/* Same-package siblings */
.package-siblings {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.package-siblings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.package-siblings-head h2 { margin: 0 0 .35rem; }
.package-siblings-head .section-lede { margin: 0; max-width: 40rem; }
.package-siblings-head .section-lede strong {
  font-weight: 800;
  color: var(--ink);
}
.package-install {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  padding: .4rem .5rem .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
}
.package-install code {
  font-size: .78rem;
  font-family: var(--font-mono);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(22rem, 55vw);
}
.package-install .copy-btn {
  border-color: var(--line-strong);
  color: var(--ink-2);
  background: var(--surface);
}
.package-install .copy-btn:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--accent-ink);
}
.package-install .copy-btn.is-copied {
  border-color: var(--ok-ring);
  color: var(--ok);
}
.package-sibling-list {
  margin-top: 0;
}
.package-siblings-more {
  margin: .75rem 0 0;
  font-size: .9rem;
}

.compare-page .compare-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin: 0 0 .85rem;
  color: var(--muted);
  font-weight: 600;
}
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
  font-size: .9rem;
}
.compare-table th,
.compare-table td {
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.compare-table thead th {
  background: var(--paper);
  font-size: .92rem;
}
.compare-table tbody th {
  width: 7.5rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 700;
  background: color-mix(in srgb, var(--paper) 70%, var(--surface));
}
.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: 0; }
.compare-source {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.compare-sub {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.compare-empty { margin-top: 1rem; }
.compare-missing { margin-top: 1rem; }

.compare-tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -10px 28px rgba(18, 21, 26, 0.1);
}
.compare-tray-inner {
  display: flex;
  gap: .85rem;
  align-items: center;
  justify-content: space-between;
}
.compare-tray-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-width: 0;
  flex: 1 1 auto;
}
.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .45rem .3rem .55rem;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  max-width: 14rem;
}
.compare-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  padding: 0 .15rem;
}
.compare-tray-actions {
  display: flex;
  gap: .45rem;
  flex: 0 0 auto;
  align-items: center;
}
.compare-tray-actions .btn.is-disabled,
.btn.is-disabled {
  opacity: .45;
  pointer-events: auto;
  cursor: not-allowed;
}
body.has-compare-tray {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}
body.has-compare-tray .mobile-install-bar {
  bottom: calc(3.85rem + env(safe-area-inset-bottom, 0px));
}
body.has-compare-tray .skill-page {
  padding-bottom: calc(var(--space-6) + 8rem + env(safe-area-inset-bottom, 0px));
}

.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + var(--bottom-chrome, 0rem) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: .4rem;
  width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}
.toast {
  padding: .7rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(18, 21, 26, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(6px); }

.skill-details-fold {
  margin-top: var(--space-5);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
}
.skill-details-fold > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: .95rem;
  padding: .9rem 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.skill-details-fold > summary::-webkit-details-marker { display: none; }
.skill-details-fold > summary::after {
  content: '+';
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 600;
}
.skill-details-fold[open] > summary::after { content: '−'; }
.skill-details-body {
  padding: .15rem 1.05rem 1.15rem;
  border-top: 1px solid var(--line);
}
.skill-details-body > .agent-matrix,
.skill-details-body > .skill-mirrors,
.skill-details-body > .repo-health,
.skill-details-body > .skill-frontmatter,
.skill-details-body > .skill-files,
.skill-details-body > .skill-history {
  margin-top: 1.25rem;
}
.skill-details-body > :first-child { margin-top: 1rem; }

.mobile-install-bar {
  display: none;
}
.skill-meta {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: .82rem;
  margin: 0;
}
.skill-spark-wrap {
  margin-top: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
}
.install-panel {
  padding: 1.05rem;
  border: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: calc(var(--header-h) + .75rem);
  min-width: 0;
}
.install-panel h2 {
  margin: 0 0 .7rem;
  font-size: .92rem;
  line-height: 1.2;
}
.install-links {
  display: grid;
  gap: .45rem;
  margin-top: .85rem;
}
.text-link {
  display: inline-flex;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.3;
}
.text-link:hover { text-decoration: underline; }

.skill-md {
  white-space: pre-wrap;
  background: var(--terminal);
  color: var(--terminal-fg);
  padding: 1.1rem;
  overflow: auto;
  max-height: 38rem;
  font-size: .84rem;
  line-height: 1.55;
  margin: 0;
}
.skill-md-rendered {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.15rem 1.25rem;
  overflow: auto;
  max-height: 42rem;
}
.skill-md-rendered > :first-child { margin-top: 0; }
.skill-md-rendered h1,
.skill-md-rendered h2,
.skill-md-rendered h3,
.skill-md-rendered h4,
.skill-md-rendered h5,
.skill-md-rendered h6 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 1.15rem 0 .45rem;
  line-height: 1.2;
}
.skill-md-rendered h1 { font-size: 1.3rem; }
.skill-md-rendered h2 { font-size: 1.1rem; }
.skill-md-rendered h3 { font-size: 1.02rem; }
.skill-md-rendered h4,
.skill-md-rendered h5,
.skill-md-rendered h6 { font-size: .95rem; font-weight: 700; }
.skill-md-rendered p,
.skill-md-rendered li { color: var(--ink-2); }
.skill-md-rendered p { margin: .55rem 0; }
.skill-md-rendered code {
  background: var(--paper);
  padding: .05rem .28rem;
  font-size: .88em;
}
.skill-md-rendered pre {
  background: var(--terminal);
  color: var(--terminal-fg);
  padding: .9rem;
  overflow: auto;
  margin: .75rem 0;
}
.skill-md-rendered pre code { background: transparent; padding: 0; color: inherit; }
.skill-md-rendered blockquote {
  margin: .75rem 0;
  padding: .4rem 0 .4rem .85rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.skill-md-rendered ul,
.skill-md-rendered ol {
  padding-left: 1.25rem;
  margin: .55rem 0;
}
.skill-md-rendered ol { list-style: decimal; }
.skill-md-rendered ul { list-style: disc; }
.skill-md-rendered li { margin: .2rem 0; }
.skill-md-rendered a { color: var(--accent-ink); font-weight: 700; }
.skill-md-rendered hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.1rem 0;
}
.skill-md-rendered img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: .75rem 0;
}
.skill-md-rendered del { color: var(--muted); }
.skill-md-rendered .md-task-list { list-style: none; padding-left: .15rem; }
.skill-md-rendered .md-task {
  display: flex;
  gap: .45rem;
  align-items: flex-start;
}
.skill-md-rendered .md-task input { margin-top: .35rem; }
.skill-md-rendered .md-table-wrap {
  overflow-x: auto;
  margin: .85rem 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.skill-md-rendered .md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  line-height: 1.4;
}
.skill-md-rendered .md-table th,
.skill-md-rendered .md-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.skill-md-rendered .md-table th {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 70%, var(--paper));
  white-space: nowrap;
}
.skill-md-rendered .md-table tr:last-child td { border-bottom: 0; }
.skill-md-rendered .md-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.audit-grid,
.mini-list { display: grid; gap: .5rem; }
.audit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .65rem;
  gap: .65rem;
}
.audit-card,
.mini-list a {
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.audit-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .75rem;
  border-radius: 6px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.audit-card:hover {
  transform: translateY(-1px);
}
.audit-badge {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  line-height: 0;
}
.audit-card-copy {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.audit-card-copy strong {
  font-size: .95rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-status {
  color: var(--muted);
  font-size: .82rem;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.audit-pass {
  background: linear-gradient(180deg, #fff 0%, var(--ok-soft) 100%);
  border-color: var(--ok-ring);
}
.audit-pass .audit-badge {
  color: var(--ok);
  background: rgba(20, 122, 69, 0.12);
  box-shadow: inset 0 0 0 1px var(--ok-ring);
}
.audit-pass .audit-status { color: #1f6b45; }
.audit-fail {
  background: linear-gradient(180deg, #fff 0%, var(--fail-soft) 100%);
  border-color: var(--fail-ring);
}
.audit-fail .audit-badge {
  color: var(--fail);
  background: rgba(192, 57, 43, 0.12);
  box-shadow: inset 0 0 0 1px var(--fail-ring);
}
.audit-fail .audit-status { color: #9b2f24; }
.mini-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  min-width: 0;
}
.mini-list a:hover { background: rgba(43, 89, 255, 0.03); }
.mini-list a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-list em {
  color: var(--accent-ink);
  font-style: normal;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: .84rem;
  flex: 0 0 auto;
}
.related,
.skill-audits,
.skill-videos,
.skill-body,
.repo-health,
.skill-frontmatter,
.related-graph,
.skill-files,
.skill-history,
.agent-matrix,
.skill-mirrors { margin-top: var(--space-5); }
.related h2,
.skill-audits h2,
.skill-videos h2,
.skill-body h2,
.repo-health h2,
.skill-frontmatter h2,
.related-graph h2,
.skill-files h2,
.skill-history h2,
.agent-matrix h2,
.skill-mirrors h2 {
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-size: 1.2rem;
  line-height: 1.2;
}
.skill-videos .section-lede {
  margin: -.35rem 0 .85rem;
  color: var(--muted);
  font-size: .92rem;
  max-width: 40rem;
}
.section-lede {
  margin: -.35rem 0 .85rem;
  color: var(--muted);
  font-size: .92rem;
  max-width: 42rem;
}
.badge-warn {
  color: #9b2f24;
  font-weight: 700;
}
.text-ok { color: var(--ok); }
.text-warn { color: var(--fail); }

.health-grid,
.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.75rem, 1fr));
  gap: .5rem;
  align-items: stretch;
}
.health-card,
.fm-card {
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .22rem;
  min-width: 0;
}
.health-label,
.fm-card > span {
  color: var(--muted);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  line-height: 1.2;
}
.health-card strong,
.fm-card strong {
  font-size: .95rem;
  line-height: 1.25;
  word-break: break-word;
}
.fm-card.wide { grid-column: span 2; }
.fm-card code,
.health-card code {
  font-family: var(--font-mono);
  font-size: .86rem;
  font-weight: 600;
}

/* Keep repo health + following summary visually tight */
.repo-health {
  margin-bottom: 0;
}
.repo-health + .skill-frontmatter,
.repo-health + .skill-summary-block,
.skill-frontmatter + .skill-summary-block {
  margin-top: 1.15rem;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: .85rem;
}
.chip-row-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: .2rem;
}
.info-chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .55rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
}
.fm-more {
  margin-top: .85rem;
  border-top: 1px solid var(--line);
  padding-top: .65rem;
}
.fm-more summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-ink);
}
.fm-dl {
  margin: .65rem 0 0;
  display: grid;
  gap: .45rem;
}
.fm-dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: .75rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--line);
}
.fm-dl dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.fm-dl dd { margin: 0; font-size: .9rem; word-break: break-word; }

.related-hub {
  display: grid;
  gap: .85rem;
}
.related-hub-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: .55rem 1rem;
  border: 1px solid var(--accent);
  background: rgba(43, 89, 255, 0.06);
  border-radius: 999px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.related-graph-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
.related-node {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  padding: .85rem .9rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  min-width: 0;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background-color .2s var(--ease);
}
.related-node:hover {
  border-color: var(--accent);
  background: rgba(43, 89, 255, 0.03);
  transform: translateY(-1px);
}
.related-node-name {
  font-weight: 700;
  line-height: 1.25;
}
.related-node-source {
  color: var(--muted);
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-node em {
  color: var(--accent-ink);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
}

.file-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}
.file-tree-item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: baseline;
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--line);
}
.file-tree-item:last-child { border-bottom: 0; }
.file-kind {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  color: var(--muted);
}
.file-tree-item.kind-skill_md .file-kind { color: var(--accent-ink); }
.file-tree-item.kind-script .file-kind { color: #1f6b45; }
.file-tree-item.kind-reference .file-kind { color: #8a5a12; }
.file-path {
  font-family: var(--font-mono);
  font-size: .84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-bytes {
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line-strong);
}
.history-list li {
  position: relative;
  padding: 0 0 .85rem 1.1rem;
  display: grid;
  gap: .15rem;
}
.history-list li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: .35rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper);
}
.history-list time {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.history-list span {
  font-weight: 600;
  line-height: 1.35;
}

.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 .65rem;
}
.install-tab {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 999px;
  padding: .28rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.install-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.install-chip.compact {
  margin-top: .45rem;
  padding: .5rem .55rem .5rem .7rem;
  display: flex;
  gap: .45rem;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 6px;
  color: var(--ink);
  max-width: 100%;
}
.install-chip.compact code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  font-family: var(--font-mono);
  color: var(--ink);
  line-height: 1.35;
}
.install-chip.compact .copy-btn {
  border-color: var(--line-strong);
  color: var(--ink-2);
  background: var(--surface);
}
.install-chip.compact .copy-btn:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--accent-ink);
}
.install-chip.compact .copy-btn.is-copied {
  border-color: var(--ok-ring);
  color: var(--ok);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}
.agent-cell {
  display: flex;
  gap: .55rem;
  align-items: center;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
}
.agent-cell.is-supported {
  border-color: var(--ok-ring);
  background: linear-gradient(180deg, #fff 0%, var(--ok-soft) 100%);
}
.agent-status {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.agent-cell.is-supported .agent-status {
  color: var(--ok);
  background: rgba(20, 122, 69, 0.12);
}
.agent-cell.is-unknown .agent-status {
  color: var(--muted);
  background: var(--paper-2);
}
.agent-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 999px;
  background: currentColor;
  opacity: .45;
}
.agent-cell strong {
  display: block;
  font-size: .9rem;
  line-height: 1.2;
}
.agent-cell span {
  color: var(--muted);
  font-size: .75rem;
}

.mirror-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.mirror-card {
  padding: .85rem .95rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
}
.mirror-reg {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  color: var(--muted);
}
.mirror-card a,
.mirror-card > strong {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-card.deep {
  flex-direction: column;
  align-items: stretch;
  gap: .55rem;
}
.audit-card-head {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.audit-analyzed,
.audit-alerts {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
}
.audit-summary {
  margin: 0;
  font-size: .86rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.audit-score-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.audit-score-bars li {
  display: grid;
  grid-template-columns: 5.8rem 1fr 2rem;
  gap: .45rem;
  align-items: center;
  font-size: .72rem;
  text-transform: capitalize;
  color: var(--muted);
}
.audit-score-bars .bar {
  height: .35rem;
  border-radius: 999px;
  background: rgba(18, 21, 26, 0.08);
  overflow: hidden;
}
.audit-score-bars .bar i {
  display: block;
  height: 100%;
  background: var(--ok);
  border-radius: inherit;
}
.audit-fail .audit-score-bars .bar i { background: var(--fail); }
.audit-score-bars em {
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-2);
  text-align: right;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.video-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-width: 0;
}
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #0e1116;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}
.video-thumb img,
.video-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
}
.video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(18, 21, 26, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.video-thumb:hover .video-play,
.video-thumb:focus-visible .video-play {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}
.video-kind {
  position: absolute;
  left: .55rem;
  top: .55rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-2);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.video-meta a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.35;
}
.video-meta a:hover { color: var(--accent-ink); }
@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.search-hero {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .85rem;
  align-items: center;
}
.search-hero input { flex: 1 1 220px; }
.page-hero .lede {
  margin: .35rem 0 0;
  color: var(--ink-2);
  max-width: 36rem;
}
.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
}
.search-toolbar .result-meta { margin: 0; }
.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .75rem;
  align-items: center;
}
.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .2rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .65rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--ink-2);
  text-decoration: none;
  font-size: .86rem;
  line-height: 1.2;
}
.filter-chip:hover { color: var(--ink); background: var(--surface); }
.filter-chip.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.sort-label select {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius);
  padding: .4rem .65rem;
  font: inherit;
  color: var(--ink);
}
.search-empty {
  padding: 1.4rem 0 0.5rem;
}
.search-empty h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0 0 .7rem;
  font-size: 1.25rem;
}
.search-empty p { color: var(--ink-2); margin: 0 0 .9rem; }
.search-empty .muted { color: var(--muted); font-size: .92rem; }
.search-empty code {
  font-family: var(--font-mono);
  font-size: .84em;
  background: var(--paper-2);
  padding: .1rem .35rem;
}
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}
.search-chip {
  display: inline-flex;
  padding: .4rem .75rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-size: .9rem;
}
.search-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.search-board .board-row {
  grid-template-columns: 3.2rem minmax(0, 1fr) minmax(8rem, 14rem) 5.5rem;
}
.page-hero .board-tabs { margin-top: .95rem; }
.prose-page .prose { max-width: 42rem; }
.prose-page .prose > :first-child { margin-top: 0; }
.prose h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 1.6rem 0 .55rem;
}
.prose p, .prose li { color: var(--ink-2); }
.prose pre {
  background: var(--terminal);
  color: var(--terminal-fg);
  padding: .9rem 1rem;
  overflow: auto;
  margin: .75rem 0;
}
.pack-note {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--paper-2);
  margin-bottom: 1.25rem;
}
.pack-note strong { display: block; margin-bottom: .2rem; }
.pack-note p { margin: 0; color: var(--ink-2); }

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-5) 0 var(--space-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.footer-brand { margin-bottom: .5rem; }
.footer-copy {
  margin: 0;
  color: var(--muted);
  max-width: 18rem;
  line-height: 1.45;
}
.site-footer h3 {
  margin: 0 0 .5rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.site-footer a {
  display: block;
  color: var(--ink-2);
  font-weight: 600;
  margin: .22rem 0;
  line-height: 1.35;
}
.site-footer a:hover { color: var(--accent-ink); }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
}

.flash-wrap { width: var(--shell); margin: .65rem auto 0; }
.flash {
  padding: .7rem .9rem;
  background: #e8eefc;
  color: var(--accent-ink);
  font-weight: 700;
  border: 1px solid rgba(43, 89, 255, 0.2);
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + var(--bottom-chrome, 0rem) + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--ink-2);
  padding: 0;
}
.to-top.is-visible { display: inline-flex; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto auto; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { padding: var(--space-5) 0 var(--space-3); }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .hero-visual { order: -1; max-width: 420px; }
  .meta-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-rail div:nth-child(2n) { border-right: 0; }
  .meta-rail div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .board-row { grid-template-columns: 2.4rem minmax(0, 1fr) 4.2rem; }
  .search-board .board-row { grid-template-columns: 2.4rem minmax(0, 1fr) 4.2rem; }
  .hide-sm { display: none !important; }
  .topic-rail,
  .topic-grid,
  .topic-grid.large,
  .audit-grid,
  .video-grid,
  .health-grid,
  .fm-grid,
  .related-graph-grid,
  .agent-grid,
  .mirror-grid,
  .footer-grid,
  .skill-hero {
    grid-template-columns: 1fr;
  }
  .fm-card.wide { grid-column: auto; }
  .file-tree-item {
    grid-template-columns: 5.2rem minmax(0, 1fr);
  }
  .file-bytes { display: none; }
  .install-panel { position: static; }
  .mobile-install-bar {
    display: flex;
    align-items: center;
    gap: .65rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: .7rem max(.85rem, calc((100% - var(--shell)) / 2 + .25rem)) calc(.7rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -8px 24px rgba(18, 21, 26, 0.08);
  }
  .mobile-install-bar code {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink-2);
  }
  .mobile-install-bar .btn {
    flex: 0 0 auto;
    padding: .55rem .85rem;
    font-size: .84rem;
  }
  .skill-page {
    padding-bottom: calc(var(--space-6) + 4.25rem);
  }
}
@media (max-width: 640px) {
  .hide-md { display: none !important; }
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: .45rem .65rem;
    padding-top: .45rem;
    padding-bottom: .55rem;
  }
  .header-search {
    grid-column: 1 / -1;
    width: 100%;
  }
  .header-search input {
    width: 100%;
    min-width: 0;
  }
  --shell: min(1120px, calc(100% - 1.2rem));
  .brand-lockup { font-size: 2.35rem; }
  .home-top { padding-bottom: var(--space-4); margin-bottom: var(--space-4); }
  .more-from { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .package-siblings-head {
    flex-direction: column;
    align-items: stretch;
  }
  .package-install { width: 100%; }
  .package-install code {
    max-width: none;
    flex: 1 1 auto;
  }
  .discover-rail-grid,
  .alternatives-grid {
    grid-template-columns: 1fr;
  }
}
