/* rseng-agent-skills website. Plain, readable pages: graphite ink on a light
   green-grey background, one legibility-first type family. Colour is reserved
   for the three lifecycle phases because it carries data there. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Text colours are 6.8:1 or better on every surface in both themes; phase
   colours are Okabe-Ito, the colour-blind-safe set researchers use in figures. */
/* --topbar-h is measured by main.js, since the nav wraps on narrow screens */
:root {
  --topbar-h: 3.5rem;
  color-scheme: light;
  --paper: #f4f7f2;
  --surface-1: #ffffff;
  --surface-2: #e6ece2;
  --rule: #cfd8ca;
  --ink: #141b16;
  --ink-2: #333d36;
  --muted: #46524a;
  --link: #0a5562;
  --phase-start: #0072b2;
  --phase-during: #d55e00;
  --phase-finish: #b2588f; /* Okabe-Ito reddish purple, deepened to 3:1 on the paper */
  --router: #141b16;
  --edge: #a9bba3;
  --code-bg: #e6ece2;
  --warn: #b3261e;
  --sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  --measure: 68ch;
  /* type scale: every font size on the site is one of these steps */
  --fs-2xs: 0.8125rem;
  --fs-xs: 0.85rem;
  --fs-s: 0.875rem;
  --fs-m: 0.9375rem;
  --fs-base: 1.0rem;
  --fs-l: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --field: #6f8468; /* form field border, 3:1 or better on every surface */
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23435047' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --paper: #111a15;
    --surface-1: #17221c;
    --surface-2: #1f2c25;
    --rule: #2d3d34;
    --ink: #eef3ee;
    --ink-2: #c9d4cb;
    --muted: #a9b8ad;
    --link: #7fd0dd;
    --phase-start: #56b4e9;
    --phase-during: #f0884a;
    --phase-finish: #e3a0c6;
    --router: #eef3ee;
    --edge: #3a4d42;
    --code-bg: #1f2c25;
    --warn: #ff8f80;
    --field: #6b8073;
    --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b1c0b5' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111a15;
  --surface-1: #17221c;
  --surface-2: #1f2c25;
  --rule: #2d3d34;
  --ink: #eef3ee;
  --ink-2: #c9d4cb;
  --muted: #a9b8ad;
  --link: #7fd0dd;
  --phase-start: #56b4e9;
  --phase-during: #f0884a;
  --phase-finish: #e3a0c6;
  --router: #eef3ee;
  --edge: #3a4d42;
  --code-bg: #1f2c25;
  --warn: #ff8f80;
  --field: #6b8073;
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b1c0b5' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { font-size: 106.25%; } /* 17px base */
html, body { margin: 0; }
body {
  overflow-wrap: break-word;
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--code-bg); padding: 0.08em 0.32em; border-radius: 3px; overflow-wrap: anywhere; }
/* a link that is a name (skill, command) reads as a link, in the code font, not as a code sample */
a > code:only-child { background: none; padding: 0; color: inherit; }
pre { background: var(--code-bg); padding: 0.85rem 1rem; border-radius: 6px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--phase-start) 30%, transparent); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: 2.4rem; line-height: 1.12; margin: 0.4rem 0 0.7rem; }
h2 { font-size: var(--fs-2xl); line-height: 1.25; margin: 2.6rem 0 0.8rem; }
h3 { font-size: var(--fs-l); line-height: 1.3; margin: 1.4rem 0 0.5rem; }
h4 { font-size: var(--fs-m); margin: 1.1rem 0 0.35rem; color: var(--ink-2); }
.lede { color: var(--ink-2); font-size: var(--fs-l); max-width: var(--measure); margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-s); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 50; left: 0.75rem; top: 0.75rem; width: auto; height: auto; clip: auto; padding: 0.5rem 0.8rem; background: var(--ink); color: var(--paper); border-radius: 6px; }

/* ---------- frame ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.55rem 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand b { font-family: var(--mono); font-size: var(--fs-base); }
.nav { display: flex; gap: 0.1rem; flex-wrap: wrap; }
.nav a {
  padding: 0.35rem 0.65rem; border-radius: 6px; text-decoration: none;
  color: var(--ink-2); font-size: var(--fs-m);
}
.nav a:hover { background: var(--surface-2); }
.nav a.active, .nav-more summary.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
/* secondary pages: a small menu, so the bar keeps to the five main ones */
.nav-more { position: relative; }
.nav-more summary {
  list-style: none; display: flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.65rem; border-radius: 6px;
  color: var(--ink-2); font-size: var(--fs-m); width: auto;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: ""; width: 0.4rem; height: 0.4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-0.15rem) rotate(45deg); }
.nav-more[open] summary::after { transform: translateY(0.1rem) rotate(-135deg); }
.nav-more summary:hover { background: var(--surface-2); }
.nav-more[open] summary { margin-bottom: 0; }
.nav-more-list {
  position: absolute; z-index: 30; top: calc(100% + 0.35rem); left: 0; min-width: 11rem; display: grid; gap: 0.1rem;
  padding: 0.35rem; background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 8px 28px rgb(10 20 40 / 14%);
}
.nav-more-list a { display: block; }
.nav-more-list a.active { box-shadow: inset 2px 0 0 var(--ink); }
.topbar .spacer { flex: 1; }
.theme-btn {
  width: 2.2rem; height: 2.2rem; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--rule); background: var(--surface-1); color: var(--ink);
}
.theme-btn:hover { border-color: var(--ink-2); background: var(--surface-2); }
.theme-btn svg { width: 1.15rem; height: 1.15rem; }
.theme-btn:focus-visible { border-radius: 50%; }
.btn-quiet {
  border: 1px solid var(--rule); background: var(--surface-1); color: var(--ink-2);
  border-radius: 6px; padding: 0.3rem 0.65rem; cursor: pointer; font: inherit; font-size: var(--fs-s);
}
.btn-quiet:hover { border-color: var(--ink-2); color: var(--ink); }

main { max-width: 1440px; margin: 0 auto; padding: 1.75rem clamp(1rem, 3vw, 2.5rem) 1rem; }
main.wide { max-width: none; }
main:focus { outline: none; }
footer {
  max-width: 1440px; margin: 3rem auto 0; padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 2rem;
  color: var(--muted); font-size: var(--fs-s); border-top: 1px solid var(--rule);
}

.panel { background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 1.1rem 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* ---------- controls ---------- */
input[type="search"], textarea, select {
  font: inherit; color: var(--ink); background-color: var(--surface-1);
  border: 1.5px solid var(--field); border-radius: 8px; padding: 0.6rem 0.8rem;
}
input[type="search"] { background-image: var(--search-icon); background-repeat: no-repeat; background-position: 0.75rem 50%; background-size: 1.1rem; padding-left: 2.4rem; }
input[type="search"]::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="search"]:hover, textarea:hover, select:hover { border-color: var(--ink-2); }
input[type="search"]:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 30%, transparent); }
.btn {
  font: inherit; border: 1px solid var(--ink); border-radius: 8px; padding: 0.6rem 1.1rem; cursor: pointer;
  background: var(--ink); color: var(--paper); font-weight: 600;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--rule); background: var(--surface-1); color: var(--ink-2);
  border-radius: 6px; padding: 0.22rem 0.65rem; font-size: var(--fs-s); cursor: pointer;
  font-family: inherit; text-decoration: none; max-width: 100%; text-align: left;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:disabled { cursor: default; opacity: 0.5; border-style: dashed; }
.chip:disabled:hover { border-color: var(--rule); color: var(--ink-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.9rem 0 1.1rem; }
.toolbar input[type="search"] { flex: 1 1 15rem; min-width: 0; }
/* "/" jumps to search from anywhere (main.js); the hint shows where a keyboard is likely */
.search-wrap { position: relative; display: flex; flex: 1 1 15rem; min-width: 0; }
.search-wrap input[type="search"] { flex: 1; width: 100%; padding-right: 2.6rem; }
.kbd-hint {
  position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); border: 1px solid var(--rule); border-bottom-width: 2px;
  border-radius: 4px; padding: 0 0.4rem; background: var(--surface-1); line-height: 1.5;
}
.search-wrap input:focus ~ .kbd-hint, .search-wrap input:not(:placeholder-shown) ~ .kbd-hint { display: none; }
@media (hover: none), (max-width: 700px) { .kbd-hint { display: none; } }

/* ---------- phase marks (colour never alone: always with a text label) ---------- */
.phase-dot { width: 0.62rem; height: 0.62rem; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 22%); }
.phase-Start { background: var(--phase-start); fill: var(--phase-start); }
.phase-During { background: var(--phase-during); fill: var(--phase-during); }
.phase-Finish { background: var(--phase-finish); fill: var(--phase-finish); }
.phase-router { background: var(--router); fill: var(--router); }
.tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: var(--fs-xs); color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 4px; padding: 0.05rem 0.45rem;
}
.badge-privacy { border-color: color-mix(in srgb, var(--warn) 55%, transparent); color: var(--warn); }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: start; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; margin-top: 0.2rem; max-width: 14em; }
.hero .lede { font-size: var(--fs-l); }
.hero-search { display: flex; margin: 1.6rem 0 0.7rem; border-radius: 12px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.hero-search .search-wrap { flex: 1; }
.hero-search input { flex: 1; min-width: 0; font-size: var(--fs-l); padding: 0.85rem 1rem 0.85rem 2.7rem; background-position: 0.9rem 50%; background-size: 1.25rem;
  border: 2px solid var(--ink); border-right: 0; border-radius: 12px 0 0 12px; }
.hero-search .btn { border-radius: 0 12px 12px 0; padding: 0 1.3rem; font-size: var(--fs-base); }
/* install band: the one inverted block on the page, full width under the hero */
.install-band { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 1.4rem 1.5rem 1.5rem; margin: 2.2rem 0 0.5rem; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.install-band a { color: var(--paper); text-decoration-color: color-mix(in srgb, var(--paper) 50%, transparent); }
.install-band :focus-visible { outline-color: var(--paper); }
.install-band-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin-bottom: 1rem; }
.install-band-head h2 { margin: 0; font-size: var(--fs-2xl); color: var(--paper); letter-spacing: -0.02em; }
.install-band-head p { margin: 0; opacity: 0.92; }
.install-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.25rem; align-items: start; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 0.5rem; }
.agent-tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 0 0.6rem; align-items: center; text-align: left;
  font: inherit; color: var(--paper); cursor: pointer; padding: 0.65rem 0.7rem; border-radius: 10px;
  background: transparent; border: 1px solid color-mix(in srgb, var(--paper) 50%, transparent); /* 3:1 or better in both themes */
}
.agent-tile .agent-icon { grid-row: 1 / 3; width: 1.6rem; height: 1.6rem; }
.agent-name { font-weight: 700; font-size: var(--fs-m); line-height: 1.2; }
.agent-hint { font-size: var(--fs-2xs); opacity: 0.92; line-height: 1.25; }
.agent-tile:hover { border-color: var(--paper); }
.agent-tile[aria-checked="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.agent-tile[aria-checked="true"] .agent-hint { opacity: 0.92; }
.install-panel { background: color-mix(in srgb, var(--paper) 7%, var(--ink)); border: 1px solid color-mix(in srgb, var(--paper) 16%, transparent); border-radius: 12px; padding: 1rem 1.1rem; display: grid; gap: 0.75rem; }
.install-panel-head { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.install-panel-head .agent-icon { width: 1.35rem; height: 1.35rem; }
.install-panel-head strong { font-size: var(--fs-base); }
.install-panel-head span { opacity: 0.92; font-size: var(--fs-s); }
.install-variants { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.install-variants button {
  font: inherit; font-size: var(--fs-xs); cursor: pointer; padding: 0.2rem 0.65rem; border-radius: 6px;
  color: var(--paper); background: transparent; border: 1px solid color-mix(in srgb, var(--paper) 50%, transparent);
}
.install-variants button:hover { border-color: var(--paper); }
.install-variants button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 700; }
.install-links code { background: color-mix(in srgb, var(--paper) 14%, transparent); color: var(--paper); }
.install-term { display: flex; align-items: flex-start; gap: 0.6rem; background: var(--ink); border: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); border-radius: 8px; padding: 0.75rem 0.6rem 0.75rem 0.9rem; }
/* one command per line, never broken mid-word: long ones scroll sideways */
.install-term pre { flex: 1; min-width: 0; margin: 0; padding: 0 0 0.2rem; background: none; white-space: pre; overflow-x: auto; scrollbar-width: thin; }
.install-term code { background: none; padding: 0; color: var(--paper); font-size: var(--fs-m); line-height: 1.65; }
.install-copy {
  flex: none; font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; padding: 0.3rem 0.8rem; border-radius: 6px;
  background: var(--paper); color: var(--ink); border: 0;
}
.install-copy:hover { background: var(--surface-2); text-decoration: underline; }
.install-note { margin: 0; font-size: var(--fs-s); opacity: 0.92; }
.install-gets { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; font-size: var(--fs-s); }
.install-gets li { display: inline-flex; align-items: center; gap: 0.4rem; }
.install-gets .mark { width: 0.95rem; height: 0.95rem; border-radius: 3px; position: relative; border: 1.5px solid currentColor; flex: none; }
.install-gets .has .mark { background: var(--paper); border-color: var(--paper); }
.install-gets .has .mark::after { content: ""; position: absolute; left: 0.25rem; top: 0.06rem; width: 0.26rem; height: 0.5rem; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.install-links { margin: 0; font-size: var(--fs-s); }
@media (max-width: 860px) { .install-layout { grid-template-columns: minmax(0, 1fr); } }
/* let a long command scroll inside its box instead of widening the panel */
.install-panel { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 700px) {
  .install-band { padding: 1.1rem 0.9rem 1rem; }
  .install-band .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .install-band .agent-tile { padding: 0.5rem 0.55rem; }
  .install-term { flex-direction: column; align-items: stretch; }
  .install-copy { align-self: flex-start; }
}

/* the one loud element: a project on graph paper, wired to the real trigger rules */
.bench {
  border: 1px solid var(--rule); border-radius: 12px; overflow: hidden;
  background-color: var(--surface-1);
 
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.bench-head { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule); background: var(--surface-1); font-size: var(--fs-s); color: var(--ink-2); }
.bench-head strong { color: var(--ink); font-size: var(--fs-base); }
.tree { list-style: none; margin: 0; padding: 0.8rem 0.6rem 1rem; font-family: var(--mono); font-size: var(--fs-s); border-right: 1px solid var(--rule); }
.tree li { margin: 0; }
.tree .dir { color: var(--muted); padding: 0.3rem 0.5rem 0.1rem; }
.tree button {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left;
  font: inherit; color: var(--ink-2); background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 0.28rem 0.5rem; cursor: pointer;
}
.tree button.nested { padding-left: 1.5rem; }
.tree button::before {
  content: ""; width: 0.8rem; height: 0.8rem; flex: none; border-radius: 3px;
  border: 1.5px solid var(--edge); background: var(--surface-1);
}
.tree button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface-1) 80%, transparent); }
.tree button[aria-pressed="true"] { color: var(--ink); background: var(--surface-1); border-color: var(--rule); }
.tree button[aria-pressed="true"]::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface-1); }
.fired { padding: 0.8rem 1rem 1rem; display: grid; gap: 0.45rem; align-content: start; min-height: 22rem; }
.fired-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.1rem 0.6rem; align-items: baseline;
  background: var(--surface-1); border: 1px solid var(--rule); border-radius: 8px; padding: 0.5rem 0.7rem;
}
.fired-row .phase-dot { transform: translateY(-0.05rem); }
.fired-row a { font-family: var(--mono); font-size: var(--fs-s); font-weight: 600; }
.fired-row .why { grid-column: 2; font-size: var(--fs-xs); color: var(--muted); }
.fired-new { animation: land 0.35s ease-out; }
@keyframes land { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fired-foot { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.2rem; }

/* ---------- icons and shared cards ---------- */
.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.12em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 0.75rem; }
.skill-card {
  display: flex; flex-direction: column; gap: 0.35rem; min-height: 9.5rem;
  background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px;
  padding: 0.8rem 0.9rem 0.7rem; color: inherit; text-decoration: none;
}
.skill-card:hover { border-color: var(--ink-2); }
.skill-card:hover .card-name { text-decoration: underline; text-decoration-color: var(--edge); }
.card-top { display: flex; align-items: center; gap: 0.4rem; font-size: var(--fs-xs); color: var(--muted); }
.card-ring { margin-left: auto; color: var(--ink-2); display: inline-flex; }
.card-name { font-family: var(--mono); font-weight: 700; font-size: var(--fs-base); color: var(--ink); line-height: 1.25; word-break: break-word; }
.card-name .prefix { font-weight: 400; color: var(--muted); font-size: 0.82em; }
.card-brief { font-size: var(--fs-s); color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-snippet { font-size: var(--fs-xs); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-facts { margin-top: auto; padding-top: 0.45rem; border-top: 1px dashed var(--rule); display: flex; gap: 0.9rem; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.card-facts span { display: inline-flex; align-items: center; gap: 0.25rem; }

/* ---------- home: how a session runs, all four steps at once ---------- */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 1.2rem 0 0; }
.hero-actions .btn { text-decoration: none; }
.session-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.session-steps li {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1rem 2rem; align-items: start;
  padding: 1.1rem 0; border-bottom: 1px solid var(--rule);
}
.session-steps li:first-child { padding-top: 0.2rem; }
.session-text { display: flex; gap: 0.8rem; align-items: flex-start; }
.session-text h3 { margin: 0.15rem 0 0.3rem; font-size: var(--fs-base); }
.session-text p { margin: 0; color: var(--ink-2); font-size: var(--fs-m); max-width: 40ch; }
.session-steps .num {
  width: 1.9rem; height: 1.9rem; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: var(--fs-s);
}
.session-note { margin: 0.8rem 0 0; max-width: var(--measure); }
.sheet { font-size: var(--fs-s); border: 1px solid var(--rule); border-radius: 8px; background-color: var(--surface-1); max-width: 34rem; }
.sheet-name { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); padding: 0.4rem 0.7rem; border-bottom: 1px solid var(--rule); background: var(--surface-1); border-radius: 8px 8px 0 0; }
.sheet-row { display: grid; grid-template-columns: auto 7.5rem minmax(0, 1fr); gap: 0.6rem; align-items: center; padding: 0.4rem 0.7rem; }
.sheet-row code { background: none; padding: 0; font-weight: 700; }
.gate { display: grid; gap: 0.5rem; max-width: 38rem; }
.gate-row { display: grid; grid-template-columns: minmax(0, 14rem) 2.5rem minmax(0, 1fr); gap: 0.6rem; align-items: center; font-size: var(--fs-s); padding: 0.45rem 0.6rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-1); }
.gate-mark { height: 2px; background: var(--phase-finish); position: relative; }
.gate-mark::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--phase-finish); border-right: 0; }
.gate-row.held .gate-mark { background: var(--warn); width: 50%; }
.gate-row.held .gate-mark::after { right: -3px; top: -7px; width: 3px; height: 16px; border: 0; background: var(--warn); }
.gate-row.held { border-color: color-mix(in srgb, var(--warn) 45%, var(--rule)); }
.flow { display: grid; grid-template-columns: minmax(0, auto) 2rem minmax(0, auto) 2rem minmax(0, auto); align-items: center; gap: 0.5rem; justify-content: start; }
.flow-col { display: grid; gap: 0.35rem; justify-items: start; }
.flow-label { font-size: var(--fs-xs); color: var(--muted); }
.flow-chip { max-width: 100%; display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: var(--fs-xs); padding: 0.25rem 0.55rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface-1); }
.flow-chip.file { background: var(--surface-2); }
.flow-arrow { height: 2px; background: var(--edge); position: relative; }
.flow-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--edge); border-right: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: var(--fs-s); }
.checklist li { display: flex; align-items: center; gap: 0.6rem; }
.checklist .box { width: 1rem; height: 1rem; border: 1.5px solid var(--ink-2); border-radius: 3px; flex: none; position: relative; }
.checklist .ok .box::after { content: ""; position: absolute; left: 0.28rem; top: 0.05rem; width: 0.3rem; height: 0.55rem; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checklist .todo .box { border-color: var(--warn); }
.checklist .maybe .box { border-style: dashed; border-color: var(--edge); }
@media (max-width: 760px) {
  .session-steps li { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { width: 2px; height: 1.2rem; margin-left: 1rem; }
  .flow-arrow::after { right: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 7px solid var(--edge); border-bottom: 0; }
  .gate-row { grid-template-columns: 1fr; }
  .gate-mark { display: none; }
}

/* ---------- area tiles (home, lifecycle) ---------- */
.facts { color: var(--ink-2); max-width: var(--measure); }
.area-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 0.6rem; }
.area-tile, .lc-area {
  display: flex; flex-direction: column; gap: 0.35rem; text-align: left;
  background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 0.7rem 0.8rem;
  color: var(--ink); text-decoration: none; font: inherit; cursor: pointer;
}
.area-tile:hover, .lc-area:hover { border-color: var(--ink-2); }
.area-name { font-weight: 700; font-size: var(--fs-m); line-height: 1.25; }
.area-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.area-dots .phase-dot { width: 0.7rem; height: 0.7rem; }

/* ---------- browse ---------- */
.filters { display: grid; gap: 0.6rem; margin-bottom: 0.5rem; }
.area-chips .chip { font-size: var(--fs-xs); }
.area-select { display: none; }
.area-select select { width: 100%; }
@media (max-width: 700px) {
  .area-chips { display: none; }
  .area-select { display: block; }
}
.chip .muted { color: var(--muted); }
.chip[aria-pressed="true"] .muted { color: inherit; }
.legend-line { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; margin: 0.2rem 0 0; }
.fact-key { display: inline-flex; align-items: center; gap: 0.3rem; }
#count { margin-left: auto; }
.area-block { scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.group-head { display: flex; align-items: center; gap: 0.6rem; margin: 2rem 0 0.75rem; }
.group-head h2 { margin: 0; font-size: var(--fs-xl); }
.group-head .muted { font-size: var(--fs-s); }
mark { background: color-mix(in srgb, var(--phase-during) 26%, transparent); color: inherit; border-radius: 2px; padding: 0 0.1em; }
.empty { padding: 2rem 1rem; color: var(--ink-2); max-width: var(--measure); }

/* ---------- skill detail ---------- */
.skill-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
@media (max-width: 920px) { .skill-layout { grid-template-columns: 1fr; } }
.crumbs { font-size: var(--fs-s); color: var(--muted); }
.crumbs a { color: var(--muted); }
.skill-title { font-family: var(--mono); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; word-break: break-word; }
.skill-lede { font-size: var(--fs-xl); line-height: 1.4; color: var(--ink); max-width: var(--measure); margin: 0.9rem 0 1.2rem; }
.when { background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 0.9rem 1.1rem; max-width: var(--measure); }
.when h2 { font-size: var(--fs-base); margin: 0 0 0.3rem; }
.when p { margin: 0.35rem 0; }
.side { display: grid; gap: 1.4rem; font-size: var(--fs-s); }
.side h2 { font-size: var(--fs-base); margin: 0 0 0.4rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule); }
.side ul { list-style: none; padding: 0; margin: 0; }
.side li { padding: 0.3rem 0; }
.side .reason { display: block; color: var(--muted); font-size: var(--fs-xs); }
.side li[hidden] { display: none; }
.show-all { margin-top: 0.3rem; }
.agent-wording { margin: 0.5rem 0 0.6rem; }
.agent-wording summary { font-size: var(--fs-s); }
.agent-wording p { color: var(--ink-2); }
.skill-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 2.5rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.skill-pager a { display: grid; gap: 0.15rem; padding: 0.7rem 0.9rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface-1); text-decoration: none; color: var(--ink); }
.skill-pager a:hover { border-color: var(--ink-2); }
.skill-pager .pager-next { text-align: right; justify-items: end; }
.pager-name { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-weight: 700; }
.refs { list-style: none; padding: 0; max-width: var(--measure); }
.refs li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.refs .url { display: block; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); word-break: break-all; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--rule); margin: 2rem 0 1.2rem; }
.tabs button {
  font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 0.5rem 0.8rem; color: var(--ink-2); cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.mini-map { width: 100%; height: auto; aspect-ratio: 300 / 290; display: block; overflow: visible; }

/* ---------- knowledge map ---------- */
/* fills the window below the bar once scrolled to; a phone keeps room around it to scroll the page */
.map-wrap { position: relative; height: calc(100svh - var(--topbar-h) - 2rem); max-height: 56rem; min-height: 26rem; padding: 0; overflow: hidden; border-radius: 12px; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
@media (max-width: 700px) { .map-wrap { height: 70svh; min-height: 22rem; } }
/* the map handles its own touch gestures: one finger pans, two pinch-zoom */
.map-wrap svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.zoom-group { display: inline-flex; gap: 0.3rem; }
.zoom-group .btn-quiet { min-width: 2.2rem; }
.map-wrap svg.dragging { cursor: grabbing; }
.edge { stroke: var(--edge); stroke-width: 1; stroke-opacity: 0.6; fill: none; }
.edge.hot { stroke: var(--ink-2); stroke-opacity: 1; stroke-width: 2; }
.node circle { stroke: var(--surface-1); stroke-width: 2; cursor: pointer; }
.node.throughout circle.ring { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
/* --lk is 1/zoom (set by map.js), so labels stay one size on screen */
.node text {
  font-size: calc(12px * var(--lk, 1)); fill: var(--ink-2); pointer-events: none; font-family: var(--sans);
  paint-order: stroke; stroke: var(--surface-1); stroke-width: calc(3px * var(--lk, 1)); stroke-linejoin: round;
}
.node text.label-off { opacity: 0; }
.node.hot text, .node:hover text, .node:focus-visible text { opacity: 1; }
.node:focus { outline: none; }
.node:focus-visible circle { stroke: var(--link); stroke-width: 3; }
.node.hot text { fill: var(--ink); font-weight: 600; }
.map-dim { opacity: 0.12; }
.cluster-label {
  font-family: var(--sans); font-size: calc(14px * var(--lk, 1)); font-weight: 700; fill: var(--muted); text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke: var(--surface-1); stroke-width: calc(4px * var(--lk, 1));
}
.cluster-hull { fill: var(--paper); stroke: var(--rule); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: var(--fs-s); margin: 0.6rem 0 0; color: var(--ink-2); }
.legend div { display: flex; align-items: center; gap: 0.45rem; }
.legend .ring, .ring-key { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1.5px dashed var(--ink); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; max-width: 300px;
  background: var(--surface-1); border: 1px solid var(--rule); border-radius: 8px;
  padding: 0.55rem 0.75rem; box-shadow: 0 6px 24px rgb(10 20 40 / 14%); font-size: var(--fs-s);
}
.tooltip .t { font-family: var(--mono); font-weight: 600; }
.tooltip .d { color: var(--ink-2); }
.map-help { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- lifecycle ---------- */
.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-top: 1.5rem; }
.lc-phase { display: flex; flex-direction: column; gap: 0.5rem; }
.lc-head { display: flex; align-items: center; gap: 0.6rem; position: relative; }
.lc-phase:not(:nth-child(3)) .lc-head::after { content: ""; flex: 1; height: 2px; background: var(--edge); margin-right: -1.5rem; }
.lc-step { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-s); flex: none; }
.lc-head h2 { margin: 0; display: flex; align-items: center; gap: 0.45rem; font-size: var(--fs-xl); }
.lc-phase > p { margin: 0; }
.lc-areas { display: grid; gap: 0.5rem; }
.lc-area[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.lc-session { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; border: 1.5px dashed var(--edge); border-radius: 10px; padding: 0.7rem 0.9rem; }
.lc-session-label { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; }
.lc-detail .cards { margin-top: 0.25rem; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
  .lc-phase .lc-head::after { display: none; }
}

/* ---------- signals ---------- */
.signal-result { display: grid; gap: 0.5rem; }
table.plain { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
table.plain th, table.plain td { text-align: left; padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.plain th { color: var(--ink-2); font-weight: 600; font-size: var(--fs-s); border-bottom-color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
textarea { width: 100%; min-height: 7rem; font-family: var(--mono); font-size: var(--fs-s); }

/* ---------- triggers flow ---------- */
.sankey-wrap { overflow-x: auto; }
.sankey { position: relative; display: grid; grid-template-columns: repeat(3, minmax(9rem, 1fr)); gap: 0 3.5rem; min-width: 34rem; padding: 0.5rem 0; }
.sankey-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sk-col { display: flex; flex-direction: column; gap: 0.4rem; position: relative; }
.sk-col > div { display: flex; flex-direction: column; gap: 0.4rem; justify-content: center; flex: 1; }
.sk-node { display: inline-flex; align-items: center; gap: 0.4rem; width: fit-content; max-width: 100%; font-size: var(--fs-s); padding: 0.3rem 0.6rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface-1); position: relative; }
.sk-node code { background: none; padding: 0; }
.sk-node.idle { opacity: 0.8; border-style: dashed; }
.sk-line { fill: none; stroke: var(--edge); stroke-width: 1.5; }
.sankey.tracing .sk-line { opacity: 0.2; }
.sankey.tracing .sk-line.hot { opacity: 1; stroke: var(--ink-2); stroke-width: 2; }
.sankey.tracing .sk-node:not(.hot) { opacity: 0.6; }
.sankey.empty-flow::after { content: "No matches yet: add a file path above."; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--muted); font-size: var(--fs-s); }
.flow-text { margin-top: 0.8rem; }
details summary { cursor: pointer; color: var(--link); font-size: var(--fs-m); width: fit-content; }
details[open] summary { margin-bottom: 0.6rem; }

/* ---------- commands and subagents ---------- */
/* cards differ a lot in length: columns pack them without empty space inside short ones */
.tool-grid { columns: 300px; column-gap: 0.9rem; margin-top: 1.25rem; }
.tool-card { break-inside: avoid; margin-bottom: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 0.95rem 1rem; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.tool-card.target { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tool-card h2 { margin: 0; font-size: var(--fs-base); }
.tool-card h2 code { background: none; padding: 0; font-size: 1em; }
.tool-desc { margin: 0; color: var(--ink-2); font-size: var(--fs-m); }
.tool-access { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-size: var(--fs-xs); }
.tool-skills { list-style: none; margin: 0; padding: 0.5rem 0 0; border-top: 1px dashed var(--rule); display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: var(--fs-s); }
.tool-skills a { display: inline-flex; align-items: center; gap: 0.3rem; }
.tool-src { margin-top: auto; }
.tool-card[hidden] { display: none; }
.cap-matrix tr.faded { color: var(--muted); }
.cap-matrix tr.faded .cap-mark.yes { background: var(--muted); border-color: var(--muted); }
.tool-card.hover { border-color: var(--ink); }
.finder { margin: 1.25rem 0 1rem; }
.finder h2 { margin: 0 0 0.6rem; font-size: var(--fs-l); }
.finder-result { margin: 0.6rem 0 0; color: var(--ink-2); min-height: 1.4em; }
.mini-steps { list-style: none; counter-reset: step; margin: 0.2rem 0; padding: 0; display: grid; gap: 0.3rem; position: relative; }
.mini-steps::before { content: ""; position: absolute; left: 0.62rem; top: 0.7rem; bottom: 0.7rem; border-left: 1.5px solid var(--rule); }
.mini-steps li { counter-increment: step; position: relative; display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: 0.55rem; font-size: var(--fs-s); color: var(--ink-2); line-height: 1.35; }
.mini-steps li::before {
  content: counter(step); width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-1); border: 1.5px solid var(--ink-2); font-size: var(--fs-2xs); font-weight: 700; color: var(--ink); position: relative;
}
.files-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.4rem; font-size: var(--fs-xs); }
.files-verb { color: var(--muted); margin-right: 0.1rem; }
.files-verb:not(:first-child) { margin-left: 0.5rem; }
.file-chip { font-family: var(--mono); padding: 0.1rem 0.45rem; border-radius: 4px; border: 1px solid var(--rule); overflow-wrap: anywhere; }
.file-chip.written { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.file-chip.checked { border-style: dashed; border-color: var(--ink-2); }
.file-chip.report { font-family: var(--sans); background: var(--surface-2); }
.cap-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 0.8rem; font-size: var(--fs-s); }
.cap-list li { display: flex; align-items: center; gap: 0.4rem; }
.cap-list li.no { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--edge); }
.cap-mark { width: 0.9rem; height: 0.9rem; border-radius: 50%; flex: none; border: 1.5px solid var(--ink); }
.cap-mark.yes { background: var(--ink); }
.cap-mark.no { border-style: dashed; border-color: var(--edge); }
.cap-matrix { margin: 0.5rem 0 0.5rem; }
.cap-matrix td { text-align: center; }
.cap-matrix th[scope="col"]:not(:first-child) { text-align: center; }
.cap-matrix td .cap-mark { display: inline-block; vertical-align: middle; }
.cap-matrix tbody tr:hover { background: var(--surface-1); }

/* ---------- GitHub and sponsor ---------- */
.gh-link { display: inline-flex; align-items: center; color: var(--ink); padding: 0.3rem; border-radius: 6px; }
.gh-link:hover { background: var(--surface-2); }
.gh-link .gh-icon { width: 1.4rem; height: 1.4rem; }
.gh-icon { width: 1.1rem; height: 1.1rem; flex: none; }
.gh-stars { display: inline-flex; align-items: center; gap: 0.2rem; font-variant-numeric: tabular-nums; padding-left: 0.4rem; border-left: 1px solid var(--rule); }
.gh-stars[hidden] { display: none; }
.star-icon { width: 0.85rem; height: 0.85rem; }
.oss-band { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; margin: 3rem 0 1rem; padding: 1.4rem 1.5rem; border: 1px solid var(--rule); border-radius: 14px; background-color: var(--surface-1); }
.oss-main h2 { margin: 0 0 0.4rem; }
.oss-main p { margin: 0 0 1rem; max-width: var(--measure); color: var(--ink-2); }
.oss-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.oss-actions a { text-decoration: none; }
.gh-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--paper); }
.gh-btn .gh-stars { border-left-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.sponsor { background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.1rem; align-self: start; }
.sponsor h3 { margin: 0 0 0.5rem; font-size: var(--fs-s); color: var(--muted); font-weight: 600; }
.sponsor-mark { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.01em; }
.sponsor-mark:hover span { text-decoration: underline; }
.sponsor-mark img { height: 2.2rem; width: auto; max-width: 9rem; }
.sponsor p { margin: 0.6rem 0 0; color: var(--ink-2); }
footer p { margin: 0.3rem 0; }
@media (max-width: 760px) { .oss-band { grid-template-columns: 1fr; } }

/* ---------- features ---------- */
.feature-filter { margin: 1.25rem 0 0.5rem; }
.feature-filter .agent-tile { color: var(--ink); background: var(--surface-1); border-color: var(--rule); }
.feature-filter .agent-tile:hover { border-color: var(--ink-2); }
.feature-filter .agent-tile[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.feature-filter .agent-tile:not(:has(svg)) .agent-name { grid-column: 1 / -1; }
.feature-filter .agent-tile:not(:has(svg)) .agent-hint { grid-column: 1 / -1; }
.feature-group[hidden], .feature-card[hidden] { display: none; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 0.8rem; }
.feature-card { display: flex; flex-direction: column; gap: 0.5rem; background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 0.95rem 1rem; }
.feature-card h3 { margin: 0; font-size: var(--fs-base); }
.feature-desc { margin: 0; color: var(--ink-2); font-size: var(--fs-m); }
.feature-card p { margin: 0; }
.feature-files { display: flex; flex-wrap: wrap; gap: 0.3rem; font-size: var(--fs-xs); }
.feature-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.feature-links a { display: inline-flex; align-items: center; gap: 0.3rem; }
.feature-agents { margin-top: auto; padding-top: 0.5rem; border-top: 1px dashed var(--rule); display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: var(--fs-xs); color: var(--muted); }
.works-with { display: inline-flex; align-items: center; gap: 0.3rem; }
.works-with .agent-icon { width: 1rem; height: 1rem; }
.works-all { font-weight: 700; color: var(--ink-2); }

/* ---------- compare ---------- */
.compare-cols { margin-top: 1.5rem; }
.examples { margin-top: 0.6rem; }
.tooltip a { pointer-events: auto; }
.compare-pick { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.compare-pick select { font-family: var(--mono); font-size: var(--fs-s); max-width: 100%; }
.cmp-link { display: grid; grid-template-columns: minmax(0, auto) minmax(6rem, 1fr) minmax(0, auto); gap: 1rem; align-items: center; margin: 1.25rem 0; }
.cmp-node { min-width: 0; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.7rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-1); }
.cmp-arrows { display: grid; gap: 0.6rem; }
.cmp-arrow { display: grid; gap: 0.15rem; font-size: var(--fs-xs); color: var(--ink-2); }
.cmp-arrow.left { text-align: right; }
.cmp-arrow svg { width: 100%; height: 12px; }
.cmp-arrow path { fill: none; stroke: var(--ink-2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.cmp-arrow.none path { stroke: var(--edge); stroke-dasharray: 4 4; }
.cmp-arrow.none span { color: var(--muted); }
.venns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1rem; }
.venn-block { background: var(--surface-1); border: 1px solid var(--rule); border-radius: 10px; padding: 0.9rem 1rem; }
.venn-block h3 { margin: 0 0 0.4rem; font-size: var(--fs-base); }
.venn { width: 100%; max-width: 240px; display: block; }
.venn circle { stroke-width: 1.5; }
.venn-a { fill: color-mix(in srgb, var(--ink) 7%, transparent); stroke: var(--ink-2); }
.venn-b { fill: color-mix(in srgb, var(--ink) 7%, transparent); stroke: var(--ink-2); stroke-dasharray: 5 3; }
.venn text { font-size: 18px; font-weight: 700; fill: var(--ink); text-anchor: middle; font-family: var(--sans); }
.venn-keys { margin: 0.5rem 0; }
.venn-list { margin: 0; padding-left: 1.1rem; }
.compare-col h2 { margin-top: 0; font-family: var(--mono); font-size: var(--fs-l); }
.compare-col ol { padding-left: 1.2rem; }
@media (max-width: 700px) {
  .cmp-link { grid-template-columns: 1fr; }
  .cmp-arrow svg { display: none; }
}

/* ---------- skill page visuals ---------- */
.parts { list-style: none; padding: 0; margin: 0 0 1rem; max-width: var(--measure); }
.parts li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.part-head { display: flex; align-items: baseline; gap: 0.75rem; }
.part-head h3 { margin: 0; font-size: var(--fs-base); }
.part-head .muted { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.parts p { margin: 0.3rem 0 0; color: var(--ink-2); font-size: var(--fs-m); }
.phase-track { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.6rem 0 0.2rem; }
.phase-track > span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--fs-xs); color: var(--muted); padding: 0.15rem 0.55rem; border: 1px dashed var(--rule); border-radius: 4px; }
.phase-track > span.on { color: var(--ink); border: 1.5px solid var(--ink); font-weight: 700; }
.phase-track > span.session { border-style: dotted; }
.outline { display: flex; gap: 3px; height: 1.6rem; margin: 0 0 0.3rem; max-width: var(--measure); }
.outline button { flex-basis: 0; min-width: 6px; border: 0; padding: 0; border-radius: 3px; background: var(--surface-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--rule); }
.outline button:nth-child(even) { background: var(--rule); }
.outline button:hover { background: var(--ink-2); }
.outline-caption { margin: 0 0 1rem; min-height: 1.3em; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 700px) {
  /* brand and buttons on one row, the five sections and More on the next */
  .topbar { position: relative; flex-wrap: wrap; gap: 0.2rem 0.5rem; padding: 0.45rem 0.75rem 0.3rem; }
  .topbar .nav { order: 5; flex-basis: 100%; gap: 0; margin: 0 -0.3rem; }
  .nav a, .nav-more summary { padding: 0.35rem 0.42rem; font-size: var(--fs-s); }
  .nav-more { position: static; }
  .nav-more-list { left: auto; right: 0.75rem; }
  main { padding: 1.1rem 1rem; }
  h1 { font-size: 1.9rem; }
  .bench { grid-template-columns: 1fr; }
  .tree { border-right: 0; border-bottom: 1px solid var(--rule); }
  .fired { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- glossary terms ---------- */
.term { position: relative; border-bottom: 1.5px dotted var(--ink-2); cursor: help; }
.term:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.term-def {
  display: none; position: absolute; z-index: 30; left: 0; top: calc(100% + 0.4rem); width: min(22rem, 80vw);
  padding: 0.55rem 0.7rem; border-radius: 8px; background: var(--ink); color: var(--paper);
  font-size: var(--fs-s); font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
}
.term:hover .term-def, .term:focus .term-def, .term:focus-within .term-def { display: block; }
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 0.5rem 2rem; margin: 0.5rem 0 0; }
.glossary div { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0.2rem 0 0; color: var(--ink-2); font-size: var(--fs-m); }

/* ---------- skill questions, compare chain ---------- */
.asks { margin-top: 1.2rem; max-width: var(--measure); }
.asks h2 { font-size: var(--fs-base); margin: 0 0 0.4rem; }
.asks ul { margin: 0 0 0.4rem; padding-left: 1.2rem; }
.asks li { margin: 0.2rem 0; }
.chain { margin: 1rem 0 1.5rem; }
.chain h2 { font-size: var(--fs-l); margin: 0 0 0.6rem; }
.chain-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; justify-items: start; }
.chain-node { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.65rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-1); }
.chain-link { padding: 0.15rem 0 0.15rem 1.1rem; margin-left: 0.9rem; border-left: 2px solid var(--edge); }
.chain-none { margin: 0.5rem 0 1rem; }
.glossary-section { margin-top: 2.5rem; }

/* ---------- what's new ---------- */
.release { max-width: var(--measure); padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.release h2 { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.release-date { font-size: var(--fs-m); font-weight: 400; }
.release h3 { font-size: var(--fs-base); margin: 1rem 0 0.3rem; color: var(--ink-2); }
.release li { margin: 0.35rem 0; }
.search-note { margin: 0 0 0.8rem; color: var(--ink-2); }

/* ---------- check your project ---------- */
.check-results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: start; margin-top: 1rem; }
.check-results .checklist { gap: 0.55rem; }
.check-results .checklist li { flex-wrap: wrap; }
.check-results .checklist .muted { flex-basis: 100%; padding-left: 1.6rem; }
.check-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
.folder-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0.6rem 0; }
.folder-pick .btn { display: inline-block; }
#folder:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; }
.drop-zone { border-style: dashed; border-width: 1.5px; border-color: var(--field); }
.drop-zone.dragging-over { border-color: var(--ink); background: var(--surface-2); }
.drop-zone p { margin: 0.3rem 0; }
#example-tag[hidden] { display: none; }
@media (max-width: 760px) { .check-results { grid-template-columns: 1fr; } }
