/* Vyebe — pixel-spectrum design system.
   Palette taken from the logo: warm orange/yellow, coral, magenta, purple,
   teal/mint, and deep blue, on a light base. Dark variant at the bottom. */

:root {
  /* brand spectrum */
  --orange: #f7941e;
  --yellow: #ffc62e;
  --coral: #ee4c4c;
  --magenta: #e8258f;
  --purple: #8e2bb0;
  --violet: #5b2d90;
  --teal: #14a8a8;
  --teal-bright: #22c3c3;
  --mint: #2bab8f;
  --blue: #1c56a8;
  --navy: #16367a;

  --grad: linear-gradient(100deg, var(--orange), var(--magenta) 52%, var(--purple));
  --grad-full: linear-gradient(100deg, var(--yellow), var(--orange) 18%, var(--coral) 34%,
               var(--magenta) 52%, var(--purple) 68%, var(--teal-bright) 86%, var(--blue));

  /* surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --line: #e4e8f2;
  --line-2: #cfd6e6;

  /* text */
  --ink: #16224d;
  --ink-2: #3b4870;
  --muted: #667292;
  --faint: #626c8a;   /* 5.2:1 on white, 4.9:1 on --bg-soft; the old #8e98b3 was 2.9:1 */

  /* buttons: white text needs a deeper start than the brand orange (2.3:1) */
  --grad-btn: linear-gradient(100deg, #c9177a, var(--purple));

  --shadow-sm: 0 1px 2px rgba(22, 34, 77, .06), 0 2px 8px rgba(22, 34, 77, .04);
  --shadow-md: 0 8px 28px rgba(22, 34, 77, .10);
  --shadow-lg: 0 16px 44px rgba(22, 34, 77, .14);

  --accent: var(--blue);       /* overridden per category */
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1180px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* per-category accents, keyed off data-cat */
[data-cat="agents"]     { --accent: var(--blue); }
[data-cat="builders"]   { --accent: var(--orange); }
[data-cat="models"]     { --accent: var(--magenta); }
[data-cat="mcp"]        { --accent: var(--teal); }
[data-cat="infra"]      { --accent: var(--violet); }
[data-cat="ui"]         { --accent: var(--coral); }
[data-cat="guardrails"] { --accent: var(--mint); }

/* project groups */
[data-cat="apps"]        { --accent: var(--violet); }
[data-cat="directories"] { --accent: var(--blue); }
[data-cat="games"]       { --accent: var(--magenta); }
[data-cat="sites"]       { --accent: var(--orange); }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.16rem; font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }
.section { padding: 62px 22px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
/* thin spectrum rule under the header */
.site-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--grad-full); opacity: .9;
}
.head-inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 800; font-size: 1.34rem; letter-spacing: -.02em; display: inline-flex; }
.brand-name span:nth-child(1) { color: var(--orange); }
.brand-name span:nth-child(2) { color: var(--teal); }
.brand-name span:nth-child(3) { color: var(--blue); }
.brand-name span:nth-child(4) { color: var(--navy); }
.brand-name span:nth-child(5) { color: var(--magenta); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.nav a {
  color: var(--muted); font-size: .95rem; font-weight: 600;
  padding: 8px 13px; border-radius: 9px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--magenta); }
/* .nav a used to win over .btn and paint the header CTA in muted gray */
.nav a.btn, .nav a.btn:hover { color: #fff; background: var(--grad-btn); }
.head-inner .head-cta { display: none; }   /* desktop: the CTA lives inside .nav */

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
  background: var(--grad-btn); background-size: 140% 100%;
  color: #fff; font-weight: 700; font-size: .95rem; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 16px rgba(232, 37, 143, .26);
  transition: transform .15s ease, box-shadow .15s ease, background-position .3s ease;
}
.btn:hover {
  text-decoration: none; transform: translateY(-1px);
  background-position: 100% 0;
  box-shadow: 0 8px 26px rgba(232, 37, 143, .34);
}
.btn-sm { padding: 8px 15px; font-size: .88rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-2); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--teal); box-shadow: 0 8px 24px rgba(20, 168, 168, .20); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 74px 0 56px; position: relative; overflow: hidden; }
/* faint pixel grid, echoing the mark */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(22, 34, 77, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 34, 77, .05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000, transparent 75%);
}
.hero-inner { text-align: center; position: relative; }
.hero-mark { margin: 0 auto 26px; width: 132px; height: auto; }
.hero h1 {
  background: var(--grad-full);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.14rem; color: var(--muted); max-width: 650px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note {
  margin-top: 26px; color: var(--faint); font-size: .86rem; font-family: var(--mono);
}

.page-head { padding: 60px 0 16px; position: relative; }
/* accent rule under the lede: on .wrap so it lines up with the text, not the viewport edge */
.page-head .wrap::after {
  content: ""; display: block; width: 72px; height: 5px; border-radius: 3px;
  background: var(--grad); margin-top: 18px;
}
.page-head .lede { margin-left: 0; }
.center-head { text-align: center; padding: 90px 0 60px; }
.center-head .lede { margin-left: auto; margin-right: auto; }
.center-head .wrap::after { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pillars { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: block; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
/* accent bar that fills in on hover */
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform .22s ease;
}
a.card:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: var(--line-2); box-shadow: var(--shadow-md);
}
a.card:hover::before { transform: scaleY(1); }
.card h3 { margin-bottom: .4em; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: .95rem; }
.card .meta { color: var(--faint); font-size: .8rem; font-family: var(--mono); }
.pad { padding: 30px; }

/* ---------------------------------------------------------------- projects */
.grid-proj { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.proj-card { padding: 0; overflow: hidden; }
.proj-card::before { transform: scaleY(1); opacity: .5; }
.proj-card:hover::before { opacity: 1; }
.proj-card:hover {
  transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-md);
}
.proj-shot {
  display: block; border-bottom: 1px solid var(--line);
  background: var(--surface-2); aspect-ratio: 16 / 10; overflow: hidden;
}
.proj-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .35s ease;
}
.proj-card:hover .proj-shot img { transform: scale(1.03); }
.proj-body { padding: 18px 20px 20px; }
.proj-body h3 { margin-bottom: .35em; }
.proj-body h3 a { color: var(--ink); }
.proj-body h3 a:hover { color: var(--accent); text-decoration: none; }
.proj-body p { margin: 0 0 12px; color: var(--muted); font-size: .93rem; }
.proj-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 !important; font-size: .74rem; font-family: var(--mono);
}
.proj-meta .built {
  padding: 3px 9px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
  font-weight: 700;
}
.proj-meta .host { color: var(--faint); }

.pillar h3 a { color: var(--ink); }
.pillar h3 a:hover { color: var(--magenta); }
.pillars .pillar:nth-child(1) { --accent: var(--orange); }
.pillars .pillar:nth-child(2) { --accent: var(--magenta); }
.pillars .pillar:nth-child(3) { --accent: var(--teal); }
.pillars .pillar:nth-child(4) { --accent: var(--violet); }
.pillar::before { transform: scaleY(1); }

.article-card { --accent: var(--magenta); }
.article-card.featured { --accent: var(--purple); }
.article-card::before { transform: scaleY(1); opacity: .35; }
a.article-card:hover::before { opacity: 1; }

.tag {
  display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: .78rem; font-weight: 700;
}
.soon {
  display: inline-block; padding: 2px 9px; border-radius: 6px; white-space: nowrap;
  background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal);
  font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.more { font-size: .92rem; font-weight: 700; white-space: nowrap; color: var(--magenta); }

.band {
  margin: 62px 0 0; padding: 62px 22px; position: relative;
  background: var(--bg-soft);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.band::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px;
  background: var(--grad-full);
}
.band-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.band-inner .form { margin-top: 22px; }

/* ---------------------------------------------------------------- directory */
.filter-bar { padding: 26px 0 10px; position: sticky; top: 68px; background: var(--bg); z-index: 20; }
#res-search {
  width: 100%; max-width: 420px; padding: 11px 15px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px;
  color: var(--ink); font-family: inherit; font-size: .95rem;
}
#res-search::placeholder { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--muted); font-family: inherit; font-size: .86rem; font-weight: 700;
  transition: all .15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--faint); }
.chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.chip[data-filter="all"] { --accent: var(--ink); }
.chip[data-filter="agents"]     { --accent: var(--blue); }
.chip[data-filter="builders"]   { --accent: var(--orange); }
.chip[data-filter="models"]     { --accent: var(--magenta); }
.chip[data-filter="mcp"]        { --accent: var(--teal); }
.chip[data-filter="infra"]      { --accent: var(--violet); }
.chip[data-filter="ui"]         { --accent: var(--coral); }
.chip[data-filter="guardrails"] { --accent: var(--mint); }

.res-section { padding: 42px 0 8px; scroll-margin-top: 150px; }
.res-section h2 { margin-bottom: .3em; color: var(--accent); }
.cat-blurb { color: var(--muted); max-width: 720px; margin: 0 0 22px; font-size: .97rem; }
.res-card h3 { margin-bottom: .35em; }
.no-results { padding: 40px 0; color: var(--muted); text-align: center; }
.updated {
  margin: 54px 0 20px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: .84rem; max-width: 760px;
}

/* ---------------------------------------------------------------- detail pages */
.detail { padding: 44px 22px 70px; max-width: 800px; }
.crumbs { font-size: .85rem; color: var(--faint); margin-bottom: 18px; font-family: var(--mono); }
.crumbs a { color: var(--muted); }
.byline { color: var(--faint); font-size: .86rem; font-family: var(--mono); margin: -6px 0 30px; }

.facts {
  display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 26px 0 34px;
}
.facts > div { background: var(--surface); padding: 15px 18px; }
.facts .k {
  display: block; color: var(--faint); font-size: .71rem;
  text-transform: uppercase; letter-spacing: .09em; font-weight: 800; margin-bottom: 3px;
}
.facts .v { font-size: .94rem; word-break: break-word; }

.toc {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; margin: 0 0 38px;
}
.toc h2 {
  font-size: .73rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--faint); margin: 0 0 12px; font-weight: 800;
}
.toc ol { margin: 0; padding-left: 1.25em; }
.toc li { margin-bottom: 7px; font-size: .94rem; }
.toc li::marker { color: var(--faint); }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--magenta); }

/* wide tables scroll inside their own box rather than the page */
.table-wrap {
  overflow-x: auto; margin: 0 0 1.7em;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table-wrap th {
  text-align: left; background: var(--surface-2); padding: 12px 16px;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table-wrap td {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: top;
}
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:last-child { white-space: nowrap; }

.prose > *:first-child { margin-top: 0; }
.prose h2 { margin: 2em 0 .5em; font-size: 1.45rem; }
.prose h3 { margin: 1.7em 0 .4em; font-size: 1.12rem; color: var(--magenta); }
.prose p { margin: 0 0 1.15em; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.35em; color: var(--ink-2); }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--teal); font-weight: 700; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose code {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: .87em; color: var(--violet);
}
.prose pre {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; overflow-x: auto; margin: 0 0 1.4em;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: .88rem; color: var(--ink); }
.prose blockquote {
  margin: 1.6em 0; padding: 6px 0 6px 22px;
  border-left: 4px solid var(--teal-bright); color: var(--ink); font-size: 1.06rem;
}
.prose blockquote p { margin: 0; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0 1.6em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.callout {
  margin: 44px 0; padding: 26px 28px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--bg-soft);
  position: relative; overflow: hidden;
}
.callout::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad);
}
.callout h3 { margin-bottom: .4em; }
.callout p { color: var(--muted); margin: 0 0 16px; }
.rel-head { margin: 52px 0 20px; font-size: 1.3rem; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 22px 0 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 20px 48px; color: var(--muted); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.steps strong { color: var(--ink); }

/* ---------------------------------------------------------------- forms */
.form { text-align: left; }
.form-intro { color: var(--muted); font-size: .93rem; margin: 0 0 18px; }
.field-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.req { color: var(--magenta); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px;
  color: var(--ink); font-family: inherit; font-size: .96rem; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--magenta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--magenta) 16%, transparent);
}
.field select { appearance: none; cursor: pointer; }
.hp { position: absolute; left: -9999px; }

@media (min-width: 620px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field { grid-column: 1 / -1; }
  .field.half { grid-column: span 1; }
}

/* ---------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 72px; position: relative; }
.site-foot::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--grad-full);
}
.foot-grid {
  display: grid; gap: 34px; padding: 50px 22px 34px;
  grid-template-columns: minmax(240px, 1.6fr) repeat(auto-fit, minmax(140px, 1fr));
}
.foot-brand p { color: var(--muted); font-size: .93rem; margin: 14px 0 0; max-width: 330px; }
.foot-social { display: flex; gap: 14px; margin-top: 14px; font-size: .9rem; }
.foot-col h3 {
  font-size: .86rem; color: var(--faint); margin-bottom: 14px; font-weight: 700;
}
.foot-col a { display: block; color: var(--muted); font-size: .93rem; padding: 4px 0; }
.foot-col a:hover { color: var(--magenta); }
.foot-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 20px 22px 30px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: .84rem;
}
.foot-base p { margin: 0; }
.foot-base a { color: var(--muted); }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 860px) {
  .head-inner { gap: 10px; }
  /* the CTA stays visible beside the menu button instead of hiding inside it */
  .head-inner .head-cta { display: inline-flex; margin-left: auto; min-height: 44px; }
  .nav-toggle { display: flex; margin-left: 0; width: 44px; height: 44px; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 12px 18px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1rem; }
  .nav .btn { margin-top: 10px; justify-content: center; }
  .filter-bar { position: static; }
  .section { padding: 44px 22px; }
  .hero { padding: 48px 0 40px; }
  .hero-mark { width: 100px; }
  .foot-base { flex-direction: column; }
  /* the 240px and 140px minmax floors plus the gap add up to more than a phone
     is wide, and a grid track never shrinks below its floor, so the footer was
     pushing the whole page sideways on every page of the site */
  .foot-grid { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
  .foot-donate { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px) {
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------------------------------------------------------------- dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-soft: #121822;
    --surface: #161d29;
    --surface-2: #1c2534;
    --line: #232d3f;
    --line-2: #33405a;

    --ink: #eef2f9;
    --ink-2: #c2cbdd;
    --muted: #93a0ba;
    --faint: #6f7d99;

    --teal: #2ed3d3;
    --mint: #3ed9b4;
    --blue: #5b9bf0;
    --navy: #7fa8f5;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, .5);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, .6);
  }
  .site-head { background: rgba(13, 17, 23, .86); }
  .hero::before {
    background-image:
      linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  }
  .btn-ghost { background: var(--surface); }
  .chip.active { color: #08101c; }
  .chip[data-filter="all"] { --accent: #e6ecf7; }
  .skip { background: var(--magenta); }
}

/* ---------------------------------------------------------------- companies */
[data-cat="agencies"]    { --accent: var(--orange); }
[data-cat="rescue"]      { --accent: var(--coral); }
[data-cat="educators"]   { --accent: var(--teal); }
[data-cat="communities"] { --accent: var(--violet); }
[data-cat="platforms"]   { --accent: var(--blue); }
.chip[data-filter="agencies"]    { --accent: var(--orange); }
.chip[data-filter="rescue"]      { --accent: var(--coral); }
.chip[data-filter="educators"]   { --accent: var(--teal); }
.chip[data-filter="communities"] { --accent: var(--violet); }
.chip[data-filter="platforms"]   { --accent: var(--blue); }

.co-card .tag { margin-right: 6px; }
.co-featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.co-featured::before { transform: scaleY(1); }
.badge-featured { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.badge-house    { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); }
.badge-verified { background: color-mix(in srgb, var(--mint) 16%, transparent); color: color-mix(in srgb, var(--mint) 60%, var(--ink)); }
.co-head { margin-bottom: 10px; }
.co-head .tag { margin-right: 6px; margin-bottom: 0; }
.co-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -14px 0 30px; }
.co-tools .k {
  color: var(--faint); font-size: .71rem;
  text-transform: uppercase; letter-spacing: .09em; font-weight: 800;
}
a.chip { text-decoration: none; }
.prose p.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.prose p.chips .tag { margin-bottom: 0; }
.callout-alt { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- skills */
.skill-card .tag { display: inline-block; margin-bottom: 10px; }
.skill-card h3 { margin-bottom: .35em; }
.skill-card .meta code {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: .85em;
}
.skill-card[data-search] { --accent: var(--teal); }

.cmd {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin: 14px 0 16px;
}
.cmd-label {
  flex-basis: 100%; color: var(--faint); font-size: .71rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
}
.cmd code {
  flex: 1 1 260px; min-width: 0; overflow-x: auto; white-space: pre;
  font-family: var(--mono); font-size: .86rem; color: var(--ink);
}
.cmd-copy {
  flex: 0 0 auto; cursor: pointer; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); border-radius: 8px;
  padding: 6px 14px; font: inherit; font-size: .8rem; font-weight: 700;
}
.cmd-copy:hover { border-color: var(--accent); color: var(--accent); }
.cmd-copy[data-done] { border-color: var(--mint); color: var(--mint); }

.install-all, .install-one { --accent: var(--teal); margin: 34px 0; }
.install-all h2, .install-one h2 { margin-top: 0; font-size: 1.25rem; }

/* /code. Every colour here is a variable, so the dark block at the bottom of
   this file carries it without a second rule. */
.repo-card { --accent: var(--teal); margin: 0 0 26px; }
.repo-card h2 { margin: 0 0 .15em; font-size: 1.35rem; }
.repo-card h2 a { color: var(--ink); }
.repo-card h2 a:hover { color: var(--accent); }
.repo-title { margin: 0 0 1em; color: var(--ink-2); font-weight: 600; font-size: 1.02rem; }
.repo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.findings { margin: 0 0 1.4em; padding-left: 1.15em; }
.findings li { margin-bottom: .7em; color: var(--muted); }
.ships { margin: 0 0 1em; padding-left: 1.15em; }

.skill-source { margin: 52px 0 0; border-top: 1px solid var(--line); padding-top: 34px; }
.skill-source > h2 { font-size: 1.45rem; margin-bottom: .4em; }
.skill-body {
  margin-top: 26px; padding: 4px 0 0; border-top: 1px solid var(--line);
}
.skill-body h2 { font-size: 1.22rem; margin-top: 1.9em; }
.skill-body h3 { font-size: 1.04rem; }
.skill-body table { font-size: .9rem; }

/* ---------------------------------------------------------------- donate */
:root { --cash: #007a2e; --cash-ink: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root { --cash: #00d54b; --cash-ink: #08140c; }
}
.btn-donate {
  background: var(--cash); color: var(--cash-ink); border: 0;
  display: inline-flex; align-items: center; gap: 9px;
}
.btn-donate:hover { background: var(--cash); color: var(--cash-ink); filter: brightness(1.08); }
.btn-donate .tag {
  background: rgba(255, 255, 255, .22); color: inherit;
  border-radius: 6px; padding: 1px 7px; font-family: var(--mono); font-size: .85em;
}
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }
.callout.donate { --grad: linear-gradient(180deg, var(--cash), var(--teal-bright)); }

.donate-card { --accent: var(--cash); }
.card p.donate-tag {
  font-family: var(--mono); font-size: 2.1rem; font-weight: 800;
  color: var(--cash); margin: 0 0 18px; letter-spacing: -.01em; line-height: 1.1;
}
.center { text-align: center; }

.foot-donate {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 22px; margin-top: 8px;
}
.foot-donate p { margin: 0; color: var(--muted); font-size: .92rem; }

/* cf-a11y:start */
/* ============================================================
   Clickflame accessibility layer
   Managed block. Edit _shared/a11y/a11y.css and re-run
   _shared/a11y/apply_a11y.py. Do not hand edit the copies.

   Design rule: nothing in here is visible to a mouse user who
   has not asked for it. No overlay, no toolbar, no JavaScript.
   ============================================================ */

/* --- Skip link: off screen until a keyboard user focuses it --- */
.cf-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2147483000;
  display: inline-block;
  padding: .75rem 1.15rem;
  background: #10131a;
  color: #fff;
  font: 600 1rem/1.25 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-decoration: underline;
  border-radius: 0 0 .4rem 0;
}
.cf-skip:focus {
  left: 0;
}

/* --- Text for screen readers only --- */
.cf-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Focus ring.
   :focus-visible means mouse and touch users never see this.
   Set --cf-focus in your own stylesheet to match the brand.
   The default #1a73e8 clears 3:1 against both white and black. --- */
:focus-visible {
  outline: 3px solid var(--cf-focus, #1a73e8) !important;
  outline-offset: 2px !important;
}
@supports not selector(:focus-visible) {
  :focus {
    outline: 3px solid var(--cf-focus, #1a73e8) !important;
    outline-offset: 2px !important;
  }
}

/* A programmatic focus target should not draw a ring. */
[tabindex="-1"]:focus {
  outline: none !important;
}

/* Focus must not be swallowed by a sticky header. */
:target,
[tabindex="-1"] {
  scroll-margin-top: 6rem;
}

/* --- Respect a stated preference for less motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Windows High Contrast / forced colours --- */
@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid Highlight !important;
  }
  .cf-skip {
    background: Canvas;
    color: CanvasText;
    border: 2px solid CanvasText;
  }
}

/* --- Stronger ring for people who asked for more contrast --- */
@media (prefers-contrast: more) {
  :focus-visible {
    outline-width: 4px !important;
  }
}
/* cf-a11y:end */
