/* AccessFlow public site — hi-tech dark aesthetic */

/* Self-hosted Geist + Geist Mono (SIL OFL 1.1), vendored in fonts/.
   Both are variable fonts: one file covers the whole weight range, so each
   family needs only two files (latin, latin-ext) rather than one per weight.
   Cyrillic / Vietnamese / symbol subsets are deliberately not shipped — this
   site is English-only. Served from our own origin so first paint no longer
   waits on a fonts.googleapis.com round-trip, and the CSP can stay 'self'. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0A0D11;
  --bg-1: #0E1218;
  --bg-2: #131923;
  --bg-3: #1A2230;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --fg: #E6EAF2;
  --fg-dim: #B5BECC;
  --fg-mute: #8693A6;
  --fg-faint: #58657A;
  --accent: oklch(0.82 0.17 145);
  --accent-dim: oklch(0.55 0.13 145);
  --accent-bg: oklch(0.82 0.17 145 / 0.08);
  --info: oklch(0.74 0.13 235);
  --warn: oklch(0.82 0.14 80);
  --danger: oklch(0.7 0.18 25);
  /* surface tints — invert per theme */
  --tint-1: rgba(255, 255, 255, 0.02);
  --tint-2: rgba(255, 255, 255, 0.04);
  --tint-3: rgba(255, 255, 255, 0.06);
  --shadow-strong: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-soft:   0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --nav-bg: rgba(10, 13, 17, 0.75);
  --grid-line: rgba(255, 255, 255, 0.03);
  --hero-radial-1: rgba(120, 200, 130, 0.06);
  --hero-radial-2: rgba(80, 140, 220, 0.04);
  --radius: 4px;
  --radius-lg: 8px;
  --maxw: 1280px;
  --pad: 24px;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light theme — applied when html[data-theme="light"] OR (no override + OS prefers light) */

:root[data-theme="light"] {
  --bg: #FBFBFA;
  --bg-1: #FFFFFF;
  --bg-2: #F4F4F2;
  --bg-3: #E8E8E4;
  --line: rgba(10, 13, 17, 0.10);
  --line-strong: rgba(10, 13, 17, 0.18);
  --fg: #0A0D11;
  --fg-dim: #2C3340;
  --fg-mute: #56607A;
  --fg-faint: #8A92A6;
  --accent: oklch(0.55 0.15 145);
  --accent-dim: oklch(0.62 0.13 145);
  --accent-bg: oklch(0.55 0.15 145 / 0.10);
  --info: oklch(0.5 0.14 235);
  --warn: oklch(0.6 0.14 60);
  --danger: oklch(0.55 0.18 25);
  --tint-1: rgba(10, 13, 17, 0.025);
  --tint-2: rgba(10, 13, 17, 0.05);
  --tint-3: rgba(10, 13, 17, 0.08);
  --shadow-strong: 0 30px 60px -20px rgba(10, 13, 17, 0.18);
  --shadow-soft:   0 16px 40px -16px rgba(10, 13, 17, 0.14);
  --nav-bg: rgba(251, 251, 250, 0.80);
  --grid-line: rgba(10, 13, 17, 0.05);
  --hero-radial-1: rgba(40, 130, 60, 0.05);
  --hero-radial-2: rgba(40, 80, 160, 0.04);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #FBFBFA;
    --bg-1: #FFFFFF;
    --bg-2: #F4F4F2;
    --bg-3: #E8E8E4;
    --line: rgba(10, 13, 17, 0.10);
    --line-strong: rgba(10, 13, 17, 0.18);
    --fg: #0A0D11;
    --fg-dim: #2C3340;
    --fg-mute: #56607A;
    --fg-faint: #8A92A6;
    --accent: oklch(0.55 0.15 145);
    --accent-dim: oklch(0.62 0.13 145);
    --accent-bg: oklch(0.55 0.15 145 / 0.10);
    --info: oklch(0.5 0.14 235);
    --warn: oklch(0.6 0.14 60);
    --danger: oklch(0.55 0.18 25);
    --tint-1: rgba(10, 13, 17, 0.025);
    --tint-2: rgba(10, 13, 17, 0.05);
    --tint-3: rgba(10, 13, 17, 0.08);
    --shadow-strong: 0 30px 60px -20px rgba(10, 13, 17, 0.18);
    --shadow-soft:   0 16px 40px -16px rgba(10, 13, 17, 0.14);
    --nav-bg: rgba(251, 251, 250, 0.80);
    --grid-line: rgba(10, 13, 17, 0.05);
    --hero-radial-1: rgba(40, 130, 60, 0.05);
    --hero-radial-2: rgba(40, 80, 160, 0.04);
  }
}

/* AI chat bubble — the Cloudflare AI Search <chat-bubble-snippet> web component that
   app.js injects on every page. It renders in a shadow DOM and only knows the
   --search-snippet-* / --chat-bubble-* custom properties, so this block is the whole
   bridge from the site tokens above: every var() here re-resolves on the theme
   toggle, and the widget's own dark palette (which it only applies under the OS
   prefers-color-scheme, never from its theme attribute) is overridden outright.
   The two literals are the site's own: #0A0D11 is the .btn-primary text-on-accent
   colour, the oklch is .btn-primary:hover. */

chat-bubble-snippet {
  --search-snippet-primary-color: var(--accent);
  --search-snippet-primary-hover: oklch(0.88 0.17 145);
  --search-snippet-background: var(--bg-1);
  --search-snippet-surface: var(--bg-2);
  --search-snippet-hover-background: var(--bg-3);
  --search-snippet-text-color: var(--fg);
  --search-snippet-text-secondary: var(--fg-mute);
  --search-snippet-text-description: var(--fg-dim);
  --search-snippet-border-color: var(--line-strong);
  --search-snippet-focus-ring: var(--accent-bg);
  --search-snippet-error-color: var(--danger);
  --search-snippet-warning-color: var(--warn);
  --search-snippet-success-color: var(--accent);
  --search-snippet-user-message-bg: var(--accent);
  --search-snippet-user-message-text: #0A0D11;
  --search-snippet-assistant-message-bg: var(--bg-2);
  --search-snippet-assistant-message-text: var(--fg);
  --search-snippet-font-family: var(--sans);
  --search-snippet-font-family-mono: var(--mono);
  --search-snippet-border-radius: var(--radius-lg);
  --search-snippet-shadow: var(--shadow-soft);
  --search-snippet-shadow-lg: var(--shadow-strong);
  --chat-bubble-window-shadow: var(--shadow-strong);
  --chat-bubble-button-shadow: var(--shadow-soft);
  --chat-bubble-button-icon-color: #0A0D11;
  --chat-bubble-button-radius: var(--radius-lg);
  --chat-bubble-button-size: 52px;
  --chat-bubble-button-icon-size: 24px;
  --chat-bubble-button-z-index: 60; /* above the sticky .nav (50) */
}
/* The widget sets color-scheme from its theme attribute only for "light"; mirror
   both so native scrollbars and form controls inside the window match the site. */
chat-bubble-snippet[theme="dark"] { color-scheme: dark; }
chat-bubble-snippet[theme="light"] { color-scheme: light; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

body {
  background-image:
    radial-gradient(circle at 50% -10%, var(--hero-radial-1), transparent 50%),
    radial-gradient(circle at 100% 30%, var(--hero-radial-2), transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* shared */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Prose column on a sidebar-less page. A class rather than an inline style: the
   CSP style-src can only tighten to 'self' once the inline style="" attributes
   are gone, so don't add more of them. */
.wrap-narrow { max-width: 860px; }

.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 12px var(--accent);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section-head p {
  color: var(--fg-dim);
  font-size: 17px;
  max-width: 620px;
}

section {
  padding: 80px 0;
  position: relative;
}

section + section { border-top: 1px solid var(--line); }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--fg-mute); background: var(--tint-1); }

.btn-primary {
  background: var(--accent);
  color: #0A0D11;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  background: oklch(0.88 0.17 145);
  border-color: oklch(0.88 0.17 145);
}

.btn-ghost { border-color: transparent; }
.btn-ghost:hover { border-color: var(--line-strong); }

/* nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.logo-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  position: relative;
}

.logo-mark svg { width: 100%; height: 100%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}

.nav-links a {
  font-size: 13px;
  color: var(--fg-dim);
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--fg); background: var(--tint-2); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gh-stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  white-space: nowrap;
}

.nav-mobile { display: none; position: relative; order: 10; }
.nav-mobile > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile-panel {
  position: absolute;
  top: 44px;
  right: 0;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  box-shadow: var(--shadow-soft);
}
.nav-mobile-panel a {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--fg-dim);
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav-mobile-panel a:hover { background: var(--tint-2); color: var(--fg); }

/* theme toggle */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg-dim);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--line-strong); background: var(--tint-1); }

.theme-toggle-icon { display: none; }
:root[data-theme="light"] .theme-toggle-sun  { display: block; }
:root[data-theme="dark"]  .theme-toggle-moon { display: block; }
:root:not([data-theme])   .theme-toggle-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle-moon { display: none; }
  :root:not([data-theme]) .theme-toggle-sun  { display: block; }
}

.nav-mobile-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.nav-mobile-theme {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  border: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
}
.nav-mobile-theme:hover { background: var(--tint-2); }
.nav-mobile-theme-label { font-size: 14px; color: var(--fg-dim); }

/* hero */

.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
  border-top: 0;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-left .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  background: var(--tint-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  margin-bottom: 24px;
}
.hero-left .badge-tag {
  background: var(--accent);
  color: #0A0D11;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-bottom: 24px;
  text-wrap: balance;
}

.hero h1 .underline {
  position: relative;
  white-space: nowrap;
}
.hero h1 .underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: var(--accent);
  opacity: 0.25;
  z-index: -1;
}

.hero-sub {
  font-size: 18px;
  color: var(--fg-dim);
  max-width: 540px;
  margin-bottom: 36px;
  text-wrap: pretty;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.hero-meta b { color: var(--fg); font-weight: 500; }

/* terminal */
.terminal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-family: var(--mono);
  font-size: 13px;
  overflow: hidden;
  box-shadow: var(--shadow-strong), 0 0 0 1px var(--tint-1);
  position: relative;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--tint-1);
}
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-3); }
.terminal-title {
  font-size: 11px;
  color: var(--fg-mute);
  margin-left: 8px;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 18px 18px 20px;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}

.terminal-body .prompt { color: var(--accent); }
.terminal-body .cmd { color: var(--fg); }
.terminal-body .out { color: var(--fg-mute); }
.terminal-body .ok { color: var(--accent); }
.terminal-body .warn { color: var(--warn); }
.terminal-body .info { color: var(--info); }
.terminal-body .dim { color: var(--fg-faint); }

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* architecture */

.arch {
  background:
    linear-gradient(180deg, transparent 0%, var(--tint-1) 100%);
}

.arch-canvas {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.arch-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--tint-2) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.5;
}

.arch-row {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.arch-cell {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12px;
  min-width: 160px;
  text-align: center;
  position: relative;
}

.arch-cell.accent {
  border-color: var(--accent-dim);
  background: var(--accent-bg);
  color: var(--accent);
}

.arch-cell .label { display: block; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.1em; margin-bottom: 4px; }
.arch-cell .value { color: var(--fg); }
.arch-cell.accent .value { color: var(--accent); }

.arch-cell-md { min-width: 360px; }
.arch-cell-lg { min-width: 460px; }

.arch-conn {
  width: 1px;
  height: 32px;
  background: var(--line-strong);
  margin: 0 auto;
  position: relative;
}
.arch-conn::before {
  content: '▼';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fg-faint);
  font-size: 9px;
}

.arch-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.arch-services .arch-cell { min-width: 0; }

.arch-callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.arch-callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--tint-1);
}
.arch-callout .k { font-family: var(--mono); font-size: 10px; color: var(--fg-mute); letter-spacing: 0.1em; text-transform: uppercase; }
.arch-callout .v { display: block; margin-top: 6px; color: var(--fg-dim); font-size: 14px; }

/* features */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feat {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  position: relative;
  transition: background 0.2s;
}
.feat:hover { background: var(--bg-1); }

.feat-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.feat-icon svg { width: 18px; height: 18px; }

.feat h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.feat p {
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 1.55;
  text-wrap: pretty;
}

/* Contextual deep link at the end of a prose block. A class rather than an
   inline style: the CSP style-src can only tighten to 'self' once the inline
   style="" attributes are gone, so don't add more of them. */
.prose-link {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent-dim);
}
.prose-link:hover { border-bottom-style: solid; }

.feat .tag {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  text-transform: uppercase;
}

/* Connectors catalog */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.conn-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.conn-card:hover { border-color: var(--line-strong); background: var(--bg-2); }

.conn-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  /* Vendor logos are authored for a light background — several are single-colour
     dark navy (MariaDB #003545, DynamoDB #2E27AD, MySQL #00618A) and disappear
     against a theme tint in dark mode, while the light ones (ClickHouse #FAFF69,
     Elasticsearch #FED10A) disappear in light mode. A fixed white plate keeps
     every logo legible in both themes, including any connector added later. */
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  place-items: center;
}
.conn-logo img { width: 40px; height: 40px; object-fit: contain; }

.conn-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.conn-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.conn-card-custom { border-style: dashed; }
.conn-logo-plus {
  font-family: var(--mono);
  font-size: 28px;
  line-height: 1;
  /* --accent is a bright green in dark mode and would wash out on the white plate */
  color: var(--accent-dim);
}

/* how it works */

.flow-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* sticky rail only in the two-column flow, where it pins beside .flow-stage */
.flow-grid .flow-steps {
  position: sticky;
  top: 96px;
}

.flow-step {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.flow-step:hover { background: var(--tint-1); }
.flow-step.active {
  background: var(--bg-1);
  border-color: var(--line-strong);
}

.flow-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  width: 24px;
  flex-shrink: 0;
  padding-top: 2px;
}
.flow-step.active .flow-num { color: var(--accent); }

.flow-step h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.flow-step p {
  font-size: 13px;
  color: var(--fg-mute);
}

/* reused inside a docs page: keep the card scale, not the docs prose scale, and
   drop the stepper affordance — there is no .flow-stage to switch there */
.docs-section .flow-step h3 {
  font-size: 14px;
  margin: 0 0 4px;
}
.docs-section .flow-step p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 0;
  color: var(--fg-mute);
}
.docs-section .flow-step { cursor: default; }
.docs-section .flow-step:hover { background: transparent; }

.flow-stage {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

/* mock UIs */

.mock {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--tint-1);
  font-size: 11px;
  color: var(--fg-mute);
}

.mock-bar .seg {
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--tint-2);
}
.mock-bar .seg.on { background: var(--accent-bg); color: var(--accent); }

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--tint-3);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--fg-dim);
}

/* sql editor */
.sql-editor {
  background: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 16px 0;
  position: relative;
}
.sql-line { display: flex; gap: 16px; padding: 0 16px; }
.sql-line .ln { color: var(--fg-faint); width: 18px; text-align: right; flex-shrink: 0; user-select: none; }
.sql-line.flag { background: oklch(0.82 0.14 80 / 0.06); }
.sql-line.flag::before {
  content: '';
  position: absolute;
  left: 0;
  width: 2px;
  height: 24px;
  background: var(--warn);
}

.sql-kw { color: var(--info); }
.sql-fn { color: oklch(0.78 0.14 320); }
.sql-str { color: var(--accent); }
.sql-num { color: var(--warn); }
.sql-com { color: var(--fg-faint); font-style: italic; }
.sql-op { color: var(--fg-dim); }

/* AI panel */
.ai-panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--sans);
}

.risk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.risk-meter {
  flex: 1;
  height: 4px;
  background: var(--tint-3);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.risk-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--warn));
  width: 62%;
  border-radius: 999px;
}
.risk-label { font-family: var(--mono); font-size: 11px; color: var(--warn); letter-spacing: 0.04em; }

.ai-finding {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.ai-finding:first-of-type { border-top: 0; }
.ai-finding .marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.ai-finding.warn .marker { background: oklch(0.82 0.14 80 / 0.15); color: var(--warn); }
.ai-finding.info .marker { background: oklch(0.74 0.13 235 / 0.15); color: var(--info); }
.ai-finding.ok .marker { background: var(--accent-bg); color: var(--accent); }
.ai-finding strong { font-weight: 500; color: var(--fg); }
.ai-finding p { color: var(--fg-mute); font-size: 12px; margin-top: 2px; }

/* review queue */
.review-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
}
.review-row:last-child { border-bottom: 0; }

.review-row .id { color: var(--fg-faint); font-size: 11px; }
.review-row .sql {
  color: var(--fg-dim);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.review-row .who { color: var(--fg-mute); font-size: 11px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.pending { background: oklch(0.82 0.14 80 / 0.1); color: var(--warn); }
.pill.approved { background: var(--accent-bg); color: var(--accent); }
.pill.executed { background: oklch(0.74 0.13 235 / 0.1); color: var(--info); }
.pill.rejected { background: oklch(0.7 0.18 25 / 0.1); color: var(--danger); }
.pill.ai { background: oklch(0.78 0.14 320 / 0.1); color: oklch(0.78 0.14 320); }

/* use cases */
.uc-list {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.uc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.uc-row:nth-child(even) .uc-visual { order: -1; }

.uc-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.uc-persona {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.uc-copy h3 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.uc-copy > p {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.7;
}

.uc-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.uc-benefits li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.6;
}

.uc-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  color: var(--accent);
}

.uc-mock-body {
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.uc-mock-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.uc-mock-line .k {
  color: var(--fg-faint);
  flex-shrink: 0;
  min-width: 72px;
}

.uc-mock-line .v {
  color: var(--fg-dim);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uc-mock-line .pill { flex-shrink: 0; }

.uc-mock-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
}

.uc-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--fg-mute);
  flex-shrink: 0;
}

/* install */

.install-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
  margin-bottom: 16px;
}

.install-tab {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  padding: 6px 14px;
  border-radius: 3px;
  transition: all 0.15s;
}
.install-tab.active {
  background: var(--bg-3);
  color: var(--fg);
}

.code-block {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  position: relative;
  overflow: hidden;
}

.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--fg-mute);
}

.copy-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.copy-btn:hover { color: var(--fg); border-color: var(--line-strong); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent-dim); }
.copy-btn svg { width: 12px; height: 12px; }

.code-block pre {
  padding: 18px;
  overflow-x: auto;
  white-space: pre;
}

.code-block .c-com { color: var(--fg-faint); }
.code-block .c-kw { color: var(--info); }
.code-block .c-str { color: var(--accent); }
.code-block .c-flag { color: oklch(0.78 0.14 320); }
.code-block .c-out { color: var(--fg-mute); }

.install-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
}

.install-meta {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-1);
}
.install-meta h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.install-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; font-family: var(--mono); font-size: 12px; }
.install-meta dt { color: var(--fg-mute); }
.install-meta dd { color: var(--fg); text-align: right; }
.install-meta-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  margin: 20px 0 8px;
}
.install-meta-sub:first-of-type { margin-top: 0; }
.install-meta-note {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--fg-faint);
}

/* roadmap */

.rm-band-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.rm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}

.rm-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.rm-cell:hover {
  border-color: var(--line-strong);
  background: var(--bg-2);
}

.rm-cat {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.rm-cell ul,
.rm-planned ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rm-cell li,
.rm-planned li {
  font-size: 12px;
  color: var(--fg-mute);
  display: flex;
  gap: 8px;
}
.rm-cell li::before,
.rm-planned li::before {
  content: '—';
  color: var(--fg-faint);
  flex-shrink: 0;
}

/* planned — a secondary footnote to the grid above, not a fourth column */
.rm-planned {
  margin-top: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 32px;
}
.rm-planned .rm-cat { color: var(--fg-faint); }
.rm-planned ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* docs */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.doc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s;
  min-height: 140px;
}
.doc-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  background: var(--bg-2);
}

.doc-card .doc-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
}
.doc-card h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.doc-card p {
  font-size: 12px;
  color: var(--fg-mute);
  line-height: 1.5;
  margin-top: auto;
}

/* common questions */

.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.qa-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.qa-item:hover {
  border-color: var(--line-strong);
  background: var(--bg-2);
}

.qa-item h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.qa-item p {
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 1.65;
}

/* cta + footer */

.big-cta {
  text-align: center;
  padding: 80px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 0%, oklch(0.82 0.17 145 / 0.08), transparent 60%),
    var(--bg-1);
  position: relative;
  overflow: hidden;
}
.big-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 0%, transparent 70%);
  pointer-events: none;
}
.big-cta h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  position: relative;
}
.big-cta p {
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 540px;
  margin: 0 auto 32px;
  position: relative;
}
.big-cta .hero-cta { justify-content: center; position: relative; }

footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-col h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 13px;
  color: var(--fg-dim);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--fg); }

.footer-tag {
  font-size: 13px;
  color: var(--fg-mute);
  margin-top: 12px;
  max-width: 260px;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
}

.footer-bar .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  margin-right: 24px;
}
.footer-social a {
  display: inline-flex;
  color: var(--fg-dim);
  transition: color 0.15s;
}
.footer-social a:hover { color: var(--fg); }
.footer-social svg { width: 14px; height: 14px; }
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* responsive */

/* nav collapse ladder — every nav item stays on a single line at any width:
   drop the "Quick start" CTA first, then the GitHub chip, then fold the links
   into the hamburger, and finally drop the primary CTA on phones. Below 520px
   every .nav-right control is gone, so the hamburger panel is the whole header
   nav — which is why it carries its own "Quick start" entry below the divider
   (AF-791). Never remove that entry without also un-hiding a .nav-right CTA. */
@media (max-width: 1280px) {
  .nav-right .btn-ghost { display: none; }
}

@media (max-width: 1140px) {
  .gh-stars { display: none; }
}

@media (max-width: 520px) {
  .nav-right .btn-primary { display: none; }
  .nav-inner { gap: 16px; }
}

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-mobile { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-grid .flow-steps { position: static; }
  .uc-row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .uc-row:nth-child(even) .uc-visual { order: 0; }
  .uc-list { gap: 56px; }
  .install-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .rm-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
  .arch-services { grid-template-columns: repeat(2, 1fr); }
  .arch-callouts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  section { padding: 60px 0; }
  .hero { padding: 64px 0 56px; }
  .feat-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .qa-grid { grid-template-columns: 1fr; }
  .rm-grid { grid-template-columns: 1fr; }
  .rm-planned { flex-direction: column; align-items: stretch; gap: 12px; }
  .rm-planned ul { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bar { flex-direction: column; gap: 16px; }
  .footer-social { margin: 0; }
  .arch-canvas { padding: 24px; }
  .arch-services { grid-template-columns: 1fr; }
  .terminal-body { font-size: 11px; }
  .hero-meta { gap: 16px; }
  .review-row { grid-template-columns: 1fr auto; gap: 8px; }
  .review-row .id, .review-row .who { display: none; }
  /* long identifiers wrap instead of pushing the page wide */
  .docs-section li > code,
  .docs-section p > code { white-space: normal; overflow-wrap: anywhere; }
  /* roomier tap targets on touch screens */
  .docs-toc a { padding: 10px 12px; }
  .copy-btn { padding: 8px 12px; font-size: 12px; }
  .copy-btn svg { width: 14px; height: 14px; }
}

@media (max-width: 640px) {
  /* stacked, full-width architecture cells — no horizontal scroll on phones */
  .arch-cell,
  .arch-cell-md,
  .arch-cell-lg { min-width: 0; width: 100%; }
  .arch-row { width: 100%; }
}

/* util */
.divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}
.scroll-pad { scroll-margin-top: 80px; }

/* never let media push the page wider than the viewport on small screens */
img, table, pre { max-width: 100%; }

/* Docs page
   ---------------------------------------------------------------- */

.docs-main {
  padding: 56px 0 88px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 8px 0;
}

.docs-sidebar-mobile > summary {
  display: none;
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
}

/* Sidebar group labels are deliberately NOT headings. They sit above the page
   <h1> inside <main>, so as <h5> they put stray headings ahead of the h1 in the
   document outline. */
.docs-toc-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 20px 0 6px;
  font-weight: 500;
}

.docs-toc-label:first-child { margin-top: 0; }

/* Current chapter in the cross-chapter sidebar. */
.docs-toc a.docs-toc-current {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-bg);
}

.docs-toc a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--fg-dim);
  border-left: 1px solid var(--line);
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.docs-toc a:hover {
  color: var(--fg);
  border-left-color: var(--line-strong);
  background: var(--tint-1);
}

.nav-link-active {
  color: var(--accent) !important;
}

.docs-content {
  min-width: 0;
  max-width: 820px;
}

/* The homepage grids are sized for the full 1280px wrap. Inside the 820px docs
   column they need fewer tracks. Their existing collapse rules are viewport-scoped
   and never fire here: by the time the viewport is narrow enough, .docs-layout has
   already gone single-column and the block is full width again. */
.docs-content .feat-grid,
.docs-content .qa-grid {
  grid-template-columns: 1fr;
}

.docs-content .arch-callouts {
  grid-template-columns: 1fr;
}

.docs-content .arch-services {
  grid-template-columns: repeat(2, 1fr);
}

/* /use-cases/ hosts the homepage .uc-row blocks in the same 820px column, where two
   tracks would squeeze the mock panels. These override the base rules outright rather
   than relying on the viewport collapse at 1024px, which only fires once .docs-layout
   has itself gone single-column. .docs-section ul likewise re-adds the left padding
   .uc-benefits deliberately drops. The explicit order:0 keeps the mock below the copy
   structurally: .uc-row:nth-child(even) .uc-visual would otherwise flip it above the
   moment anything is inserted before a .uc-row, and only above 1024px. */
.docs-content .uc-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.docs-content .uc-row .uc-visual {
  order: 0;
}

.docs-content .uc-persona {
  display: block;
  margin-bottom: 10px;
}

.docs-content .uc-benefits {
  padding-left: 0;
}

/* .uc-copy spaces its children with a flex gap; .docs-section p would add a margin
   on top of it, so the paragraphs would sit further apart here than on the homepage. */
.docs-content .uc-copy > p {
  margin-bottom: 0;
}

/* Engine fact strip on a /connectors/<engine>/ page — the six facts a reader
   checks before reading prose: family, language, runtime, port, SSL, install. */
.engine-facts {
  display: grid;
  /* Exactly three columns so the six facts fill two full rows — auto-fit left
     empty cells that read as broken tiles rather than as deliberate space. */
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 28px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.engine-facts > div {
  background: var(--bg);
  padding: 12px 16px;
}

.engine-facts dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 4px;
}

.engine-facts dd {
  margin: 0;
  font-size: 13px;
  color: var(--fg);
}

/* Breadcrumb — the visible counterpart to the BreadcrumbList JSON-LD. Google
   expects the markup to describe a trail the reader can actually see, and it
   gives every deep page a real link back up its own hierarchy. */
.breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: '/';
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--fg-mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--line-strong);
}

.breadcrumb [aria-current='page'] {
  color: var(--fg);
}

@media (max-width: 900px) {
  .engine-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .engine-facts { grid-template-columns: 1fr; }
}

.docs-hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.docs-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 16px 0 20px;
}

.docs-hero p {
  color: var(--fg-dim);
  font-size: 17px;
  max-width: 70ch;
}

.docs-hero p.docs-updated {
  color: var(--fg-mute);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  margin-top: -8px;
}

.docs-hero a:not(.btn):not(.breadcrumb a),
.docs-content a:not(.btn):not(.breadcrumb a) {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent-dim);
  transition: color 0.12s, border-color 0.12s;
}

.docs-hero a:not(.btn):not(.breadcrumb a):hover,
.docs-content a:not(.btn):not(.breadcrumb a):hover {
  color: var(--fg);
  border-bottom-color: var(--fg-mute);
}

/* .docs-section is a <section>, so it would otherwise inherit the marketing
   page rhythm above. It sets its own, tighter one — the section + section rule
   draws the divider, so pad evenly either side of it. */
.docs-section {
  padding: 0 0 48px;
  margin-bottom: 0;
  scroll-margin-top: 88px;
}

.docs-section + .docs-section { padding-top: 48px; }

/* Changelog: the "Released <date> · GitHub" line under each release heading. */
.docs-section p.changelog-meta {
  color: var(--fg-mute);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  margin-top: -12px;
  margin-bottom: 20px;
}

.docs-section h2 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.docs-section h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
  scroll-margin-top: 88px;
}

.docs-section h4 {
  font-size: 16px;
  font-weight: 500;
  margin: 28px 0 12px;
  scroll-margin-top: 88px;
}

.docs-section p,
.docs-section ul,
.docs-section ol {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 72ch;
}

.docs-section ul,
.docs-section ol {
  padding-left: 24px;
}

.docs-section li { margin-bottom: 6px; }

.docs-section li > code,
.docs-section p > code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg);
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.docs-section strong {
  color: var(--fg);
  font-weight: 500;
}

.docs-section .code-block { margin: 20px 0; }

.docs-pre-plain {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--fg-dim);
  margin: 16px 0 20px;
  overflow-x: auto;
  white-space: pre;
}

.docs-callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--fg-mute);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--bg-1);
  margin: 20px 0;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.6;
  max-width: 72ch;
}

.docs-callout strong { color: var(--fg); }

.docs-callout.warn   { border-left-color: var(--warn); }
.docs-callout.info   { border-left-color: var(--info); }
.docs-callout.ok     { border-left-color: var(--accent); }

.docs-figure {
  margin: 20px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  overflow: hidden;
  max-width: 100%;
}
.docs-figure picture,
.docs-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.docs-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--fg-mute);
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.docs-figure figcaption code {
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 12px;
}

.docs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 20px 0;
  background: var(--bg-1);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.docs-table thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--fg-mute);
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.docs-table thead th:not(:first-child) { text-align: center; width: 80px; }

.docs-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
}

.docs-table tbody td:not(:first-child) {
  text-align: center;
  font-family: var(--mono);
  color: var(--accent);
}

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

.docs-table tbody tr:nth-child(even) td { background: var(--tint-1); }

/* Comparison matrix (/compare/): phrase-length cells in three columns. The default
   .docs-table non-first column is an 80px centred accent-mono tick column, which
   would wrap "Not documented" badly and colour it like a "yes". */
.docs-table.compare-table thead th:not(:first-child) { width: auto; min-width: 150px; text-align: left; }
.docs-table.compare-table tbody td:not(:first-child) { text-align: left; font-family: inherit; color: var(--fg-dim); }

/* Status marks in the matrix and check bullets on the "better fit" lists. */
.cmp-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.5em; height: 1.5em; margin-right: 0.55em; border-radius: 50%; font-size: 0.9em; font-weight: 700; line-height: 1; vertical-align: -0.2em; flex: 0 0 auto; }
.cmp-yes     { color: var(--accent); background: var(--accent-bg); }
.cmp-partial { color: var(--warn);   background: color-mix(in oklab, var(--warn) 14%, transparent); }
.cmp-no      { color: var(--danger); background: color-mix(in oklab, var(--danger) 14%, transparent); }
.cmp-nd      { color: var(--fg-dim); background: var(--line-strong); }
.compare-legend { margin-top: 12px; font-size: 13px; color: var(--fg-dim); }
.compare-legend .cmp-mark { margin-right: 0.3em; }
.docs-content ul.compare-fit { list-style: none; padding-left: 0; }
.docs-content ul.compare-fit li { position: relative; padding-left: 2em; }
.docs-content ul.compare-fit li::before { content: "\2713"; position: absolute; left: 0; top: 0.15em; width: 1.4em; height: 1.4em; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85em; font-weight: 700; color: var(--accent); background: var(--accent-bg); }

.docs-link-list {
  list-style: none;
  padding: 0;
}

.docs-link-list li {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--bg-1);
}

.docs-link-list li:hover { border-color: var(--line-strong); }

@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .docs-sidebar-mobile > summary {
    display: block;
    cursor: pointer;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-1);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--fg-dim);
    list-style: none;
  }
  .docs-sidebar-mobile > summary::-webkit-details-marker { display: none; }
  .docs-sidebar-mobile > summary::after {
    content: '▾';
    float: right;
    color: var(--fg-mute);
  }
  .docs-sidebar-mobile[open] > summary { margin-bottom: 16px; }
  .docs-sidebar-mobile[open] > summary::after { content: '▴'; }
  .docs-content { max-width: 100%; }
  .docs-hero h1 { font-size: 28px; }
  .docs-section h2 { font-size: 24px; }
}

@media (min-width: 1025px) {
  .docs-sidebar-mobile { display: block; }
  .docs-sidebar-mobile > summary { display: none; }
  /* /roadmap/ hosts the homepage .rm-grid in the 820px docs column, where three
     tracks leave ~200px of text per cell. Scoped to the two-column layout only:
     below 1025px .docs-content is full width and the .rm-grid viewport collapses
     (2-up at 1024px, 1-up at 720px) must keep winning, which an unconditional
     .docs-content override would out-specify. */
  .docs-content .rm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .nav-right .btn-ghost { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: clamp(32px, 8vw, 44px); }
  .hero-cta { gap: 8px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .terminal-body { padding: 14px; font-size: 10.5px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .install-tabs { flex-wrap: wrap; }
  section { padding: 48px 0; }
  .arch-canvas { padding: 16px; }
  .code-block pre { padding: 14px; font-size: 12px; }
}

/* ---- Provenance strip -------------------------------------------------- */
/* Trust signal near the footer: linked, checkable facts about how the project
   is built. Counts in the markup are floors ("900+") so they cannot go stale
   into a false claim as the repo grows. */

.provenance {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.provenance h2 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.provenance > .wrap > p {
  color: var(--fg-dim);
  max-width: 62ch;
  margin-bottom: 40px;
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 0 0 32px;
}

.provenance-grid > div {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint-1);
}

.provenance-grid dt {
  font-family: var(--mono);
  font-size: 15px;
  margin-bottom: 8px;
}

.provenance-grid dt a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s;
}

.provenance-grid dt a:hover { border-bottom-color: var(--accent); }

.provenance-grid dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-mute);
}

.provenance-security {
  font-size: 14px;
  color: var(--fg-mute);
}

.provenance-security a {
  color: var(--fg-dim);
  border-bottom: 1px dotted var(--line-strong);
}

.provenance-security a:hover { color: var(--fg); }

@media (max-width: 640px) {
  .provenance { padding: 72px 0; }
  .provenance-grid { grid-template-columns: 1fr; }
}

/* ---- Text-colour utilities --------------------------------------------- */
/* Replaces the single-declaration `style="color: var(--x)"` attributes that
   were scattered through the markup. `.c-*` is already taken by the code-block
   syntax colours, hence `.t-*` for text.
   NOTE: this does NOT let the CSP drop style-src 'unsafe-inline' — multi-
   declaration inline styles remain in the layout blocks, and that directive is
   all-or-nothing. See README → "Response headers". */

.t-accent { color: var(--accent); }
.t-fg     { color: var(--fg); }
.t-dim    { color: var(--fg-dim); }
.t-mute   { color: var(--fg-mute); }
.t-faint  { color: var(--fg-faint); }
.t-warn   { color: var(--warn); }
.t-info   { color: var(--info); }

.ml-auto  { margin-left: auto; }
