/* ==========================================================================
   AngleSharp website — 2026 edition
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('./fonts/inter.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('./fonts/jetbrains-mono.woff2') format('woff2-variations');
}

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;

  --brand-deep: #0a6fd1;
  --brand: #1ba1e2;
  --brand-light: #36c5f4;
  --violet: #8b6cff;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --header-h: 64px;
  --container: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #070b14;
  --bg-elev: #0c1220;
  --bg-elev-2: #111a2c;
  --bg-card: rgba(148, 178, 230, 0.035);
  --bg-card-hover: rgba(148, 178, 230, 0.07);
  --border: rgba(148, 178, 230, 0.12);
  --border-strong: rgba(148, 178, 230, 0.22);
  --text: #e7eef8;
  --text-dim: #93a1b8;
  --text-faint: #5f6d84;
  --accent: var(--brand-light);
  --accent-strong: #6ad7fb;
  --accent-bg: rgba(54, 197, 244, 0.1);
  --code-bg: #0a101c;
  --inline-code-bg: rgba(148, 178, 230, 0.1);
  --header-bg: rgba(7, 11, 20, 0.72);
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
  --grid-line: rgba(148, 178, 230, 0.05);
}

[data-theme='light'] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elev: #f5f8fc;
  --bg-elev-2: #edf2f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fbff;
  --border: rgba(15, 35, 70, 0.1);
  --border-strong: rgba(15, 35, 70, 0.2);
  --text: #0d1729;
  --text-dim: #536079;
  --text-faint: #8691a6;
  --accent: #0a74c9;
  --accent-strong: #0057b0;
  --accent-bg: rgba(10, 116, 201, 0.08);
  --code-bg: #f6f8fb;
  --inline-code-bg: rgba(10, 60, 130, 0.07);
  --header-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 10px 30px -12px rgba(15, 35, 70, 0.18);
  --grid-line: rgba(15, 35, 70, 0.05);
}

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

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

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

img {
  max-width: 100%;
  height: auto;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
}

::selection {
  background: rgba(54, 197, 244, 0.3);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-200%);
  z-index: 100;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

.dim {
  color: var(--text-faint);
}

.gradient-text {
  background: linear-gradient(100deg, var(--brand-light) 0%, var(--brand) 40%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme='light'] .gradient-text {
  background-image: linear-gradient(100deg, #0a8fd6 0%, #0a6fd1 45%, #6a4cf0 100%);
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* --------------------------------------------------------------------------
   buttons & chips
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #1ea8ec, #0b78d6);
  box-shadow: 0 0 0 1px rgba(54, 197, 244, 0.4) inset, 0 8px 24px -8px rgba(27, 161, 226, 0.6);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 0 1px rgba(106, 215, 251, 0.7) inset, 0 10px 30px -8px rgba(27, 161, 226, 0.8);
}

.btn-ghost {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg-card-hover);
  border-color: var(--border);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-dim);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

.chip .icon {
  width: 13px;
  height: 13px;
}

.chip-version {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
}

.chip-stable {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
}

.chip-preview {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.chip-deprecated {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.25);
}

[data-theme='light'] .chip-stable {
  color: #047857;
}

[data-theme='light'] .chip-preview {
  color: #b45309;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-bg);
  border-radius: 999px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: '// ';
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   install snippet
   -------------------------------------------------------------------------- */

.install {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 6px 6px 16px;
  font-size: 14px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.install code {
  overflow-x: auto;
  white-space: nowrap;
  color: var(--text);
  scrollbar-width: none;
}

.install-prompt {
  font-family: var(--font-mono);
  color: var(--text-faint);
  user-select: none;
}

.install-pkg {
  color: var(--accent);
}

.install .icon-btn {
  width: 32px;
  height: 32px;
}

.install .icon-btn .icon {
  width: 16px;
  height: 16px;
}

.install-sm {
  font-size: 13px;
  margin-top: 4px;
}

.copy-btn.copied {
  color: #34d399 !important;
}

/* --------------------------------------------------------------------------
   header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand-name {
  font-weight: 400;
}

.brand-name b {
  font-weight: 700;
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.main-nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.main-nav a[aria-current='page'] {
  color: var(--text);
}

.main-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -13px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-light), var(--violet));
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 240px;
  height: 38px;
  padding: 0 8px 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text-faint);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.search-trigger:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.search-trigger span {
  flex: 1;
  text-align: left;
}

[data-theme='dark'] .theme-light,
[data-theme='light'] .theme-dark {
  display: none;
}

.nav-toggle {
  display: none;
}

/* --------------------------------------------------------------------------
   hero & page hero
   -------------------------------------------------------------------------- */

.hero,
.page-hero,
.not-found {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.grid-lines {
  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: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.glow-a {
  width: 620px;
  height: 420px;
  top: -200px;
  left: 8%;
  background: radial-gradient(circle, rgba(27, 161, 226, 0.55), transparent 70%);
}

.glow-b {
  width: 520px;
  height: 420px;
  top: 40px;
  right: -120px;
  background: radial-gradient(circle, rgba(139, 108, 255, 0.4), transparent 70%);
}

[data-theme='light'] .glow {
  opacity: 0.28;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 5px 8px 5px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color 0.2s;
}

.hero-badge:hover {
  color: var(--text);
  border-color: var(--accent);
}

.hero-badge-arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--accent);
  background: var(--accent-bg);
  border-radius: 50%;
}

.hero-badge-arrow .icon {
  width: 13px;
  height: 13px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.6vw, 68px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lead {
  margin: 0 0 32px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.page-hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-hero .lead {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   code window (home)
   -------------------------------------------------------------------------- */

.window {
  position: relative;
  background: #0a101c;
  border: 1px solid rgba(148, 178, 230, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  color: #e7eef8;
}

.window::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(54, 197, 244, 0.55), transparent 35%, transparent 65%, rgba(139, 108, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  padding: 7px 14px;
  min-height: 46px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(148, 178, 230, 0.1);
}

.dots {
  display: flex;
  gap: 7px;
}

.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2a3346;
}

.dots i:nth-child(1) {
  background: #ff5f57;
}

.dots i:nth-child(2) {
  background: #febc2e;
}

.dots i:nth-child(3) {
  background: #28c840;
}

.window-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.window-tabs button {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #8190a8;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.window-tabs button:hover {
  color: #e7eef8;
}

.window-tabs button[aria-selected='true'] {
  color: #e7eef8;
  background: rgba(54, 197, 244, 0.12);
  box-shadow: 0 0 0 1px rgba(54, 197, 244, 0.25) inset;
}

/* each tab takes the height of its own sample; app.js animates the change */
.code-panels {
  overflow: hidden;
  transition: height 0.3s var(--ease);
}

.code-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: fade-in 0.35s var(--ease);
}

.code-panel[hidden] {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.code-scroll {
  flex: 1;
  min-width: 0;
}

.code-scroll .code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.code-scroll pre.shiki {
  padding: 18px 20px;
  font-size: 13.5px;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.window .shiki,
.window .shiki span {
  color: var(--shiki-dark) !important;
}

.code-output {
  padding: 12px 20px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(148, 178, 230, 0.1);
}

.code-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.code-output-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f6d84;
}

.code-output pre {
  margin: 0;
  font-size: 13px;
  color: #6ee7b7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-pkg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #93a1b8;
  background: rgba(10, 16, 28, 0.85);
  border: 1px solid rgba(148, 178, 230, 0.14);
  border-radius: 999px;
}

.code-pkg .icon {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   stats
   -------------------------------------------------------------------------- */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 28px 24px;
  text-align: center;
  border-left: 1px solid var(--border);
}

.stat:first-child {
  border-left: 0;
}

.stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat span {
  font-size: 14px;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   sections
   -------------------------------------------------------------------------- */

.section {
  padding: 96px 0;
}

.section-tight {
  padding: 56px 0 96px;
}

.section-alt {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 0;
  font-size: 17px;
  color: var(--text-dim);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.section-head-row h2 {
  margin: 0;
}

/* features */

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

.feature-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(54, 197, 244, 0.2);
  border-radius: var(--radius);
}

.feature-icon .icon {
  width: 21px;
  height: 21px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
}

.feature-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-dim);
}

.feature-card code {
  font-size: 0.88em;
  padding: 1px 5px;
  background: var(--inline-code-bg);
  border-radius: 4px;
}

/* pipeline */

.pipeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.pipeline li {
  position: relative;
}

.pipeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 31px;
  right: -8px;
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-light), var(--violet));
  z-index: 1;
}

.pipeline a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  margin: 0 8px;
  padding: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.pipeline a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -16px rgba(27, 161, 226, 0.6);
}

.pipeline-step {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.pipeline strong {
  font-size: 17px;
}

.pipeline-pkg {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
}

.pipeline small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-dim);
}

/* projects */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  color: var(--text);
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.project-card-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.project-card p {
  flex: 1;
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--text-dim);
}

.project-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
}

.project-card-foot > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}

.project-card:hover .project-card-link {
  gap: 8px;
}

.project-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  object-fit: contain;
  flex-shrink: 0;
}

.project-logo-lg {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.project-logo-xs {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.project-logo-fallback {
  display: grid;
  place-items: center;
  background: var(--bg-elev-2);
}

.project-logo-fallback svg {
  width: 70%;
  height: 70%;
}

/* posts */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.post-card:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.post-card time {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

.post-card h3 {
  margin: 8px 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-card p {
  flex: 1;
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--text-dim);
}

.post-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* cta */

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px;
  overflow: hidden;
  background: radial-gradient(ellipse at 0% 0%, rgba(27, 161, 226, 0.18), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(139, 108, 255, 0.18), transparent 60%), var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
}

.cta h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.cta p {
  margin: 0;
  color: var(--text-dim);
  max-width: 560px;
}

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

/* --------------------------------------------------------------------------
   ecosystem & docs hub
   -------------------------------------------------------------------------- */

.eco-group + .eco-group {
  margin-top: 56px;
}

.eco-title {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.eco-list {
  display: grid;
  gap: 12px;
}

.eco-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.eco-item:hover,
.eco-item:target {
  border-color: var(--border-strong);
}

.eco-item:target {
  box-shadow: 0 0 0 1px var(--accent);
}

.eco-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.eco-name h3 {
  margin: 0 6px 0 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.eco-body p {
  margin: 0 0 12px;
  color: var(--text-dim);
}

.eco-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.eco-meta > .eco-stat + .eco-stat {
  margin-top: -6px;
}

.eco-stat {
  text-align: right;
  line-height: 1.2;
}

.eco-stat strong {
  font-family: var(--font-mono);
  font-size: 17px;
}

.eco-stat span {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
}

.eco-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.docs-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
  padding: 40px;
  background: radial-gradient(ellipse at 0% 0%, rgba(27, 161, 226, 0.12), transparent 60%), var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.docs-start h2 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.docs-start p {
  margin: 0 0 20px;
  color: var(--text-dim);
}

.docs-start .install {
  display: flex;
  margin-bottom: 20px;
}

.docs-quick {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-quick a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px 16px;
  color: var(--text);
  font-weight: 550;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.docs-quick a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.docs-quick a span {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-quick a .icon {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   docs layout
   -------------------------------------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 48px;
  max-width: 1440px;
  padding-top: 32px;
  padding-bottom: 80px;
}

.docs-menu-btn {
  display: none;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

.project-switch {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.project-switch .project-logo {
  position: absolute;
  left: 8px;
  pointer-events: none;
}

.project-switch select {
  width: 100%;
  height: 46px;
  padding: 0 36px 0 46px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  appearance: none;
  cursor: pointer;
}

.project-switch select:hover {
  border-color: var(--accent);
}

.project-switch > .icon {
  position: absolute;
  right: 12px;
  color: var(--text-faint);
  pointer-events: none;
}

.docs-nav-group + .docs-nav-group {
  margin-top: 20px;
}

.docs-nav h4 {
  margin: 0 0 6px;
  padding-left: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.docs-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav a {
  display: block;
  padding: 6px 12px;
  font-size: 14.5px;
  color: var(--text-dim);
  border-left: 2px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.docs-nav a:hover {
  color: var(--text);
  border-left-color: var(--border-strong);
}

.docs-nav a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-bg), transparent);
}

.docs-sidebar-foot {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.docs-sidebar-foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.docs-sidebar-foot a:hover {
  color: var(--text);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--text-faint);
}

.breadcrumb a {
  color: var(--text-dim);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.doc-project-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding: 28px;
  background: radial-gradient(ellipse at 0% 0%, rgba(27, 161, 226, 0.12), transparent 65%), var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.doc-project-head .lead {
  margin: 10px 0 16px;
  font-size: 16.5px;
}

.doc-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-faint);
}

.edit-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-rev code {
  font-size: 12.5px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.pager a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pager small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-faint);
}

.pager-next {
  text-align: right;
  align-items: flex-end;
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 13.5px;
}

.docs-toc h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.docs-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--border);
}

.docs-toc a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-left: -1px;
  padding: 4px 0 4px 12px;
  color: var(--text-dim);
  border-left: 1px solid transparent;
  line-height: 1.45;
  transition: color 0.15s, border-color 0.15s;
}

.docs-toc .toc-l3 a {
  padding-left: 24px;
  font-size: 13px;
}

.docs-toc a:hover {
  color: var(--text);
}

.docs-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* --------------------------------------------------------------------------
   prose (markdown)
   -------------------------------------------------------------------------- */

.prose {
  font-size: 16.5px;
  line-height: 1.75;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h1 {
  margin: 0 0 24px;
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.prose h2 {
  margin: 56px 0 16px;
  padding-top: 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 36px 0 12px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
}

.prose h4 {
  margin: 28px 0 8px;
  font-size: 17px;
}

.prose .anchor {
  margin-left: 8px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.15s;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol,
.prose dl,
.prose blockquote,
.prose .table-wrap,
.prose .code-block {
  margin: 0 0 20px;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose li {
  margin: 4px 0;
}

.prose li::marker {
  color: var(--text-faint);
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(54, 197, 244, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose h2 a.anchor,
.prose h3 a.anchor {
  text-decoration: none;
}

.prose strong {
  font-weight: 650;
}

.prose hr {
  height: 1px;
  margin: 48px 0;
  background: var(--border);
  border: 0;
}

.prose img {
  display: block;
  margin: 24px auto;
  border-radius: var(--radius);
}

.prose blockquote {
  padding: 14px 20px;
  color: var(--text-dim);
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose :not(pre) > code {
  padding: 2px 6px;
  font-size: 0.86em;
  color: var(--text);
  background: var(--inline-code-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  word-break: break-word;
}

.prose h1 code,
.prose h2 code,
.prose h3 code {
  font-size: 0.85em;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.prose th {
  font-weight: 600;
  background: var(--bg-elev);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose-post {
  max-width: 760px;
  margin: 0 auto;
}

/* code blocks */

.code-block {
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  height: 36px;
  border-bottom: 1px solid var(--border);
  background: rgba(127, 127, 127, 0.04);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.code-head .copy-btn {
  padding: 3px 10px;
  font: inherit;
  font-size: 12px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
}

.code-head .copy-btn:hover {
  color: var(--text);
  border-color: var(--border);
}

pre.shiki {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.75px;
  line-height: 1.65;
  background: transparent !important;
  tab-size: 4;
}

pre.shiki code {
  font-family: inherit;
}

[data-theme='dark'] .shiki,
[data-theme='dark'] .shiki span {
  color: var(--shiki-dark);
  font-style: var(--shiki-dark-font-style);
  font-weight: var(--shiki-dark-font-weight);
}

[data-theme='light'] .shiki,
[data-theme='light'] .shiki span {
  color: var(--shiki-light);
  font-style: var(--shiki-light-font-style);
  font-weight: var(--shiki-light-font-weight);
}

/* --------------------------------------------------------------------------
   blog
   -------------------------------------------------------------------------- */

.blog-container {
  max-width: 900px;
}

.post-featured {
  display: block;
  margin-bottom: 56px;
  padding: 36px;
  color: var(--text);
  background: radial-gradient(ellipse at 100% 0%, rgba(139, 108, 255, 0.14), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(27, 161, 226, 0.12), transparent 60%), var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.post-featured:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-featured h2 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.post-featured p {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 17px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 14px;
  color: var(--text-faint);
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.avatar {
  border-radius: 50%;
  border: 1px solid var(--border);
}

.post-year {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.post-year h2 {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-faint);
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list a {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 10px 12px;
  margin: 0 -12px;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.post-list a:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.post-list a:hover .post-list-title {
  color: var(--accent);
}

.post-list time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.post-list-title {
  font-weight: 550;
}

.post-list-tags {
  display: flex;
  gap: 4px;
}

.blog-rss {
  margin-top: 32px;
  font-size: 14px;
}

.blog-rss a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post {
  padding-top: 56px;
  padding-bottom: 96px;
}

.post-header {
  max-width: 760px;
  margin: 0 auto 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-dim);
}

.post-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.post-header h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.post .pager {
  max-width: 760px;
  margin: 56px auto 0;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found .lead {
  margin: 0 auto 32px;
}

.not-found .hero-actions {
  justify-content: center;
}

.not-found h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.02em;
}

.nf-code {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(100deg, var(--brand-light), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nf-code .dim {
  -webkit-text-fill-color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-brand p {
  max-width: 340px;
  margin: 16px 0 20px;
  color: var(--text-dim);
}

.foundation {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 16px 12px;
  color: var(--text);
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.foundation:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.foundation img {
  display: block;
  padding: 4px 8px;
  background: #fff;
  border-radius: 6px;
  box-sizing: content-box;
  height: 40px;
  width: auto;
}

.foundation small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-faint);
}

.site-footer h3 {
  margin: 4px 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 8px 0;
}

.site-footer li a {
  color: var(--text-dim);
}

.site-footer li a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

.footer-bottom a {
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   search dialog
   -------------------------------------------------------------------------- */

.search-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  margin: 90px auto auto;
  padding: 0;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.search-dialog[open] {
  display: flex;
  animation: fade-in 0.18s var(--ease);
}

.search-dialog::backdrop {
  background: rgba(3, 6, 12, 0.6);
  backdrop-filter: blur(4px);
}

.search-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}

.search-input-row input {
  flex: 1;
  height: 56px;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-input-row input::-webkit-search-cancel-button {
  display: none;
}

.search-results {
  flex: 1;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.search-results:empty {
  display: none;
}

.search-results a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  border-radius: var(--radius-sm);
}

.search-results a[aria-selected='true'] {
  background: var(--accent-bg);
  box-shadow: 0 0 0 1px rgba(54, 197, 244, 0.3) inset;
}

.search-results .r-sub {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
}

.search-results .r-title {
  display: block;
  font-weight: 600;
}

.search-results .r-snippet {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results mark {
  color: var(--accent);
  background: none;
  font-weight: 700;
}

.search-results .r-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-faint);
}

.search-footer {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

.search-footer kbd {
  margin-right: 2px;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 16px;
  }

  .pipeline li:nth-child(4)::after {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .search-trigger {
    width: auto;
  }

  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 16px 20px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .main-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 12px;
    font-size: 16px;
  }

  .main-nav a[aria-current='page']::after {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 16px;
  }

  .docs-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
  }

  .docs-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    /* the desktop `align-self: start` also applies to fixed elements: it would size the
       panel to its content and shift it under the header when the list is long */
    align-self: stretch;
    overscroll-behavior: contain;
    z-index: 40;
    width: min(320px, 85vw);
    max-height: none;
    padding: 20px;
    background: var(--bg-elev);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 0.25s var(--ease);
  }

  .docs-sidebar.open {
    transform: none;
  }

  .eco-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .eco-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .eco-meta > .eco-stat + .eco-stat {
    margin-top: 0;
  }

  .eco-stat {
    text-align: left;
  }

  .docs-start {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }

  .docs-layout {
    padding-top: 20px;
    padding-bottom: 56px;
  }

  .footer-bottom {
    padding-top: 24px;
    padding-bottom: 32px;
    flex-direction: column;
    gap: 8px;
  }

  .header-inner {
    gap: 12px;
  }

  .brand-name {
    display: none;
  }

  .lead {
    font-size: 17px;
  }

  .section {
    padding: 64px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .pipeline {
    grid-template-columns: 1fr 1fr;
  }

  .pipeline li::after {
    display: none;
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat strong {
    font-size: 26px;
  }

  .doc-project-head {
    flex-direction: column;
    padding: 20px;
  }

  .post-year {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .post-list a {
    grid-template-columns: 56px 1fr;
  }

  .post-list-tags {
    display: none;
  }

  .pager {
    grid-template-columns: 1fr;
  }


  .eco-item {
    padding: 18px;
    gap: 16px;
  }

  .install {
    width: 100%;
  }
}

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

.doc-project-head > div {
  min-width: 0;
}

.doc-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

@media (max-width: 450px) {
  .dots {
    display: none;
  }

  /* long package names wrap instead of running out of the box */
  .install code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .docs-start {
    padding: 20px;
  }

  .window-bar {
    padding: 7px 8px;
  }

  .window-tabs {
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
  }

  .window-tabs button {
    padding: 6px 7px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .code-scroll pre.shiki {
    padding: 14px 16px;
    font-size: 12px;
  }
}
