/* Hatchyard console. One stylesheet, no scripts, no external fonts: the
   Content-Security-Policy is default-src 'self', so every style and font is
   served by the console itself.

   The design language is Hatch's: Geist and Geist Mono, a neutral palette
   (the same oklch values as Hatch's theme), near-black primary buttons,
   thin 1px borders, an 8px radius ladder, a light sidebar and a dark theme
   that follows the system setting. */

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/geist.woff2") format("woff2-variations"), url("/static/geist.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/geist-mono.woff2") format("woff2-variations"), url("/static/geist-mono.woff2") format("woff2");
}

/* ---------- tokens (Hatch's theme) ---------- */
:root {
  color-scheme: light;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --sidebar: color-mix(in srgb, var(--border) 50%, var(--background));
  --sidebar-accent: oklch(0.88 0 0);
  --sidebar-border: oklch(0.922 0 0);

  --ok: oklch(0.627 0.17 149);
  --warn: oklch(0.705 0.17 62);
  --bad: var(--destructive);
  --info: oklch(0.546 0.215 263);

  --font-sans: "Geist Variable", "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --ring-focus: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
  --text-nano: 10px;
  --text-compact: 13px;
  --side-w: 240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: oklch(0.205 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --destructive: oklch(0.637 0.237 25.331);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.556 0 0);
    --sidebar: oklch(0.269 0 0);
    --sidebar-accent: oklch(0.32 0 0);
    --sidebar-border: oklch(1 0 0 / 10%);
    --ok: oklch(0.723 0.19 150);
    --warn: oklch(0.795 0.16 75);
    --info: oklch(0.707 0.165 255);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { color: var(--foreground); font-weight: 600; letter-spacing: -0.025em; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; }
h2 { font-size: 1rem; line-height: 1.4; margin: 0 0 0.75rem; }
h3 { font-size: 0.875rem; line-height: 1.4; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--foreground); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--foreground) 30%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-md);
}
code, pre { font-family: var(--font-mono); font-size: 0.8125rem; }
code { background: var(--muted); border-radius: var(--radius-sm); padding: 0.1rem 0.35rem; word-break: break-all; }
ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
strong { font-weight: 600; }
::selection { background: var(--primary); color: var(--primary-foreground); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--background); color: var(--foreground); padding: 0.5rem 0.875rem;
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.skip:focus { top: 1rem; }

/* ---------- the Hatch mark and wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--foreground);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
}
.wordmark svg { width: 20px; height: 20px; flex: none; }

/* ---------- app layout: light sidebar + main ---------- */
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-top { display: flex; align-items: center; height: 60px; padding: 0 1.25rem; flex: none; }
.sidebar-nav { display: flex; flex-direction: column; gap: 1rem; padding: 0.5rem 0.75rem; }
.nav-group { margin: 0; }
.nav-label {
  margin: 0;
  padding: 0.375rem 0.75rem;
  color: color-mix(in oklab, var(--muted-foreground) 60%, transparent);
  font-family: var(--font-mono);
  font-size: var(--text-nano);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-lg);
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
  font-size: var(--text-compact);
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 120ms, color 120ms;
}
.nav a:hover { background: var(--sidebar-accent); color: var(--foreground); }
.nav a[aria-current="page"] { background: var(--sidebar-accent); color: var(--foreground); }
.sidebar-foot {
  margin-top: auto;
  padding: 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  display: grid;
  gap: 0.5rem;
}
.who { display: grid; gap: 0.125rem; padding: 0 0.5rem; min-width: 0; }
.who-email { color: var(--foreground); font-weight: 500; font-size: var(--text-compact); overflow-wrap: anywhere; }
.who-role { color: var(--muted-foreground); font-size: 0.75rem; }
.sidebar-foot .foot-links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.sidebar-foot form { margin: 0; }
.btn-side {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2rem; padding: 0 0.625rem; border-radius: var(--radius-md);
  background: transparent; color: var(--muted-foreground); border: 0;
  font: inherit; font-size: var(--text-compact); font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn-side:hover, .btn-side[aria-current="page"] { background: var(--sidebar-accent); color: var(--foreground); }

.main { min-width: 0; padding: 2.5rem 2.5rem 4rem; }
.main-inner { max-width: 1080px; margin: 0 auto; }

/* ---------- page header ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0 0 1.5rem;
}
.page-head-text { min-width: 0; display: grid; gap: 0.375rem; }
.context {
  margin: 0;
  color: var(--muted-foreground);
  font-size: var(--text-compact);
  overflow-wrap: anywhere;
}
.context .sep { margin: 0 0.375rem; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.title-row h1 { overflow-wrap: anywhere; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lead { color: var(--muted-foreground); font-size: 0.9375rem; line-height: 1.6; max-width: 44rem; margin: -0.75rem 0 1.75rem; }

/* ---------- tabs (links) ---------- */
.tabs {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin: -0.5rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  list-style: none;
  padding: 0;
}
.tabs a {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  color: var(--muted-foreground);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--foreground); }
.tabs a[aria-current="page"] { color: var(--foreground); border-bottom-color: var(--foreground); }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin: 0 0 1.25rem;
  min-width: 0;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
}
.card-head h2 { margin: 0; }
.card-sub { color: var(--muted-foreground); margin: 0.25rem 0 0; }
.card-foot {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin: 1.5rem -1.5rem -1.5rem; padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}
.card-narrow { max-width: 40rem; }
.card-danger { border-color: color-mix(in oklab, var(--destructive) 35%, var(--border)); }
.card-danger h2 { color: var(--destructive); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 0 0 1.25rem; }
.grid > .card { margin: 0; }
.cols { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.cols > * { min-width: 0; }

/* ---------- figures: plain numbers in one bordered strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.stat {
  display: grid;
  gap: 0.125rem;
  padding: 1.125rem 1.5rem;
  border-left: 1px solid var(--border);
  margin-left: -1px;
  color: var(--foreground);
  text-decoration: none;
}
.stat-label { color: var(--muted-foreground); font-size: var(--text-compact); }
.stat-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-note { color: var(--muted-foreground); font-size: 0.75rem; }
a.stat:hover { background: var(--muted); }

/* ---------- next steps ---------- */
.quick { display: grid; gap: 0; margin: 0 -0.5rem; padding: 0; list-style: none; }
.quick a {
  display: grid;
  gap: 0.125rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-lg);
  color: var(--foreground);
  text-decoration: none;
}
.quick a:hover { background: var(--muted); }
.quick strong { font-weight: 500; }
.quick span { color: var(--muted-foreground); font-size: var(--text-compact); }

/* ---------- buttons ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
button:hover, .btn:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn-arrow::after { content: "\2192"; font-size: 1rem; line-height: 1; margin-left: 0.125rem; }
.btn-secondary, button.secondary {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover, button.secondary:hover { background: var(--accent); }
.btn-danger { background: var(--destructive); color: #fff; }
.btn-danger:hover { background: color-mix(in oklab, var(--destructive) 90%, transparent); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-danger-ghost { background: transparent; color: var(--destructive); }
.btn-danger-ghost:hover { background: color-mix(in oklab, var(--destructive) 8%, transparent); }
.card-head .btn, td.actions .btn, td.actions button { height: 2.25rem; padding: 0 0.75rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.25rem; }
.inline { display: inline; margin: 0; }

/* ---------- forms ---------- */
form { margin: 0; }
.form { display: grid; gap: 1rem; }
.form > button, .form > .btn-row { justify-self: start; }
.field { display: grid; gap: 0.375rem; }
.field > label, .label { font-weight: 500; font-size: 0.875rem; color: var(--foreground); }
.help { color: var(--muted-foreground); font-size: 0.75rem; margin: 0; }
.field-error { color: var(--destructive); font-size: 0.75rem; margin: 0; }
input[type="email"], input[type="password"], input[type="text"], input[type="url"], input[type="number"], input:not([type]), select {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.875rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 120ms, box-shadow 120ms;
}
select { background: var(--background); }
input::placeholder { color: var(--muted-foreground); }
input[readonly] { background: var(--muted); color: var(--muted-foreground); }
input:focus, select:focus { border-color: var(--ring); outline: none; box-shadow: var(--ring-focus); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem 1rem 0.75rem; margin: 0; min-width: 0; }
legend { font-weight: 500; font-size: 0.875rem; padding: 0 0.375rem; }
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); flex: none; }
.checks { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.compact-form { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: end; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: left; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  background: color-mix(in oklab, var(--muted) 50%, transparent);
}
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline-block; margin: 0 0 0 0.25rem; }
td .sub { display: block; color: var(--muted-foreground); font-size: 0.75rem; }
td code { white-space: nowrap; }
td a { font-weight: 500; }
.row-form { display: grid; gap: 0.5rem; grid-template-columns: minmax(120px, 1fr) minmax(90px, 0.7fr) auto; align-items: end; min-width: 360px; }
.row-form label { font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.row-form .field { gap: 0.25rem; }
.row-form input, .row-form select, .row-form button { height: 2.25rem; }

/* ---------- badges: thin-bordered pills, a small dot carries the state ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-foreground); flex: none; }
.pill-ok::before { background: var(--ok); }
.pill-warn::before { background: var(--warn); }
.pill-bad { color: var(--destructive); }
.pill-bad::before { background: var(--destructive); }
.pill-info::before { background: var(--info); }
.pill-plain { color: var(--muted-foreground); }
.pill-plain::before { display: none; }

/* ---------- callouts and flash messages ---------- */
.callout, .notice, .error {
  display: block;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}
.callout { background: color-mix(in oklab, var(--muted) 60%, transparent); }
.notice { border-left: 3px solid var(--ok); }
.callout-ok { border-left: 3px solid var(--ok); }
.callout-warn { border-left: 3px solid var(--warn); }
.error, .callout-bad {
  border-color: color-mix(in oklab, var(--destructive) 30%, var(--border));
  background: color-mix(in oklab, var(--destructive) 5%, var(--background));
  color: var(--destructive);
}
.callout > div { min-width: 0; }
.callout p { margin: 0 0 0.375rem; }
.callout p:last-child { margin: 0; }

.hint { color: var(--muted-foreground); font-size: 0.875rem; }
.muted { color: var(--muted-foreground); }

/* ---------- empty states ---------- */
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.card > .empty:only-child { border: 0; padding: 2rem 1rem; }
.empty h2 { margin: 0; font-size: 1.125rem; }
.empty p { margin: 0; color: var(--muted-foreground); max-width: 32rem; }
.empty .btn-row { margin: 0.75rem 0 0; justify-content: center; }

/* ---------- code blocks ---------- */
.code { display: grid; gap: 0.375rem; margin: 0 0 1rem; }
.code:last-child { margin-bottom: 0; }
.code-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: var(--text-compact); font-weight: 500; color: var(--foreground);
}
.code-label span { color: var(--muted-foreground); font-weight: 400; font-size: 0.75rem; }
pre {
  margin: 0;
  padding: 0.75rem 0.875rem;
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  user-select: all;
  -webkit-user-select: all;
}
pre code { background: none; padding: 0; color: inherit; border-radius: 0; font-size: inherit; }
pre.code-hero { font-size: 0.875rem; padding: 0.875rem 1rem; background: var(--background); box-shadow: var(--shadow-xs); }
.secret { border-color: var(--warn); }

/* ---------- key/value lists ---------- */
.meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.625rem 2rem; margin: 0; }
.meta dt { color: var(--muted-foreground); }
.meta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- marketplace ---------- */
.app-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin: 0 0 1.25rem; }
.app-card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  min-width: 0;
  transition: border-color 120ms, box-shadow 120ms;
}
.app-card:hover { border-color: color-mix(in oklab, var(--foreground) 20%, transparent); }
.app-card-head { display: flex; gap: 0.75rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.app-card h2 { margin: 0; font-size: 1.0625rem; }
.app-card .version { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.75rem; }
.app-card .summary { color: var(--muted-foreground); margin: 0; }
.app-card .requires { font-size: 0.75rem; color: var(--muted-foreground); margin: 0; }
.app-card .app-actions { margin-top: auto; display: grid; gap: 0.75rem; padding-top: 0.75rem; }
.app-card details { border-top: 1px solid var(--border); padding-top: 0.25rem; }
details.tech { border-top: 1px solid var(--border); margin-top: 0.75rem; padding-top: 0.25rem; }
details.tech summary {
  min-height: 2.25rem; display: flex; align-items: center; cursor: pointer;
  color: var(--muted-foreground); font-weight: 500; font-size: var(--text-compact);
}
.app-card summary {
  min-height: 2.25rem; display: flex; align-items: center; cursor: pointer;
  color: var(--muted-foreground); font-weight: 500; font-size: var(--text-compact);
}
.app-card summary:hover { color: var(--destructive); }
.app-card h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.app-card h3 a { text-decoration: none; }
.app-card h3 a:hover { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--foreground) 30%, transparent); }
.section-lead { color: var(--muted-foreground); font-size: var(--text-compact); margin: -0.375rem 0 1rem; }
h2 + .app-grid, h2 + .section-lead { margin-top: 0; }

/* listings: icon, publisher, verified badge */
.app-icon {
  width: 40px; height: 40px; flex: none;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
  padding: 5px;
  object-fit: contain;
}
.app-icon-blank { display: inline-block; background: var(--muted); }
.app-icon-lg { width: 48px; height: 48px; padding: 6px; border-radius: var(--radius-xl); }
.listing-head { display: flex; gap: 0.75rem; align-items: center; min-width: 0; }
.listing-id { display: grid; gap: 0.125rem; min-width: 0; }
.listing-by { margin: 0; color: var(--muted-foreground); font-size: 0.75rem; display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.listing-tags { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0; }
.listing-tags .version { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.75rem; }
.listing-links { display: flex; gap: 0.875rem; flex-wrap: wrap; margin: 0; font-size: var(--text-compact); }
.listing-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.listing-actions .btn { width: 100%; }
.credit { margin: 0; font-size: var(--text-nano); color: var(--muted-foreground); }
.credit a { color: inherit; }
.badge-verified {
  display: inline-flex; align-items: center; gap: 0.25rem;
  height: 1.25rem; padding: 0 0.4375rem;
  border: 1px solid color-mix(in oklab, var(--info) 35%, var(--border));
  border-radius: 999px;
  background: color-mix(in oklab, var(--info) 8%, transparent);
  color: var(--info);
  font-size: 0.6875rem; font-weight: 500; line-height: 1;
  white-space: nowrap;
}
.badge-verified svg { width: 12px; height: 12px; flex: none; }
.title-row .badge-verified { height: 1.5rem; font-size: 0.75rem; padding: 0 0.5625rem; }

/* one listing */
.listing-facts { display: grid; gap: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted-foreground); font-size: 0.75rem; margin: 0 0 0.25rem; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.facts .mono, .mono { font-family: var(--font-mono); font-size: var(--text-compact); }
.listing-facts .callout { margin: 0; }
.listing-shots { margin: 0 0 1.25rem; }
.shots { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.shot {
  display: block; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--muted);
  box-shadow: var(--shadow-xs);
}
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot:hover { border-color: color-mix(in oklab, var(--foreground) 25%, transparent); }
.cols-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 0 0 1.25rem; }
.cols-even > .card { margin: 0; }
.facts-list { list-style: none; margin: 0; padding: 0; display: grid; }
.facts-list li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--border); font-size: 0.875rem; line-height: 1.55; }
.facts-list li:first-child { border-top: 0; padding-top: 0.25rem; }
.facts-k { color: var(--muted-foreground); }
.facts-v { min-width: 0; overflow-wrap: anywhere; }
.facts-v .pill { vertical-align: middle; }
.card > .callout:last-child { margin: 0.75rem 0 0; }

/* ---------- stack list ---------- */
.stack-list { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stack-list li + li { border-top: 1px solid var(--border); }
.stack-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.875rem 1rem;
}
.stack-list .hint { margin: 0; padding: 0 1rem 0.875rem; }
.stack-item-main { display: grid; gap: 0.125rem; min-width: 0; }
.stack-item-main strong { font-weight: 500; }
.stack-item-main span { color: var(--muted-foreground); font-size: 0.75rem; font-family: var(--font-mono); overflow-wrap: anywhere; }
a.stack-item { color: var(--foreground); text-decoration: none; }
a.stack-item:hover { background: var(--muted); }

.steps { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.625rem; color: var(--muted-foreground); }
.steps strong { color: var(--foreground); font-weight: 500; }
.steps li::marker { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.steps .sub { display: block; color: var(--muted-foreground); font-size: 0.75rem; }

.type-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.type-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--foreground); text-decoration: none; font-weight: 500;
}
.type-list a:hover { border-color: color-mix(in oklab, var(--foreground) 20%, transparent); background: var(--muted); }
.type-list code { font-size: 0.6875rem; font-weight: 400; color: var(--muted-foreground); }

/* ---------- signed-out layout: Hatch's split sign-in page ---------- */
.auth { min-height: 100vh; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side { display: flex; flex-direction: column; min-width: 0; }
.auth-top { display: flex; align-items: center; padding: 1rem 2rem; height: 60px; }
.auth-box { width: 100%; max-width: 24rem; margin: auto; padding: 2.5rem 2rem; }
.auth-card h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.auth-card .lead { margin: 0 0 1.5rem; font-size: 0.875rem; }
.auth-card .form > button { justify-self: stretch; }
.auth-foot { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 1.5rem; }
.auth-show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 4rem;
  background: color-mix(in oklab, var(--muted) 40%, var(--background));
  border-left: 1px solid var(--border);
}
.auth-show-text { max-width: 28rem; display: grid; gap: 0.75rem; }
.auth-show-title { margin: 0; font-size: 1.875rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.auth-promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; color: var(--muted-foreground); }
.auth-promises li { display: flex; align-items: center; gap: 0.5rem; }
.auth-promises svg { width: 16px; height: 16px; flex: none; color: var(--foreground); }
.auth-window {
  max-width: 32rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-window-bar { display: flex; align-items: center; gap: 0.375rem; padding: 0.625rem 1rem; border-bottom: 1px solid var(--border); }
.auth-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in oklab, var(--muted-foreground) 30%, transparent); }
.auth-window-bar span { margin-left: 0.75rem; color: var(--muted-foreground); font-size: 0.75rem; }
.auth-window pre { border: 0; border-radius: 0; background: transparent; user-select: text; -webkit-user-select: text; padding: 1rem 1.25rem; font-size: 0.75rem; color: var(--muted-foreground); }
.auth-window pre b { color: var(--foreground); font-weight: 500; }

/* ---------- stack map: a drawn diagram, then the same in words ---------- */
.map-board {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  margin: 0 0 1.75rem;
  overflow: hidden;
}
.map-board-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.map-board-head h2 { margin: 0; font-size: 0.875rem; }
.map-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; font-size: 0.75rem; color: var(--muted-foreground); }
.map-legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.map-key { display: inline-block; width: 22px; height: 0; border-top: 1.5px solid var(--foreground); }
.map-key-flow { border-top-style: dashed; border-top-color: var(--muted-foreground); }
.map-key-dep { border-top-color: var(--ring); }
.map-canvas {
  padding: 0.5rem 0;
  background-color: color-mix(in oklab, var(--muted) 35%, var(--background));
  background-image: radial-gradient(color-mix(in oklab, var(--muted-foreground) 22%, transparent) 1px, transparent 1px);
  background-size: 16px 16px;
  overflow-x: auto;
}
svg.map { display: block; max-width: 100%; height: auto; margin: 0 auto; font-family: var(--font-sans); }
.map-note { margin: 0; padding: 0.625rem 1.25rem; border-top: 1px solid var(--border); }

.map-box { fill: var(--card); stroke: var(--border); stroke-width: 1; }
.map-node-platform .map-box, .map-node-app .map-box { stroke: color-mix(in oklab, var(--foreground) 18%, var(--border)); }
.map-node-dep .map-box { fill: var(--background); stroke-dasharray: 4 3; stroke: var(--ring); }
.map-node-gateway .map-box { fill: var(--primary); stroke: var(--primary); }
.map-name { fill: var(--foreground); font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.map-state { fill: var(--muted-foreground); font-size: 12px; }
.map-kind { fill: var(--muted-foreground); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; }
.map-count { fill: var(--primary-foreground); font-family: var(--font-mono); font-size: 10.5px; text-anchor: end; opacity: 0.75; }
.map-node-gateway .map-name { fill: var(--primary-foreground); font-size: 14.5px; }
.map-node-gateway .map-state, .map-node-gateway .map-kind { fill: var(--primary-foreground); opacity: 0.72; }
.map-dot { fill: var(--muted-foreground); }
.map-dot-ok { fill: var(--ok); }
.map-dot-warn { fill: var(--warn); }
.map-dot-bad { fill: var(--destructive); }

.map-edge { fill: none; stroke-width: 1.25; }
.map-edge-tools { stroke: var(--foreground); stroke-width: 1.5; }
.map-edge-manage { stroke: color-mix(in oklab, var(--foreground) 55%, transparent); }
.map-tag-manage rect { fill: var(--background); stroke: var(--foreground); }
.map-tag-manage text { fill: var(--foreground); }
.map-edge-flow { stroke: var(--muted-foreground); stroke-dasharray: 5 4; }
.map-edge-dep { stroke: var(--ring); }
.map-arrowhead { fill: var(--muted-foreground); }
.map-arrowhead-strong { fill: var(--foreground); }
.map-tag rect { fill: var(--background); stroke: var(--border); }
.map-tag-tools rect { fill: var(--foreground); stroke: var(--foreground); }
.map-tag text { fill: var(--muted-foreground); font-family: var(--font-mono); font-size: 10px; text-anchor: middle; }
.map-tag-tools text { fill: var(--background); }

.map-parts h2 { margin: 0 0 0.75rem; }
.map-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.map-item { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.25rem 2rem; }
.map-item:first-child { border-top: 0; }
.map-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; align-self: start; }
.map-item-head h3 { margin: 0 0.25rem 0 0; font-size: 0.9375rem; flex-basis: 100%; }
.map-role { grid-column: 1; margin: 0.375rem 0 0; color: var(--muted-foreground); font-size: var(--text-compact); line-height: 1.5; }
.map-meta { grid-column: 2; grid-row: 1 / span 2; font-size: var(--text-compact); gap: 0.375rem 1.5rem; }
.map-meta dd { font-weight: 400; }
.map-line { display: block; }
.map-tools { margin-top: 0.25rem; }
.map-tools summary { cursor: pointer; color: var(--muted-foreground); }
.map-tools summary:hover { color: var(--foreground); }
.map-tools .map-line { margin-top: 0.25rem; }
.map-item-gateway { background: color-mix(in oklab, var(--muted) 45%, transparent); }
@media (max-width: 860px) {
  .map-item { grid-template-columns: minmax(0, 1fr); }
  .map-meta { grid-column: 1; grid-row: auto; margin-top: 0.75rem; }
}

/* ---------- the team overview ---------- */
.filters { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; margin: 0 0 1.25rem; }
.filters .field > label { font-size: 0.75rem; color: var(--muted-foreground); }
.filters select, .filters button, .filters .btn { height: 2.25rem; }
.filters-go { display: flex; gap: 0.5rem; }
.attn-list { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.attn-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; font-size: 0.875rem; }
.attn-list li + li { border-top: 1px solid var(--border); }
.attn-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attn-list .btn { height: 2rem; padding: 0 0.625rem; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.75rem 0 0; color: var(--muted-foreground); font-size: var(--text-compact); font-variant-numeric: tabular-nums; }
.pager-links { display: flex; gap: 0.25rem; }
.pager .btn { height: 2rem; padding: 0 0.75rem; }
div.stack-item { color: var(--foreground); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols, .cols-even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .facts-list li { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
}
@media (max-width: 900px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-show { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--sidebar-border); }
  .sidebar-top { height: 52px; padding: 0 1rem; }
  .sidebar-nav { gap: 0.25rem; padding: 0 0.75rem 0.5rem; }
  .nav-label { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { white-space: nowrap; }
  .sidebar-foot { margin-top: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .main { padding: 1.5rem 1rem 3rem; }
  .card { padding: 1.125rem; }
  .card-foot { margin: 1.125rem -1.125rem -1.125rem; padding: 0.75rem 1.125rem; }
  .compact-form, .filters { grid-template-columns: minmax(0, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--border); margin: -1px 0 0; }
}
@media (max-width: 480px) {
  .auth-box { padding: 1.5rem 1.25rem; }
  .page-actions, .page-actions .btn { width: 100%; }
  .meta { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
  .meta dd { margin-bottom: 0.5rem; }
}

/* Ask */
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  box-shadow: var(--shadow-xs);
  resize: vertical;
}
textarea:focus { border-color: var(--ring); outline: none; box-shadow: var(--ring-focus); }
.ask-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 0.75rem; line-height: 1.6; }
.ask-answer { border-top: 1px solid var(--border); padding-top: 0.25rem; }
.ask-answer h3 { margin-top: 0.75rem; }
.ask-turn .table-wrap { margin: 0.75rem 0; }
.ask-save { border-top: 1px solid var(--border); margin-top: 0.75rem; padding-top: 0.5rem; }
.ask-save summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; padding: 0.25rem 0; }
.ask-save .form { margin-top: 0.75rem; }
.ask-save > form.inline { display: block; margin: 0.5rem 0; }
.ask-rate { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 0.75rem; }
.ask-rate input[type="text"] { flex: 1 1 14rem; width: auto; height: 2.25rem; }
.ask-rate button { height: 2.25rem; padding: 0 0.75rem; }
.ask-report-banner { position: sticky; top: 0; z-index: 1; background: var(--background); border: 1px solid var(--border); border-left: 3px solid var(--foreground); border-radius: var(--radius-md); padding: 0.625rem 0.875rem; font-size: 0.875rem; margin: 0 0 0.75rem; }
.ask-report { display: block; width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.ask-rate button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ---------- public homepage (signed out, at /): Hatch's landing layout ---------- */
.site { min-height: 100vh; }
.site-wrap { max-width: 72rem; margin: 0 auto; padding: 0 2.5rem; }
.site-head {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in oklab, var(--background) 92%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 60px; }
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav-link {
  padding: 0.5rem 0.75rem; border-radius: var(--radius-md);
  color: var(--muted-foreground); font-size: 0.875rem; text-decoration: none;
}
.site-nav-link:hover { color: var(--foreground); }
.site-head-btn { height: 2.25rem; padding: 0 0.875rem; }
.site-head-cta { margin-left: 0.25rem; }

.site-hero { position: relative; isolation: isolate; overflow: hidden; padding: 6rem 0 5rem; }

/* Behind the hero: a grid of small product symbols (a branch, code, a
   check, a container, an arrow, a key, a commit, a repository) with a slow
   ripple of opacity and scale spreading out from the centre. Each ring of
   the grid has its own delay class, set by landing.go. Greys only, at 6 to
   14% of the text colour, so the words in front read as before. */
.site-wave {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); grid-template-rows: repeat(9, minmax(0, 1fr));
  padding: 1rem; color: var(--foreground);
  mask-image: linear-gradient(to bottom, #000 75%, transparent);
}
.site-wave-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-wave-g {
  place-self: center; width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.07; animation: site-wave 9s ease-in-out infinite both;
}
@keyframes site-wave {
  0%, 30%, 100% { opacity: 0.06; transform: scale(0.85); }
  12% { opacity: 0.14; transform: scale(1.12); }
}
/* A ring further out peaks 0.35 s after the one inside it. */
.site-wave-r0 { animation-delay: -9s; }
.site-wave-r1 { animation-delay: -8.65s; }
.site-wave-r2 { animation-delay: -8.3s; }
.site-wave-r3 { animation-delay: -7.95s; }
.site-wave-r4 { animation-delay: -7.6s; }
.site-wave-r5 { animation-delay: -7.25s; }
.site-wave-r6 { animation-delay: -6.9s; }
.site-wave-r7 { animation-delay: -6.55s; }
.site-wave-r8 { animation-delay: -6.2s; }
.site-wave-r9 { animation-delay: -5.85s; }
.site-wave-r10 { animation-delay: -5.5s; }
.site-wave-r11 { animation-delay: -5.15s; }
.site-wave-r12 { animation-delay: -4.8s; }
.site-wave-r13 { animation-delay: -4.45s; }
.site-wave-r14 { animation-delay: -4.1s; }
.site-wave-r15 { animation-delay: -3.75s; }
/* Phones get a smaller grid and a gentler wave: opacity only. */
@keyframes site-wave-soft {
  0%, 30%, 100% { opacity: 0.06; }
  12% { opacity: 0.12; }
}
.site-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
.site-hero-text { display: grid; gap: 1.5rem; justify-items: start; }
.site-hero h1 { font-size: 3rem; line-height: 1.08; letter-spacing: -0.035em; max-width: 14ch; }
.site-lead { margin: 0; max-width: 36rem; color: var(--muted-foreground); font-size: 1.125rem; line-height: 1.6; }
.site-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.site-btn-lg { height: 2.75rem; padding: 0 1.25rem; font-size: 0.9375rem; }

/* The diagram: a stack drawn in plain HTML, the AI gateway beside it. */
.site-diagram {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.site-diagram-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; padding: 1.5rem; }
.site-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: flow; }
.site-flow li {
  position: relative;
  display: grid; gap: 0.125rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
}
.site-flow li + li::before {
  content: ""; position: absolute; left: 1.25rem; top: calc(-1.5rem - 1px);
  height: 1.5rem; border-left: 1px solid color-mix(in oklab, var(--foreground) 35%, transparent);
}
.site-flow li + li::after {
  content: ""; position: absolute; left: calc(1.25rem - 3px); top: -6px;
  border: 3.5px solid transparent; border-top: 4px solid color-mix(in oklab, var(--foreground) 35%, transparent); border-bottom: 0;
}
.site-flow-live { border-color: color-mix(in oklab, var(--foreground) 40%, var(--border)) !important; }
.site-flow-live .site-flow-name::before {
  content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.4rem;
  border-radius: 50%; background: var(--ok); vertical-align: 0.05em;
}
.site-flow-name { font-size: var(--text-compact); font-weight: 600; letter-spacing: -0.01em; }
.site-flow-sub { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.45; overflow-wrap: anywhere; }
.site-gate { display: grid; grid-template-rows: auto 1fr; gap: 0.75rem; }
.site-gate-ai {
  margin: 0; justify-self: start;
  padding: 0.25rem 0.625rem; border: 1px dashed color-mix(in oklab, var(--foreground) 30%, transparent); border-radius: 999px;
  font-size: 0.75rem; font-weight: 500;
}
.site-gate-box {
  display: grid; align-content: start; gap: 0.375rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--primary); color: var(--primary-foreground);
}
.site-gate-box .site-flow-sub { color: color-mix(in oklab, var(--primary-foreground) 70%, transparent); }
.site-log {
  list-style: none; margin: 0.5rem 0 0; padding: 0.625rem 0 0; display: grid; gap: 0.25rem;
  border-top: 1px solid color-mix(in oklab, var(--primary-foreground) 15%, transparent);
  font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.45; overflow-wrap: anywhere;
  color: color-mix(in oklab, var(--primary-foreground) 75%, transparent);
}
.site-log span { color: color-mix(in oklab, var(--primary-foreground) 50%, transparent); }

/* The hero's animation: one change, told on a 9 s loop. Repository, build
   and scan, blue/green deploy, live, with the gateway logging each call.
   The resting styles are the end of the story; the keyframes start it from
   the beginning, so with reduced motion the finished state is what shows. */
.site-chip {
  position: absolute; top: 0.5rem; right: 0.625rem;
  padding: 0 0.4375rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--muted); color: var(--foreground);
  font-family: var(--font-mono); font-size: 0.625rem; line-height: 1.6;
  opacity: 0;
}
.site-state {
  position: absolute; top: 0.6875rem; right: 0.75rem;
  display: grid; font-family: var(--font-mono); font-size: 0.625rem; line-height: 1.5;
  color: var(--muted-foreground);
}
.site-state > span { grid-area: 1 / 1; justify-self: end; white-space: nowrap; }
.site-state-scan { opacity: 0; }
.site-state-ok b { color: var(--ok); font-weight: 600; }
.site-scanbar {
  position: absolute; left: 0.875rem; right: 0.875rem; bottom: 0.3125rem; height: 1px;
  background: color-mix(in oklab, var(--foreground) 40%, transparent);
  transform-origin: left center; opacity: 0;
}
.site-dot {
  position: absolute; left: calc(1.25rem - 2.5px); top: calc(-1.5rem - 1px);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--foreground); opacity: 0;
}
.site-bg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; margin-top: 0.375rem; padding-bottom: 0.4375rem; }
.site-bg-box {
  padding: 0.1875rem 0.5rem; border: 1px solid; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 0.625rem; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-bg-blue {
  border-color: color-mix(in oklab, var(--info) 40%, var(--border));
  background: color-mix(in oklab, var(--info) 6%, var(--background));
  opacity: 0.5;
}
.site-bg-green {
  border-color: color-mix(in oklab, var(--ok) 45%, var(--border));
  background: color-mix(in oklab, var(--ok) 6%, var(--background));
}
.site-bg-traffic {
  position: absolute; left: 0; bottom: 0; width: calc(50% - 0.1875rem); height: 2px; border-radius: 1px;
  background: color-mix(in oklab, var(--foreground) 55%, transparent);
  transform: translateX(calc(100% + 0.375rem));
}

.site-diagram { --site-loop: 9s; }
.site-step-repo, .site-step-build, .site-step-deploy { animation: var(--site-loop) linear infinite both; }
.site-step-repo { animation-name: site-step-repo; }
.site-step-build { animation-name: site-step-build; }
.site-step-deploy { animation-name: site-step-deploy; }
.site-chip { animation: site-chip var(--site-loop) linear infinite both; }
.site-dot { animation: site-travel var(--site-loop) linear infinite both; }
.site-dot-1 { animation-delay: calc(var(--site-loop) * 0.16); }
.site-dot-2 { animation-delay: calc(var(--site-loop) * 0.44); }
.site-dot-3 { animation-delay: calc(var(--site-loop) * 0.74); }
.site-state-scan { animation: site-scan var(--site-loop) linear infinite both; }
.site-state-ok { animation: site-pass var(--site-loop) linear infinite both; }
.site-scanbar { animation: site-scanbar var(--site-loop) linear infinite both; }
.site-bg-blue { animation: site-blue var(--site-loop) linear infinite both; }
.site-bg-green { animation: site-green var(--site-loop) linear infinite both; }
.site-bg-traffic { animation: site-traffic var(--site-loop) linear infinite both; }
.site-flow-live { animation: site-live var(--site-loop) linear infinite both; }
.site-flow-live .site-flow-name::before { animation: site-live-dot var(--site-loop) linear infinite both; }
.site-log-1 { animation: site-log-1 var(--site-loop) linear infinite both; }
.site-log-2 { animation: site-log-2 var(--site-loop) linear infinite both; }
.site-log-3 { animation: site-log-3 var(--site-loop) linear infinite both; }

/* 0-16% the commit; 16-24% down; 24-42% build and scan; 44-52% down;
   52-74% blue/green; 74-82% down; 82-90% live; 96-100% back to the start. */
@keyframes site-step-repo {
  0%, 17%, 100% { border-color: var(--border); }
  2%, 14% { border-color: color-mix(in oklab, var(--foreground) 35%, var(--border)); }
}
@keyframes site-step-build {
  0%, 23%, 45%, 100% { border-color: var(--border); }
  25%, 42% { border-color: color-mix(in oklab, var(--foreground) 35%, var(--border)); }
}
@keyframes site-step-deploy {
  0%, 51%, 77%, 100% { border-color: var(--border); }
  53%, 74% { border-color: color-mix(in oklab, var(--foreground) 35%, var(--border)); }
}
@keyframes site-chip {
  0% { opacity: 0; transform: translateY(-2px); }
  3%, 13% { opacity: 1; transform: translateY(0); }
  17%, 100% { opacity: 0; transform: translateY(6px); }
}
@keyframes site-travel {
  0% { opacity: 0; transform: translateY(0); }
  1% { opacity: 1; transform: translateY(0); }
  7% { opacity: 1; transform: translateY(calc(1.5rem - 6px)); }
  8%, 100% { opacity: 0; transform: translateY(calc(1.5rem - 6px)); }
}
@keyframes site-scan {
  0%, 24% { opacity: 0; }
  26%, 39% { opacity: 1; }
  41%, 100% { opacity: 0; }
}
@keyframes site-pass {
  0%, 40% { opacity: 0; }
  42%, 96% { opacity: 1; }
  99%, 100% { opacity: 0; }
}
@keyframes site-scanbar {
  0%, 25% { opacity: 0; transform: scaleX(0); }
  26% { opacity: 1; transform: scaleX(0); }
  40% { opacity: 1; transform: scaleX(1); }
  42%, 100% { opacity: 0; transform: scaleX(1); }
}
@keyframes site-blue {
  0%, 70% { opacity: 1; }
  74%, 96% { opacity: 0.5; }
  99%, 100% { opacity: 1; }
}
@keyframes site-green {
  0%, 52% { opacity: 0; border-style: dashed; border-color: color-mix(in oklab, var(--foreground) 25%, var(--border)); background: var(--background); }
  55% { opacity: 1; border-style: dashed; border-color: color-mix(in oklab, var(--foreground) 25%, var(--border)); background: var(--background); }
  61.9% { border-style: dashed; }
  62% { border-style: solid; border-color: color-mix(in oklab, var(--foreground) 25%, var(--border)); background: var(--background); }
  64%, 96% { opacity: 1; border-style: solid; border-color: color-mix(in oklab, var(--ok) 45%, var(--border)); background: color-mix(in oklab, var(--ok) 6%, var(--background)); }
  99%, 100% { opacity: 0; }
}
@keyframes site-traffic {
  0%, 65% { opacity: 1; transform: translateX(0); }
  70%, 96% { opacity: 1; transform: translateX(calc(100% + 0.375rem)); }
  98% { opacity: 0; transform: translateX(calc(100% + 0.375rem)); }
  98.5% { opacity: 0; transform: translateX(0); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes site-live {
  0%, 82%, 92%, 100% { background: var(--background); }
  85% { background: color-mix(in oklab, var(--foreground) 5%, var(--background)); }
}
@keyframes site-live-dot {
  0%, 82%, 90%, 100% { transform: scale(1); }
  85% { transform: scale(1.4); }
}
@keyframes site-log-1 {
  0%, 2% { opacity: 0; color: var(--primary-foreground); }
  4%, 12% { opacity: 1; color: var(--primary-foreground); }
  18%, 96% { opacity: 1; color: color-mix(in oklab, var(--primary-foreground) 75%, transparent); }
  99%, 100% { opacity: 0; }
}
@keyframes site-log-2 {
  0%, 40% { opacity: 0; color: var(--primary-foreground); }
  42%, 50% { opacity: 1; color: var(--primary-foreground); }
  56%, 96% { opacity: 1; color: color-mix(in oklab, var(--primary-foreground) 75%, transparent); }
  99%, 100% { opacity: 0; }
}
@keyframes site-log-3 {
  0%, 70% { opacity: 0; color: var(--primary-foreground); }
  72%, 80% { opacity: 1; color: var(--primary-foreground); }
  86%, 96% { opacity: 1; color: color-mix(in oklab, var(--primary-foreground) 75%, transparent); }
  99%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .site-diagram *, .site-diagram *::before { animation: none !important; }
  .site-anim *, .site-anim *::before, .site-anim *::after { animation: none !important; }
  .site-wave * { animation: none !important; }
}


/* Section pictures: one small story beside each section's text, in the
   hero's language (the same cards, wires, ticks and linear timing) on a
   10 s loop. As in the hero, the resting styles are the end of each story
   and the keyframes play it from the start, so with reduced motion the
   finished picture is what shows. Only opacity and transform move. */
.site-anim {
  --site-anim-loop: 10s;
  margin: 0.75rem 0 0; max-width: 26rem;
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card); box-shadow: var(--shadow-xs);
  font-size: var(--text-compact);
}
.site-anim > div { display: grid; gap: 0.75rem; }
.site-anim em { font-style: normal; }
.site-anim-head { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.75rem; font-weight: 600; }
.site-anim-head > span + span { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; font-weight: 400; }
.site-tick { color: var(--ok); font-weight: 600; }
.site-swap { display: inline-grid; }
.site-swap > * { grid-area: 1 / 1; justify-self: end; white-space: nowrap; }

/* Templates: the Website template's parts arrive one by one and check off. */
.site-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }
.site-blocks li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 1rem; align-items: center; gap: 0.5rem;
  padding: 0.4375rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background);
}
.site-blocks span { font-size: 0.75rem; font-weight: 600; }
.site-blocks em { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; }
.site-blocks .site-tick { justify-self: end; font-size: 0.75rem; }

/* Your own server: the order's steps tick by, then the tools are inside. */
.site-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4375rem; font-size: 0.75rem; }
.site-steps li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); align-items: center; gap: 0.5rem; }
.site-steps li::before {
  content: ""; grid-area: 1 / 1; justify-self: center;
  width: 0.5rem; height: 0.5rem; border: 1px solid color-mix(in oklab, var(--foreground) 35%, transparent); border-radius: 50%;
}
.site-steps .site-tick { grid-area: 1 / 1; width: 1rem; text-align: center; line-height: 1.2; background: var(--card); }
.site-tiles {
  list-style: none; margin: 0; padding: 0.75rem 0 0; border-top: 1px dashed var(--border);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.375rem;
}
.site-tiles li {
  padding: 0.375rem 0.25rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background);
  text-align: center; font-size: 0.6875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* One door for your AI: the gateway as a node, wired to the tools. The
   tool names come from the bundle manifests (landing.go). Three calls take
   turns on a 10.5 s loop: each drops from the assistant into the gateway,
   runs out along one wire and comes back ok. */
.site-ai { --site-ai-loop: 10.5s; grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 56rem; margin: 1rem 0 0; padding: 1.5rem; }
.site-ai-canvas { display: grid; grid-template-columns: 15rem 5rem minmax(0, 1fr); height: 22rem; }
.site-ai-left { display: grid; grid-template-rows: 1fr auto 1fr; }
.site-ai-top { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.site-ai-you {
  margin: 0; padding: 0.25rem 0.625rem; border: 1px dashed color-mix(in oklab, var(--foreground) 30%, transparent); border-radius: 999px;
  background: var(--background); font-size: 0.75rem; font-weight: 500;
}
.site-ai-down { position: relative; width: 1px; height: 1.75rem; background: color-mix(in oklab, var(--foreground) 22%, transparent); }
.site-ai-call {
  position: absolute; left: -2.5px; top: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--foreground); opacity: 0;
}
.site-ai-gate {
  position: relative; display: grid; gap: 0.5rem; padding: 1rem;
  border-radius: var(--radius-lg); background: var(--primary); color: var(--primary-foreground);
}
.site-ai-gate::after, .site-ai-node::before {
  content: ""; position: absolute; top: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 1.5px solid color-mix(in oklab, var(--foreground) 45%, transparent); box-sizing: border-box;
}
.site-ai-gate::after { right: -5px; border-color: var(--primary); }
.site-ai-node::before { left: -5px; }
.site-ai-title { font-size: var(--text-compact); font-weight: 600; letter-spacing: -0.01em; }
.site-ai-key {
  justify-self: start; padding: 0 0.4375rem; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--primary-foreground) 25%, transparent);
  color: color-mix(in oklab, var(--primary-foreground) 75%, transparent);
  font-family: var(--font-mono); font-size: 0.625rem; line-height: 1.6;
}
.site-ai-log {
  display: grid; padding-top: 0.5rem; border-top: 1px solid color-mix(in oklab, var(--primary-foreground) 15%, transparent);
  font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.45; overflow-wrap: anywhere;
}
.site-ai-log > span { grid-area: 1 / 1; opacity: 0; }
.site-ai-log b { font-weight: 400; color: color-mix(in oklab, var(--primary-foreground) 55%, transparent); }
.site-ai-wires { display: block; width: 100%; height: 100%; overflow: visible; }
.site-ai-wires path { fill: none; stroke-width: 1.5; }
.site-ai-wire { stroke: color-mix(in oklab, var(--foreground) 22%, transparent); }
.site-ai-lit { stroke: color-mix(in oklab, var(--foreground) 65%, transparent); opacity: 0; }
.site-ai-wires .site-ai-pulse { stroke: var(--foreground); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.16 2; stroke-dashoffset: -1; opacity: 0; }
.site-ai-nodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); }
.site-ai-nodes li { display: grid; align-content: center; padding: 0.375rem 0; }
.site-ai-node {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.375rem 0.5rem;
  padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background);
}
.site-ai-badge {
  display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: var(--radius-sm);
  background: var(--muted); font-size: 0.6875rem; font-weight: 600;
}
.site-ai-ok { color: var(--ok); font-family: var(--font-mono); font-size: 0.625rem; opacity: 0; }
.site-ai-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.25rem; color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; line-height: 1.6; }
.site-ai-tools code {
  padding: 0 0.3125rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--muted); color: var(--foreground); font-family: inherit; font-size: inherit;
}
.site-ai-ring {
  position: absolute; inset: -1px; border: 1px solid color-mix(in oklab, var(--foreground) 55%, transparent);
  border-radius: inherit; opacity: 0; pointer-events: none;
}
/* With no motion the last call is what shows. */
.site-ai-k.site-ai-c2, .site-ai-lit.site-ai-c2, .site-ai-ring.site-ai-c2, .site-ai-ok.site-ai-c2 { opacity: 1; }
.site-ai-call { animation: site-ai-call calc(var(--site-ai-loop) / 3) linear infinite both; }
.site-ai-k { animation: site-ai-k var(--site-ai-loop) linear infinite both; }
.site-ai-pulse { animation: site-ai-pulse var(--site-ai-loop) linear infinite both; }
.site-ai-lit, .site-ai-ring, .site-ai-ok { animation: site-ai-lit var(--site-ai-loop) linear infinite both; }
.site-ai-c1 { animation-delay: calc(var(--site-ai-loop) / 3); }
.site-ai-c2 { animation-delay: calc(var(--site-ai-loop) * 2 / 3); }
/* One call's third of the loop: 0-5% the drop into the gateway, 6-15% out
   along the wire, 16-30% the tool lit and ok, then the next call. */
@keyframes site-ai-call {
  0% { opacity: 0; transform: translateY(0); }
  2% { opacity: 1; transform: translateY(0); }
  14% { opacity: 1; transform: translateY(calc(1.75rem - 6px)); }
  16%, 100% { opacity: 0; transform: translateY(calc(1.75rem - 6px)); }
}
@keyframes site-ai-k {
  0%, 5% { opacity: 0; transform: translateY(3px); }
  7%, 30% { opacity: 1; transform: none; }
  32%, 100% { opacity: 0; transform: none; }
}
@keyframes site-ai-pulse {
  0%, 6% { opacity: 0; stroke-dashoffset: 0.16; }
  7% { opacity: 1; stroke-dashoffset: 0.16; }
  15% { opacity: 1; stroke-dashoffset: -1; }
  16%, 100% { opacity: 0; stroke-dashoffset: -1; }
}
@keyframes site-ai-lit {
  0%, 13% { opacity: 0; }
  16%, 29% { opacity: 1; }
  32%, 100% { opacity: 0; }
}

/* Your data, backed up: backups along a line, one more before an upgrade. */
.site-lock {
  position: relative; display: inline-block; width: 0.5rem; height: 0.4375rem; margin: 0.25rem 0.3125rem 0 0;
  border-radius: 1px; background: currentColor; vertical-align: -0.0625rem;
}
.site-lock::before {
  content: ""; position: absolute; left: 0.0625rem; right: 0.0625rem; bottom: 100%; height: 0.25rem;
  border: 1.5px solid currentColor; border-bottom: 0; border-radius: 0.25rem 0.25rem 0 0;
}
.site-time { position: relative; height: 3rem; margin: 0 0.5rem; }
.site-time-line, .site-time-fill { position: absolute; left: 0; right: 0; top: 1.75rem; height: 1px; background: color-mix(in oklab, var(--foreground) 15%, transparent); }
.site-time-fill { background: color-mix(in oklab, var(--foreground) 55%, transparent); transform-origin: left center; animation: site-time-fill var(--site-anim-loop) linear infinite both; }
.site-snap {
  position: absolute; top: calc(1.75rem - 4px); width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 2px; background: var(--foreground); box-sizing: border-box;
}
.site-snap-pre { background: var(--card); border: 1.5px solid var(--foreground); }
.site-upgrade { position: absolute; left: 68.2%; top: 0.25rem; height: 2.5rem; border-left: 1px dashed color-mix(in oklab, var(--foreground) 45%, transparent); }
.site-upgrade em { position: absolute; right: 0.375rem; top: -0.125rem; color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; white-space: nowrap; }
.site-at-1 { left: 4.5%; }
.site-at-2 { left: 27.3%; }
.site-at-3 { left: 50%; }
.site-at-pre { left: 63.6%; }
.site-at-4 { left: 72.7%; }
.site-at-5 { left: 95.5%; }
/* The line reaches each snapshot as it appears: 2% to 90% of the loop. */
@keyframes site-time-fill {
  0%, 2% { opacity: 1; transform: scaleX(0); }
  90%, 96% { opacity: 1; transform: scaleX(1); }
  98% { opacity: 0; transform: scaleX(1); }
  99% { opacity: 0; transform: scaleX(0); }
  100% { opacity: 1; transform: scaleX(0); }
}

/* Ask: the question types itself, then three answers arrive. A cover
   slides off the text one letter at a time (the text is monospaced). */
.site-q {
  margin: 0; justify-self: start; max-width: 100%; padding: 0.375rem 0.75rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--muted);
  font-family: var(--font-mono); font-size: 0.6875rem;
}
.site-q-text { position: relative; display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: top; }
.site-q-cover {
  position: absolute; inset: 0; background: var(--muted); box-shadow: inset 1px 0 0 var(--foreground);
  transform: translateX(100%); animation: site-type var(--site-anim-loop) linear infinite both;
}
@keyframes site-type {
  0%, 4% { transform: translateX(0); animation-timing-function: steps(29, end); }
  24%, 96% { transform: translateX(100%); animation-timing-function: step-end; }
  100% { transform: translateX(0); }
}
.site-outs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.site-outs li { display: grid; gap: 0.375rem; justify-items: center; }
.site-outs em { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; }
.site-pic {
  display: grid; width: 100%; height: 4.5rem; padding: 0.5rem; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background);
}
.site-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 3px; }
.site-sheet i { border-radius: 1px; background: color-mix(in oklab, var(--foreground) 14%, transparent); }
.site-sheet i:nth-child(-n+3) { background: color-mix(in oklab, var(--foreground) 40%, transparent); }
.site-slide { align-content: center; gap: 5px; }
.site-slide i { height: 5px; border-radius: 1px; background: color-mix(in oklab, var(--foreground) 25%, transparent); transform-origin: left center; }
.site-slide i:nth-child(1) { width: 60%; background: color-mix(in oklab, var(--foreground) 65%, transparent); }
.site-slide i:nth-child(2) { width: 85%; }
.site-slide i:nth-child(3) { width: 45%; }
.site-report { grid-template-rows: auto minmax(0, 1fr); gap: 5px; }
.site-report-title { height: 4px; width: 55%; border-radius: 1px; background: color-mix(in oklab, var(--foreground) 60%, transparent); }
.site-chart { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid color-mix(in oklab, var(--foreground) 25%, transparent); }
.site-chart i { flex: 1; background: color-mix(in oklab, var(--foreground) 30%, transparent); transform-origin: bottom center; }
.site-chart i:nth-child(1) { height: 45%; }
.site-chart i:nth-child(2) { height: 85%; background: color-mix(in oklab, var(--foreground) 70%, transparent); }
.site-chart i:nth-child(3) { height: 30%; }
.site-chart i:nth-child(4) { height: 55%; }

/* Teams: Maya, the admin, presses Invite and Sam's row arrives and joins;
   Priya the contributor's time runs out and her row greys. */
.site-invite-btn {
  padding: 0.125rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--background);
  color: var(--foreground) !important; font-family: var(--font-sans) !important; font-weight: 500 !important;
  animation: site-press var(--site-anim-loop) linear infinite both;
}
@keyframes site-press { 0%, 8% { transform: none; } 10% { transform: scale(0.92); } 12%, 100% { transform: none; } }
.site-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }
.site-people li {
  position: relative; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background);
}
.site-people li.site-timed { padding-bottom: 0.75rem; }
.site-face {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--muted); border: 1px solid var(--border); box-sizing: border-box;
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em;
}
.site-face-admin { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.site-person { display: grid; line-height: 1.3; min-width: 0; }
.site-person b { font-size: 0.75rem; font-weight: 600; }
.site-person small { color: var(--muted-foreground); font-size: 0.6875rem; }
.site-people em { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; }
.site-countdown { position: absolute; left: 3.125rem; right: 0.75rem; bottom: 0.375rem; height: 2px; border-radius: 1px; background: color-mix(in oklab, var(--foreground) 10%, transparent); }
.site-countdown i {
  display: block; height: 100%; border-radius: inherit; background: color-mix(in oklab, var(--foreground) 55%, transparent);
  transform-origin: left center; transform: scaleX(0); animation: site-countdown var(--site-anim-loop) linear infinite both;
}
@keyframes site-countdown {
  0%, 8% { opacity: 1; transform: scaleX(1); }
  70%, 96% { opacity: 1; transform: scaleX(0); }
  98% { opacity: 0; transform: scaleX(0); }
  99% { opacity: 0; transform: scaleX(1); }
  100% { opacity: 1; transform: scaleX(1); }
}

/* Create an account: an invite link is used once, then no longer works. */
.site-anim-invite { max-width: 22rem; }
.site-link {
  margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.875rem; border: 1px solid var(--border); border-radius: 999px; background: var(--background); font-size: 0.75rem;
}
.site-link-name { font-weight: 600; }
.site-link em { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.625rem; }
.site-link-note { margin: 0; color: var(--muted-foreground); font-size: 0.75rem; line-height: 1.5; }

/* The step classes: site-in-N shows a part at N% of the loop, site-lit-N
   brings a dimmed part up, site-out-N and site-dim-N take one away or grey
   it, site-gx-N and site-gy-N grow a bar. Each holds the finished picture
   to about 94%, then resets for the next loop. */
.site-dim-66 { opacity: 0.45; animation: site-dim-66 var(--site-anim-loop) linear infinite both; }
@keyframes site-dim-66 { 0%, 66% { opacity: 1; } 69%, 94% { opacity: 0.45; } 98%, 100% { opacity: 1; } }
.site-dim-72 { opacity: 0.45; animation: site-dim-72 var(--site-anim-loop) linear infinite both; }
@keyframes site-dim-72 { 0%, 72% { opacity: 1; } 75%, 94% { opacity: 0.45; } 98%, 100% { opacity: 1; } }
.site-gx-50 { animation: site-gx-50 var(--site-anim-loop) linear infinite both; }
@keyframes site-gx-50 { 0%, 50% { transform: scaleX(0); } 56%, 98% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.site-gx-54 { animation: site-gx-54 var(--site-anim-loop) linear infinite both; }
@keyframes site-gx-54 { 0%, 54% { transform: scaleX(0); } 60%, 98% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.site-gx-58 { animation: site-gx-58 var(--site-anim-loop) linear infinite both; }
@keyframes site-gx-58 { 0%, 58% { transform: scaleX(0); } 64%, 98% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.site-gy-66 { animation: site-gy-66 var(--site-anim-loop) linear infinite both; }
@keyframes site-gy-66 { 0%, 66% { transform: scaleY(0); } 72%, 98% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.site-gy-70 { animation: site-gy-70 var(--site-anim-loop) linear infinite both; }
@keyframes site-gy-70 { 0%, 70% { transform: scaleY(0); } 76%, 98% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.site-gy-74 { animation: site-gy-74 var(--site-anim-loop) linear infinite both; }
@keyframes site-gy-74 { 0%, 74% { transform: scaleY(0); } 80%, 98% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.site-gy-78 { animation: site-gy-78 var(--site-anim-loop) linear infinite both; }
@keyframes site-gy-78 { 0%, 78% { transform: scaleY(0); } 84%, 98% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.site-in-06 { animation: site-in-06 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-06 { 0%, 6% { opacity: 0; transform: translateY(4px); } 9%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-14 { animation: site-in-14 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-14 { 0%, 14% { opacity: 0; transform: translateY(4px); } 17%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-18 { animation: site-in-18 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-18 { 0%, 18% { opacity: 0; transform: translateY(4px); } 21%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-22 { animation: site-in-22 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-22 { 0%, 22% { opacity: 0; transform: translateY(4px); } 25%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-26 { animation: site-in-26 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-26 { 0%, 26% { opacity: 0; transform: translateY(4px); } 29%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-30 { animation: site-in-30 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-30 { 0%, 30% { opacity: 0; transform: translateY(4px); } 33%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-34 { animation: site-in-34 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-34 { 0%, 34% { opacity: 0; transform: translateY(4px); } 37%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-38 { animation: site-in-38 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-38 { 0%, 38% { opacity: 0; transform: translateY(4px); } 41%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-42 { animation: site-in-42 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-42 { 0%, 42% { opacity: 0; transform: translateY(4px); } 45%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-46 { animation: site-in-46 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-46 { 0%, 46% { opacity: 0; transform: translateY(4px); } 49%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-50 { animation: site-in-50 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-50 { 0%, 50% { opacity: 0; transform: translateY(4px); } 53%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-54 { animation: site-in-54 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-54 { 0%, 54% { opacity: 0; transform: translateY(4px); } 57%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-58 { animation: site-in-58 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-58 { 0%, 58% { opacity: 0; transform: translateY(4px); } 61%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-62 { animation: site-in-62 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-62 { 0%, 62% { opacity: 0; transform: translateY(4px); } 65%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-66 { animation: site-in-66 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-66 { 0%, 66% { opacity: 0; transform: translateY(4px); } 69%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-74 { animation: site-in-74 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-74 { 0%, 74% { opacity: 0; transform: translateY(4px); } 77%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-in-86 { animation: site-in-86 var(--site-anim-loop) linear infinite both; }
@keyframes site-in-86 { 0%, 86% { opacity: 0; transform: translateY(4px); } 89%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
.site-lit-06 { animation: site-lit-06 var(--site-anim-loop) linear infinite both; }
@keyframes site-lit-06 { 0%, 6% { opacity: 0.35; } 9%, 94% { opacity: 1; } 98%, 100% { opacity: 0.35; } }
.site-lit-22 { animation: site-lit-22 var(--site-anim-loop) linear infinite both; }
@keyframes site-lit-22 { 0%, 22% { opacity: 0.35; } 25%, 94% { opacity: 1; } 98%, 100% { opacity: 0.35; } }
.site-lit-38 { animation: site-lit-38 var(--site-anim-loop) linear infinite both; }
@keyframes site-lit-38 { 0%, 38% { opacity: 0.35; } 41%, 94% { opacity: 1; } 98%, 100% { opacity: 0.35; } }
.site-lit-58 { animation: site-lit-58 var(--site-anim-loop) linear infinite both; }
@keyframes site-lit-58 { 0%, 58% { opacity: 0.35; } 61%, 94% { opacity: 1; } 98%, 100% { opacity: 0.35; } }
.site-out-38 { opacity: 0; animation: site-out-38 var(--site-anim-loop) linear infinite both; }
@keyframes site-out-38 { 0%, 38% { opacity: 1; } 41%, 97% { opacity: 0; } 100% { opacity: 1; } }
.site-out-50 { opacity: 0; animation: site-out-50 var(--site-anim-loop) linear infinite both; }
@keyframes site-out-50 { 0%, 50% { opacity: 1; } 53%, 97% { opacity: 0; } 100% { opacity: 1; } }
.site-out-70 { opacity: 0; animation: site-out-70 var(--site-anim-loop) linear infinite both; }
@keyframes site-out-70 { 0%, 70% { opacity: 1; } 73%, 97% { opacity: 0; } 100% { opacity: 1; } }

/* See it work: a box the video's shape, so nothing moves when it loads. */
.site-demo { display: grid; gap: 1.5rem; }
.site-demo h2 { margin: 0; font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.03em; }
.site-video { margin: 0; display: grid; gap: 0.75rem; }
.site-video video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--muted); box-shadow: var(--shadow-xs);
}
.site-video figcaption { color: var(--muted-foreground); font-size: 0.875rem; }

/* Sections: a rule above each, every other one on the muted ground. */
.site-section { border-top: 1px solid var(--border); padding: 5rem 0; }
.site-muted { background: color-mix(in oklab, var(--muted) 40%, var(--background)); }
.site-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2rem 4rem; align-items: start; }
.site-intro { display: grid; gap: 0.875rem; max-width: 30rem; }
.site-intro h2 { margin: 0; font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.03em; }
.site-intro p { margin: 0; color: var(--muted-foreground); font-size: 1rem; line-height: 1.65; }
.site-intro strong { color: var(--foreground); font-weight: 500; }
.site-label {
  margin: 0 0 0.75rem; color: var(--muted-foreground);
  font-family: var(--font-mono); font-size: var(--text-nano); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.site-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.site-rows li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.site-row-n { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.75rem; padding-top: 0.2rem; }
.site-rows strong { font-weight: 600; font-size: 0.9375rem; }
.site-rows p { margin: 0.25rem 0 0; color: var(--muted-foreground); }
.site-facts, .site-roles { margin: 0; display: grid; border-top: 1px solid var(--border); }
.site-facts > div, .site-roles > div { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.site-facts dt, .site-roles dt { font-weight: 600; font-size: 0.9375rem; }
.site-facts dd, .site-roles dd { margin: 0.25rem 0 0; color: var(--muted-foreground); }
.site-selfhost a { display: inline-block; margin-top: 0.25rem; color: var(--foreground); font-family: var(--font-mono); font-size: 0.8125rem; }
.site-roles > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0.25rem 1rem; }
.site-roles dd { margin: 0; }
.site-formats { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; background: var(--card); }
.site-formats li { display: grid; gap: 0.25rem; padding: 1.125rem 1.25rem; border-left: 1px solid var(--border); margin-left: -1px; }
.site-formats strong { font-weight: 600; }
.site-formats span { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.75rem; }
.site-small { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; max-width: 34rem; }
.site-end-actions { display: grid; gap: 0.75rem; justify-items: start; }
.site-foot { border-top: 1px solid var(--border); }
.site-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-top: 2rem; padding-bottom: 2rem; color: var(--muted-foreground); font-size: 0.75rem; }
.site-foot-links { display: inline-flex; gap: 1rem; }
.site-foot-links a { color: var(--muted-foreground); }
.site-foot-links a:hover { color: var(--foreground); }

@media (max-width: 960px) {
  .site-hero { padding: 3.5rem 0 3.5rem; }
  .site-hero-grid, .site-split { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .site-split { gap: 1.5rem; }
  .site-nav-link { display: none; }
}
/* Narrow screens: the gateway picture stands up, the tools in a column
   under the gateway, joined by one short wire. */
@media (max-width: 720px) {
  .site-ai { padding: 1rem; }
  .site-ai-canvas { grid-template-columns: minmax(0, 1fr); height: auto; }
  .site-ai-left { grid-template-rows: auto auto; }
  .site-ai-wires { display: none; }
  .site-ai-gate::after { right: auto; left: calc(50% - 5px); top: auto; bottom: -5px; }
  .site-ai-nodes { position: relative; grid-template-rows: none; gap: 0.5rem; margin-top: 1.5rem; }
  .site-ai-nodes::before {
    content: ""; position: absolute; left: 50%; top: -1.5rem; height: 1.5rem;
    border-left: 1px solid color-mix(in oklab, var(--foreground) 22%, transparent);
  }
  .site-ai-nodes li { padding: 0; }
  .site-ai-node::before { left: calc(50% - 5px); top: -5px; }
  .site-ai-nodes li + li .site-ai-node::before { display: none; }
}
@media (max-width: 560px) {
  .site-anim { max-width: none; }
  .site-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-wrap { padding: 0 1.25rem; }
  .site-head-row { height: 56px; }
  .site-head-btn { padding: 0 0.625rem; }
  .site-hero { padding: 2.5rem 0 3rem; }
  .site-hero h1 { font-size: 2.25rem; }
  .site-lead { font-size: 1rem; }
  .site-ctas, .site-ctas .btn { width: 100%; }
  .site-diagram-body { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .site-section { padding: 3rem 0; }
  .site-intro h2, .site-demo h2 { font-size: 1.5rem; }
  .site-roles > div { grid-template-columns: minmax(0, 1fr); }
  .site-formats { grid-template-columns: minmax(0, 1fr); }
  .site-formats li { border-left: 0; margin-left: 0; border-top: 1px solid var(--border); margin-top: -1px; }
  .site-wave { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0.5rem; }
  .site-wave-wide { display: none; }
  .site-wave-g { animation-name: site-wave-soft; animation-duration: 12s; }
}

/* ---------- marketplace (public and in the console) ----------
   Full width: the catalog has a filter rail and a fluid card grid; an
   item's page has its overview, its tool documentation and a sticky
   column with Import, the facts and an in-page contents list. The layout
   follows the width the page actually has (container queries), so the
   same page works inside the console beside the sidebar and on the
   public site. No script anywhere: filters are links, search is a GET
   form. */
.main-wide { max-width: none; }
.site-page { display: block; padding: 2.5rem clamp(1.25rem, 3vw, 3rem) 4rem; }
.site-wrap-wide { max-width: none; padding-left: clamp(1.25rem, 3vw, 3rem); padding-right: clamp(1.25rem, 3vw, 3rem); }
.site-nav-link[aria-current="page"] { color: var(--foreground); }
.site-hero-note { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; }
.site-hero-note a { color: var(--foreground); }

.mkt, .mkt-item { container-type: inline-size; }
.mkt-eyebrow {
  margin: 0; color: var(--muted-foreground);
  font-family: var(--font-mono); font-size: var(--text-nano); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.mkt-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2.5rem;
  padding: 0 0 1.75rem; margin: 0 0 1.75rem; border-bottom: 1px solid var(--border);
}
.mkt-head-text { display: grid; gap: 0.5rem; min-width: 0; max-width: 46rem; }
.mkt-head h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.03em; }
.mkt-lead { margin: 0; color: var(--muted-foreground); font-size: 1rem; line-height: 1.6; }
.mkt-search { display: flex; gap: 0.5rem; flex: 1 1 22rem; max-width: 34rem; }
.mkt-search input[type="search"] {
  flex: 1; min-width: 0; height: 2.5rem; padding: 0 0.875rem;
  border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); color: var(--foreground);
  font: inherit; font-size: 0.875rem; box-shadow: var(--shadow-xs);
}
.mkt-search input[type="search"]:focus { border-color: var(--ring); outline: none; box-shadow: var(--ring-focus); }

.mkt-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@container (min-width: 760px) {
  .mkt-layout { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 2.5rem; }
  .mkt-rail { position: sticky; top: 5rem; }
}
.mkt-rail { display: grid; gap: 1.5rem; font-size: var(--text-compact); }
/* Narrow: the filters become rows of chips above the cards. */
@container (max-width: 759px) {
  .mkt-rail { gap: 0.875rem; }
  .mkt-rail .mkt-facets { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }
  .mkt-rail .mkt-facets li { display: flex; }
  .mkt-rail .mkt-facets a { display: inline-flex; gap: 0.5rem; border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.75rem; }
  .mkt-rail .mkt-facets a[aria-current="true"] { box-shadow: none; background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
  .mkt-rail .mkt-facets a[aria-current="true"] .mkt-count { color: inherit; opacity: 0.75; }
  .mkt-rail-note { display: none; }
}
.mkt-rail-group { display: grid; gap: 0.375rem; }
.mkt-rail-h {
  margin: 0; color: color-mix(in oklab, var(--muted-foreground) 80%, transparent);
  font-family: var(--font-mono); font-size: var(--text-nano); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.mkt-facets { list-style: none; margin: 0 -0.5rem; padding: 0; display: grid; gap: 1px; }
.mkt-facets a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.375rem 0.5rem; border-radius: var(--radius-md);
  color: color-mix(in oklab, var(--foreground) 82%, transparent); text-decoration: none; font-weight: 500;
  transition: background-color 120ms, color 120ms;
}
.mkt-facets a:hover { background: var(--accent); color: var(--foreground); }
.mkt-facets a[aria-current="true"] { background: var(--accent); color: var(--foreground); box-shadow: inset 2px 0 0 var(--foreground); }
.mkt-count { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.mkt-toggle > span:first-child { display: inline-flex; align-items: center; gap: 0.5rem; }
.mkt-box { width: 14px; height: 14px; border: 1px solid var(--ring); border-radius: 4px; background: var(--background); flex: none; }
.mkt-toggle[aria-current="true"] .mkt-box { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 2.5px var(--background); }
.mkt-rail-clear { margin: 0; }
.mkt-rail-note { display: grid; gap: 0.375rem; padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in oklab, var(--muted) 45%, transparent); }
.mkt-rail-note p { margin: 0; color: var(--muted-foreground); line-height: 1.5; }

.mkt-results-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin: 0 0 1rem; }
.mkt-results-head h2 { margin: 0; font-size: 0.9375rem; }
.mkt-results-head p { margin: 0; font-size: var(--text-compact); }
.mkt-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mkt-grid > li { display: flex; min-width: 0; }
.mkt-card {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0;
  padding: 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}
.mkt-card:hover { border-color: color-mix(in oklab, var(--foreground) 22%, transparent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.mkt-card:focus-within { box-shadow: var(--ring-focus); }
.mkt-card h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.mkt-card-link { text-decoration: none; }
.mkt-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mkt-card-link:focus-visible { box-shadow: none; }
.mkt-card-sum { margin: 0; color: var(--muted-foreground); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mkt-card .listing-tags .version { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.75rem; }
.mkt-card-foot {
  margin: auto 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem;
  color: var(--muted-foreground); font-size: 0.75rem;
}
.mkt-card-tools { font-family: var(--font-mono); color: var(--foreground); }
.mkt-usewhen { margin: 0; font-size: var(--text-compact); color: var(--muted-foreground); line-height: 1.5; }
.mkt-usewhen strong { color: var(--foreground); font-weight: 500; }
.mkt-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }
.mkt-tag { display: inline-flex; align-items: center; height: 1.375rem; padding: 0 0.5rem; border-radius: var(--radius-sm); background: var(--muted); color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.6875rem; text-decoration: none; }
a.mkt-tag:hover { color: var(--foreground); }
.mkt-card .mkt-tags { position: relative; }

/* one item */
.mkt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.25rem; color: var(--muted-foreground); font-size: var(--text-compact); }
.mkt-crumbs a { color: var(--muted-foreground); text-decoration: none; }
.mkt-crumbs a:hover { color: var(--foreground); }
.mkt-crumbs [aria-current] { color: var(--foreground); }
.mkt-hero { display: flex; gap: 1.25rem; align-items: flex-start; padding: 0 0 1.75rem; margin: 0 0 1.75rem; border-bottom: 1px solid var(--border); }
.mkt-hero-icon { width: 64px; height: 64px; padding: 8px; border-radius: var(--radius-2xl); }
.mkt-hero-text { display: grid; gap: 0.375rem; min-width: 0; max-width: 54rem; }
.mkt-hero-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.mkt-hero-title h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.mkt-hero-title .badge-verified { height: 1.5rem; font-size: 0.75rem; padding: 0 0.5625rem; }
.mkt-hero .listing-by { font-size: var(--text-compact); }
.mkt-hero-sum { margin: 0.25rem 0 0; color: var(--muted-foreground); font-size: 1rem; line-height: 1.6; }
.mkt-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin: 0 0 1rem; }
.mkt-sec-head h2 { margin: 0; font-size: 1.125rem; }
.mkt-sec-head .hint { margin: 0; font-size: var(--text-compact); }
.mkt-band { margin: 0 0 2rem; }
.mkt-band .map-board { margin: 0; }
.mkt-sec { margin: 0 0 1.5rem; }
.mkt-sec h2 { font-size: 1rem; }
.mkt-card-sec { margin: 0 0 1.25rem; }
.mkt-card-sec .facts-list li { grid-template-columns: 8.5rem minmax(0, 1fr); }
.mkt-parts { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.mkt-parts li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.875rem 1rem; }
.mkt-parts li + li { border-top: 1px solid var(--border); }
.mkt-parts .app-icon { width: 32px; height: 32px; padding: 4px; }
.mkt-parts p { margin: 0; font-size: var(--text-compact); line-height: 1.5; }
.mkt-parts .mkt-part-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.mkt-part-name a, .mkt-part-name strong { font-weight: 600; }
.mkt-shots { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.mkt-cols {
  display: grid; gap: 2rem; align-items: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "side" "overview" "tools";
}
.mkt-overview { grid-area: overview; min-width: 0; }
.mkt-tools { grid-area: tools; min-width: 0; }
.mkt-side { grid-area: side; min-width: 0; }
@container (min-width: 820px) {
  .mkt-cols { grid-template-columns: minmax(0, 1fr) 17.5rem; grid-template-areas: "overview side" "tools side"; gap: 2rem 2.5rem; }
  .mkt-side { align-self: stretch; }
  .mkt-side-in { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow-y: auto; scrollbar-width: thin; }
}
@container (min-width: 1180px) {
  .mkt-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 18rem; grid-template-areas: "overview tools side"; }
}
.mkt-side-in { display: grid; gap: 1.25rem; }
.mkt-import { display: grid; gap: 0.75rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-xs); }
.mkt-import h2 { margin: 0; font-size: 1rem; }
.mkt-import p { margin: 0; font-size: var(--text-compact); line-height: 1.5; }
.mkt-selfhost { padding-top: 0.75rem; border-top: 1px solid var(--border); color: var(--muted-foreground); }
.mkt-facts { margin: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.mkt-facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.625rem 1rem; font-size: var(--text-compact); }
.mkt-facts > div + div { border-top: 1px solid var(--border); }
.mkt-facts dt { color: var(--muted-foreground); }
.mkt-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.mkt-facts .listing-links { gap: 0.25rem 0.75rem; }
.mkt-toc { display: grid; gap: 0.5rem; font-size: var(--text-compact); }
.mkt-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.125rem; }
.mkt-toc ol ol { margin: 0.25rem 0 0.25rem 0.5rem; padding-left: 0.625rem; border-left: 1px solid var(--border); }
.mkt-toc a { color: var(--muted-foreground); text-decoration: none; }
.mkt-toc a:hover { color: var(--foreground); }
.mkt-toc li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.5rem; padding: 0.125rem 0; }
.mkt-toc li > ol { flex-basis: 100%; }

/* tool documentation */
.mkt-tools-sum { margin: 0; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-foreground); }
.mkt-tools-sum strong { color: var(--foreground); font-weight: 600; }
.mkt-tools-lead { color: var(--muted-foreground); font-size: var(--text-compact); margin: -0.25rem 0 1rem; }
.mkt-keynote { font-size: var(--text-compact); }
.mkt-group { margin: 0 0 1.75rem; scroll-margin-top: 5rem; }
.mkt-group-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0 0 0.625rem; margin: 0 0 0.75rem; border-bottom: 1px solid var(--border);
}
.mkt-group-head h3 { margin: 0; font-size: 0.9375rem; }
summary.mkt-group-head { cursor: pointer; list-style: none; }
summary.mkt-group-head::-webkit-details-marker { display: none; }
summary.mkt-group-head::before { content: "\25B8"; color: var(--muted-foreground); font-size: 0.75rem; transition: transform 120ms; }
details[open] > summary.mkt-group-head::before { transform: rotate(90deg); }
details.mkt-group:not([open]) { margin-bottom: 0.75rem; }
.mkt-fold-note { font-size: var(--text-compact); margin: 0 0 1rem; }
.mkt-grant, .mkt-keyhas { color: var(--muted-foreground); font-size: 0.75rem; }
.mkt-keyhas { margin-left: auto; font-family: var(--font-mono); }
.mkt-tool {
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card);
  padding: 1rem 1.125rem; margin: 0 0 0.75rem; scroll-margin-top: 5rem;
  transition: border-color 150ms;
}
.mkt-tool:target { border-color: var(--foreground); box-shadow: var(--ring-focus); }
.mkt-tool h4 { margin: 0 0 0.375rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.mkt-anchor { text-decoration: none; }
.mkt-anchor code { font-size: 0.8125rem; font-weight: 600; color: var(--foreground); background: none; padding: 0; word-break: break-word; }
.mkt-anchor:hover code { text-decoration: underline; text-underline-offset: 3px; }
.mkt-rw { font-family: var(--font-mono); font-size: var(--text-nano); letter-spacing: 0.06em; text-transform: uppercase; padding: 0.0625rem 0.375rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted-foreground); }
.mkt-rw-w { color: color-mix(in oklab, var(--warn) 70%, var(--foreground)); border-color: color-mix(in oklab, var(--warn) 45%, var(--border)); }
.mkt-tool-desc { color: var(--muted-foreground); font-size: var(--text-compact); line-height: 1.55; margin: 0 0 0.75rem; }
.mkt-inputs { font-size: 0.8125rem; }
.mkt-inputs th, .mkt-inputs td { padding: 0.4375rem 0.75rem; vertical-align: top; }
.mkt-inputs td:last-child { color: var(--muted-foreground); min-width: 12rem; }
.mkt-inputs td code { font-size: 0.75rem; white-space: nowrap; }
.mkt-child td:first-child { padding-left: 1.5rem; }
.mkt-child td:first-child code { background: none; color: var(--muted-foreground); }
.mkt-req { font-weight: 500; }
.mkt-example { margin-top: 0.625rem; }
.mkt-example summary { cursor: pointer; color: var(--muted-foreground); font-size: var(--text-compact); font-weight: 500; width: max-content; }
.mkt-example summary:hover { color: var(--foreground); }
.mkt-example pre { margin-top: 0.5rem; font-size: 0.75rem; white-space: pre; overflow-wrap: normal; }
.mkt-plain { margin: 0; color: var(--muted-foreground); }

/* The preview's AI-tool wires carry a slow moving dash, in the homepage's
   wire style; with reduced motion they stand still. */
.mkt-band .map-edge-tools { stroke-dasharray: 6 5; animation: mkt-wire 2.4s linear infinite; }
@keyframes mkt-wire { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) {
  .mkt-band .map-edge-tools { animation: none; stroke-dasharray: none; }
  .mkt-card, .mkt-card:hover { transition: none; transform: none; }
}
@media (max-width: 560px) {
  .site-page { padding: 1.5rem 1.25rem 3rem; }
  .site-wrap-wide { padding-left: 1.25rem; padding-right: 1.25rem; }
  .mkt-head h1, .mkt-hero-title h1 { font-size: 1.5rem; }
  .mkt-hero { flex-direction: column; gap: 0.875rem; }
  .mkt-search { flex-basis: 100%; }
  .mkt-card-sec .facts-list li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}
