@font-face { font-family: Switzer; src: url(fonts/switzer-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Switzer; src: url(fonts/switzer-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Switzer; src: url(fonts/switzer-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Switzer; src: url(fonts/switzer-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Sentient; src: url(fonts/sentient-italic.woff2) format("woff2"); font-style: italic; font-display: swap; }

/* Same neutral greys as openclaw.ai (oklch 13.5 / 17.8 / 20.5 / 26.9 %), lilac accent. */
:root {
  --bg-page: oklch(13.5% 0 0); --bg-surface: oklch(17.8% 0 0); --bg-elevated: oklch(20.5% 0 0);
  --text-primary: oklch(98.5% 0 0); --text-secondary: oklch(87% 0 0); --text-muted: oklch(71.6% 0 0);
  --border: oklch(26.9% 0 0); --chart-line: oklch(100% 0 0 / .1);
  --accent: #a78bfa; --accent-hover: #8b5cf6; --accent-soft: #a78bfa24;
  --font-display: "Switzer", system-ui, sans-serif;
  --font-serif: "Sentient", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
}
:root[data-theme="light"] {
  --bg-page: oklch(98.5% 0 0); --bg-surface: oklch(97% 0 0); --bg-elevated: oklch(100% 0 0);
  --text-primary: oklch(20.5% 0 0); --text-secondary: oklch(26.9% 0 0); --text-muted: oklch(55.5% 0 0);
  --border: oklch(92.2% 0 0); --chart-line: oklch(20.5% 0 0 / .12);
  --accent: #7c3aed; --accent-hover: #6d28d9; --accent-soft: #7c3aed1f;
}
* { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--bg-page); }
/* Thin scrollbars in the site's colours (page, code blocks, tables). */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*:hover { scrollbar-color: color-mix(in srgb, var(--accent) 55%, var(--border)) transparent; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 60%, var(--border)); }
::-webkit-scrollbar-corner { background: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-display); background: var(--bg-page); color: var(--text-primary); -webkit-font-smoothing: antialiased; line-height: 1.6; min-height: 100vh; transition: background-color .25s, color .25s; }
body::after { content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: .05; mix-blend-mode: overlay; background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.015em; color: var(--accent); }
code { font-family: var(--font-mono); font-size: .9em; color: var(--accent); }

/* ── Top bar ── */
.topbar { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; padding: 0 76px 0 32px;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg-page) 72%, transparent); backdrop-filter: saturate(140%) blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; letter-spacing: .02em; }
.brand img { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 20px; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: var(--text-muted); cursor: pointer; }
.menu-btn:hover { color: var(--text-primary); }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn path { transition: transform .25s, opacity .2s; transform-origin: 12px 12px; }
.topbar.open .menu-btn .mb-a { transform: translateY(5px) rotate(45deg); }
.topbar.open .menu-btn .mb-b { opacity: 0; }
.topbar.open .menu-btn .mb-c { transform: translateY(-5px) rotate(-45deg); }
.nav a { font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .02em; color: var(--text-muted); min-height: 34px; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.nav a:hover { color: var(--text-primary); }
.nav a.active { color: var(--accent); }
.nav a svg { width: 14px; height: 14px; }
.nav .social { display: inline-flex; gap: 10px; padding-left: 12px; border-left: 1px solid var(--border); }
.nav .social a { width: 30px; justify-content: center; }
.nav .social svg { width: 17px; height: 17px; }
.nav .social a[hidden] { display: none; }
.theme-toggle { position: fixed; top: 14px; right: 28px; z-index: 999; display: inline-flex; align-items: center; justify-content: center; padding: 4px; border: 0; background: none; color: var(--text-muted); cursor: pointer; transition: color .15s; }
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle svg { width: 17px; height: 17px; overflow: visible; }
.theme-toggle .tt-core { fill: currentColor; r: 9px; transition: r .26s; }
.theme-toggle .tt-hole { cx: 17px; cy: 7px; transition: cx .3s, cy .3s; }
.theme-toggle .tt-rays { opacity: 0; stroke: currentColor; stroke-linecap: round; stroke-width: 1.6px; transform-origin: 50%; transform: rotate(-40deg) scale(.6); transition: opacity .22s, transform .32s; }
:root[data-theme="light"] .theme-toggle .tt-core { r: 4.4px; }
:root[data-theme="light"] .theme-toggle .tt-hole { cx: 32px; cy: -8px; }
:root[data-theme="light"] .theme-toggle .tt-rays { opacity: 1; transform: rotate(0) scale(1); }

/* ── Rail and sections ── */
.rail { display: flow-root; width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 40px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
section { scroll-margin-top: 70px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 14px; }
.section-title { margin: 0; font-family: var(--font-mono); font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--accent); line-height: 1.4; }
.section-link { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }
.section-link:hover { color: var(--text-primary); }
.block { margin-bottom: 56px; }
.page-head { padding: 64px 0 36px; border-bottom: 1px solid var(--border); margin-bottom: 36px; }
.page-head h1 { margin: 10px 0 12px; font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.page-head p { margin: 0; max-width: 620px; color: var(--text-muted); text-wrap: pretty; }
.eyebrow { font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

/* ── Footer ── */
.footer { padding: 56px 0 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; }
.footer-logo img { width: 40px; height: 40px; }
.footer-note { max-width: 46ch; margin: 14px 0 0; color: var(--text-muted); font-size: .9rem; }
.footer-cols { display: flex; gap: 56px; }
.footer-cols h4 { margin: 0 0 12px; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.footer-cols a { display: block; padding: 3px 0; font-size: .88rem; color: var(--text-secondary); }
.footer-cols a:hover { color: var(--text-primary); }
.footer-legal { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }

/* ── Docs / Updates content ── */
.prose { max-width: 720px; color: var(--text-secondary); font-size: .95rem; }
.prose h2 { margin: 44px 0 12px; font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; color: var(--text-primary); scroll-margin-top: 70px; }
.prose h3 { margin: 26px 0 8px; font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.prose p, .prose li { line-height: 1.75; text-wrap: pretty; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose pre { margin: 12px 0; padding: 14px 18px; background: var(--bg-surface); border: 1px solid var(--border); font-family: var(--font-mono); font-size: .82rem; color: var(--text-primary); overflow-x: auto; }
.prose pre code { color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 12px 0; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border: 1px solid var(--border); vertical-align: top; }
.prose th { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); background: var(--bg-surface); }
.callout { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--border); border-left: 2px solid var(--accent); background: var(--bg-surface); font-size: .9rem; }
.docs { display: grid; grid-template-columns: 200px 1fr; gap: 40px; }
.toc { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 2px; padding-top: 44px; }
.toc a { font-family: var(--font-mono); font-size: .74rem; color: var(--text-muted); padding: 4px 0; }
.toc a:hover { color: var(--text-primary); }

@media (max-width: 900px) {
  .topbar { padding: 0 58px 0 20px; }
  .theme-toggle { top: 16px; right: 16px; }
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 16px; background: var(--bg-page); border-bottom: 1px solid var(--border); box-shadow: 0 18px 30px rgba(0, 0, 0, .25); opacity: 0; transform: translateY(-6px); visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s; }
  .topbar.open .nav { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .2s; }
  .nav a { min-height: 48px; font-size: .85rem; border-bottom: 1px solid var(--border); }
  .nav .social { border: 0; padding: 12px 0 0; gap: 14px; }
  .nav .social a { border: 0; min-height: 36px; }
  .rail { padding: 0 20px; border: 0; }
  .footer-cols { gap: 32px; }
  .docs { grid-template-columns: 1fr; }
  .toc { display: none; }
}
