:root {
  --bg: #0a0c11;
  --bg-elevated: #10131b;
  --bg-card: #141824;
  --bg-card-hover: #181d2b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-primary: #f5f7fb;
  --text-secondary: #a7aec0;
  --text-muted: #6d7488;
  --primary: #4c8dff;
  --primary-2: #8b5cf6;
  --accent: #22d3ee;
  --success: #2ecc8f;
  --gradient-brand: linear-gradient(135deg, #22c1ff 0%, #4c8dff 45%, #8b5cf6 100%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --header-h: 72px;
  color-scheme: dark;
}

html[data-theme='light'] {
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f7fd;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text-primary: #10131c;
  --text-secondary: #4c5266;
  --text-muted: #848ba0;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

section {
  position: relative;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, black);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--text-primary);
}
.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.8rem;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a,
.nav-links button {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover,
.nav-links button:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
#theme-toggle .icon-moon { display: none; }
html[data-theme='light'] #theme-toggle .icon-sun { display: none; }
html[data-theme='light'] #theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(76, 141, 255, 0.22), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent);
}
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
}
.hero h1 .grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.hero-stats .stat b {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-stats .stat span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
}
.hero-card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.hero-card .terminal {
  background: #05060a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
html[data-theme='light'] .hero-card .terminal {
  background: #0f172a;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-bar .dot-red { background: #ff5f57; }
.terminal-bar .dot-yellow { background: #ffbd2e; }
.terminal-bar .dot-green { background: #28c840; }
.terminal-bar .terminal-title {
  font-size: 0.72rem;
  color: #6d7488;
  margin-left: auto;
  margin-right: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.terminal-body {
  margin: 0;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  padding: 16px;
  color: #9be9a8;
  min-height: 230px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.terminal-body .tl-dim { color: #6d7488; }
.terminal-body .tl-bright { color: #d7dce6; }
.terminal-body .tl-success { color: #2ecc8f; }
.terminal-body .tl-accent { color: #22d3ee; }
.terminal-cursor {
  color: #4c8dff;
  animation: terminal-blink 1s step-end infinite;
}
@keyframes terminal-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- Section heading ---------- */
.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head .eyebrow {
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}
.section-head p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.section-pad {
  padding: 88px 0;
}
.section-pad.tight {
  padding: 64px 0;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- Early access modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 14, 0.6);
  backdrop-filter: blur(2px);
}
.modal-overlay.is-open {
  display: flex;
}
body.modal-open {
  overflow: hidden;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}
.modal-close svg {
  width: 16px;
  height: 16px;
}

/* ---------- Why cards ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.why-card .icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  margin-bottom: 16px;
}
.why-card .icon-wrap svg {
  width: 21px;
  height: 21px;
  color: var(--primary);
}
.why-card h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  font-weight: 700;
}
.why-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--primary);
  margin-bottom: 14px;
}
.step h3 {
  font-size: 0.98rem;
  margin: 0 0 8px;
  font-weight: 700;
}
.step p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin: 0;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.feature-card .top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.feature-card .icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}
.feature-card .icon-wrap svg {
  width: 19px;
  height: 19px;
  color: var(--primary);
}
.badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.badge.soon {
  background: color-mix(in srgb, var(--primary-2) 16%, transparent);
  color: var(--primary-2);
  border-color: color-mix(in srgb, var(--primary-2) 30%, transparent);
}
.feature-card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
  font-weight: 700;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.87rem;
  margin: 0;
}

/* ---------- Logo marquee (data-source carousel) ---------- */
.logo-marquee {
  overflow: hidden;
}
.logo-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: logo-scroll 34s linear infinite;
}
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.logo-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  flex-shrink: 0;
}
.logo-tile-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.logo-tile-icon img,
.logo-tile-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.logo-tile-icon img {
  filter: brightness(0) invert(1) opacity(0.75);
}
html[data-theme='light'] .logo-tile-icon img {
  filter: brightness(0) opacity(0.7);
}
.logo-tile-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ---------- Logo flow animation (big animated A) ---------- */
.logo-flow {
  max-width: 480px;
  width: 100%;
  margin: 8px auto 40px;
  display: flex;
  justify-content: center;
}
.logo-flow-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.logo-flow-svg text {
  user-select: none;
}
.logo-flow-svg .lf-structure {
  stroke: var(--border-strong);
}
.logo-flow-svg .lf-hole {
  fill: var(--bg-elevated);
}
.logo-flow-svg .lf-accent {
  fill: var(--accent);
  stroke: var(--accent);
}
.logo-flow-svg .lf-accent-mid {
  fill: color-mix(in srgb, var(--accent) 55%, black);
}
.logo-flow-svg .lf-primary {
  fill: var(--primary);
  stroke: var(--primary);
}
.logo-flow-svg .lf-primary-mid {
  fill: color-mix(in srgb, var(--primary) 55%, black);
}
.logo-flow-svg .lf-primary2 {
  fill: var(--primary-2);
  stroke: var(--primary-2);
}
.logo-flow-svg .lf-primary2-mid {
  fill: color-mix(in srgb, var(--primary-2) 55%, black);
}
.logo-flow-svg .lf-label {
  fill: var(--text-muted);
  transition: fill 0.35s ease;
}
.logo-flow-svg .lf-label-sub {
  fill: var(--text-muted);
  opacity: 0.7;
}
.logo-flow-svg .lf-label.is-bright {
  fill: var(--text-primary);
}

/* ---------- Roles strip ---------- */
.roles-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.role-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 20px;
}
.role-card h4 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  font-weight: 700;
}
.role-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ---------- Open Source ---------- */
.oss-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.oss-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.oss-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.oss-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
}
.repo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.repo-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 700;
}
.repo-card-header svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.repo-tag {
  font-size: 0.66rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
  color: var(--success);
  border-radius: 20px;
  padding: 3px 10px;
  margin-left: auto;
}
.repo-card-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 18px;
}
.repo-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.repo-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3178c6;
}
.repo-topics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.repo-topics .topic {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 20px;
  padding: 4px 11px;
}

/* ---------- CTA actions ---------- */
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.code-block {
  position: relative;
  background: #05060a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 20px 20px 22px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem;
  color: #d7dce6;
  line-height: 1.75;
  white-space: pre-line;
}
html[data-theme='light'] .code-block {
  background: #0f172a;
  color: #e2e8f0;
}
.code-block .c1 { color: #6d7488; }
.code-block .c2 { color: #9be9a8; }
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #cfd4e0;
  cursor: pointer;
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.copied { color: var(--success); border-color: var(--success); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  max-width: 320px;
  margin: 12px 0 0;
}
.footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 14px;
  font-weight: 700;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-bottom: 10px;
}
.footer-col a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-bottom .socials {
  display: flex;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .why-grid, .steps, .feature-grid, .roles-strip { grid-template-columns: repeat(2, 1fr); }
  .oss-layout { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .why-grid, .steps, .feature-grid, .roles-strip { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 48px; }
  .section-pad { padding: 56px 0; }
  .header-actions .btn-secondary { display: none; }
}

@media (max-width: 760px) {
  body.nav-open .mobile-nav { display: flex; }
}
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 90;
  background: var(--bg);
  flex-direction: column;
  padding: 24px;
  gap: 4px;
}
.mobile-nav a,
.mobile-nav button {
  padding: 14px 6px;
  font-size: 1.02rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

/* ---------- Docs (wiki) pages ---------- */

.docs-shell {
  padding: 40px 0 80px;
}
.docs-hub-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 8px 0 32px;
}

.docs-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.docs-breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 6px;
  color: var(--text-muted);
  opacity: 0.6;
}
.docs-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.docs-breadcrumb a:hover {
  color: var(--text-primary);
}
.docs-breadcrumb li:last-child span {
  color: var(--text-primary);
  font-weight: 500;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  align-items: start;
}

.docs-prose {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.docs-prose > *:first-child { margin-top: 0; }
.docs-prose h1 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 18px;
}
.docs-prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.docs-prose h2:first-of-type { border-top: none; padding-top: 0; }
.docs-prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 10px;
}
.docs-prose p { margin: 0 0 16px; }
.docs-prose ul, .docs-prose ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}
.docs-prose li { margin: 0 0 8px; }
.docs-prose li > p:last-child { margin-bottom: 0; }
.docs-prose strong { color: var(--text-primary); font-weight: 600; }
.docs-prose a { color: var(--primary); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.docs-prose a:hover { text-decoration-color: var(--primary); }
.docs-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 8px 0 20px;
  display: block;
}
.docs-prose .docs-video-label {
  margin: 24px 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.docs-prose video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 8px 0 8px;
  display: block;
}
.docs-prose code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.15em 0.4em;
}
.docs-prose pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 16px;
}
.docs-prose pre code { background: none; border: none; padding: 0; }
.docs-prose blockquote {
  margin: 0 0 16px;
  padding: 4px 16px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-muted);
}
.docs-prose hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.docs-prose th, .docs-prose td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border);
}
.docs-prose th {
  color: var(--text-primary);
  background: var(--bg-card);
}

.docs-related {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.docs-related h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.docs-related ul { list-style: none; margin: 0; padding: 0; }
.docs-related li { margin: 0 0 2px; }
.docs-related a, .docs-related span {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.docs-related a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.docs-related li[aria-current] span {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--bg-card-hover);
}


.docs-hub-locale { margin-bottom: 32px; }
.docs-hub-locale h2 { font-size: 1.4rem; margin: 0 0 8px; }
.docs-hub-top { color: var(--text-secondary); margin: 0 0 24px; }
.docs-hub-section { margin: 0 0 28px; }
.docs-hub-section h3 { font-size: 1.05rem; margin: 0 0 14px; color: var(--text-primary); }
.docs-hub-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px 24px;
}
.docs-hub-group h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.docs-hub-group ul { list-style: none; margin: 0; padding: 0; }
.docs-hub-group li { margin: 0 0 4px; }
.docs-hub-group a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}
.docs-hub-group a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-related { position: static; }
}
