/* flocms.com — site styles. Light and dark themes share one set of tokens. */

:root {
  --bg: #FBFCFD;
  --surface: #FFFFFF;
  --surface-2: #F4F7F9;
  --line: #E4E9EE;
  --line-2: #D5DDE3;
  --ink: #0D1B26;
  --ink-2: #26353F;
  --ink-3: #3E4F5C;
  --muted: #52626F;
  --faint: #8797A3;
  --brand: #38BBE0;          /* logo blue: marks, badges, accents */
  --brand-on: #062633;       /* text on the logo blue */
  --link: #0B6E91;           /* readable blue for text and links */
  --link-hover: #08506A;
  --brand-soft: #EEF8FC;
  --brand-soft-2: #E6F5FB;
  --brand-line: #CDEAF4;
  --inline-code: #F1F5F8;
  --code-bg: #0D1B26;
  --code-line: #1E3140;
  --code-text: #D7E3EC;
  --code-muted: #7B8E9C;
  --shadow: 0 30px 60px -30px rgba(13, 27, 38, .45);
  --warn-bg: #FDF6E7;
  --warn-line: #F1DDB0;
  --warn-ink: #6B4A0E;
  --danger-bg: #FDEEEE;
  --danger-line: #F3C9C9;
  --danger-ink: #7A1F1F;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  --radius: 10px;
  --header-h: 65px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A131A;
    --surface: #0E1922;
    --surface-2: #14212B;
    --line: #1E2D38;
    --line-2: #2A3C49;
    --ink: #E6EEF4;
    --ink-2: #CBD7E0;
    --ink-3: #B0BFCA;
    --muted: #8FA0AD;
    --faint: #6A7C8A;
    --link: #63CDEB;
    --link-hover: #93DDF2;
    --brand-soft: #0F2C38;
    --brand-soft-2: #113442;
    --brand-line: #1B4A5C;
    --inline-code: #172632;
    --code-bg: #07111A;
    --code-line: #182833;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
    --warn-bg: #2A2312;
    --warn-line: #4A3B17;
    --warn-ink: #F0D28E;
    --danger-bg: #2C1517;
    --danger-line: #4F2226;
    --danger-ink: #F4B4B4;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0A131A;
  --surface: #0E1922;
  --surface-2: #14212B;
  --line: #1E2D38;
  --line-2: #2A3C49;
  --ink: #E6EEF4;
  --ink-2: #CBD7E0;
  --ink-3: #B0BFCA;
  --muted: #8FA0AD;
  --faint: #6A7C8A;
  --link: #63CDEB;
  --link-hover: #93DDF2;
  --brand-soft: #0F2C38;
  --brand-soft-2: #113442;
  --brand-line: #1B4A5C;
  --inline-code: #172632;
  --code-bg: #07111A;
  --code-line: #182833;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  --warn-bg: #2A2312;
  --warn-line: #4A3B17;
  --warn-ink: #F0D28E;
  --danger-bg: #2C1517;
  --danger-line: #4F2226;
  --danger-ink: #F4B4B4;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.is-docs { background: var(--surface); }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img, svg { display: block; }
code, kbd, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--bg); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { color: var(--bg); opacity: .9; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { color: var(--ink); border-color: var(--faint); }
.btn-brand { background: var(--brand); color: var(--brand-on); }
.btn-brand:hover { color: var(--brand-on); filter: brightness(1.05); }
.btn-ghost-light { color: #fff; border-color: #2E4556; }
.btn-ghost-light:hover { color: #fff; border-color: #4A6375; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  min-height: var(--header-h); padding-top: 10px; padding-bottom: 10px;
}
.is-docs .site-header .bar { max-width: 1440px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 28px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; }
.brand-sep { color: var(--faint); }
.brand-sub { color: var(--muted); font-weight: 500; font-size: 15px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; flex: 1 1 auto; font-weight: 500; font-size: 15px; }
.main-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-btn {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.search-btn:hover { border-color: var(--line-2); color: var(--ink-3); }
.search-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.search-btn .label { flex: 1 1 auto; }
.is-docs .search-btn { flex: 1 1 240px; max-width: 420px; }
kbd {
  font-size: 12px; padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
}
.version-menu { position: relative; }
.version-menu summary {
  display: flex; align-items: center; gap: 6px; list-style: none;
  min-height: 36px; padding: 0 10px 0 12px; border-radius: 8px;
  border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--link);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; cursor: pointer;
}
.version-menu summary::-webkit-details-marker { display: none; }
.version-menu summary svg { width: 14px; height: 14px; }
.version-menu[open] summary svg { transform: rotate(180deg); }
.version-menu ul {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
  min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 40px -20px rgba(13, 27, 38, .4);
}
.version-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.version-menu a:hover { background: var(--surface-2); color: var(--ink); }
.version-menu a[aria-current="true"] { color: var(--link); font-weight: 600; }
.version-menu .tag { font-size: 12px; color: var(--muted); font-weight: 400; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Homepage */
.eyebrow { margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.section-title { margin: 12px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 72px; }
.hero-copy { flex: 1 1 480px; min-width: 0; }
.hero-code { flex: 1 1 520px; min-width: 0; }
.release-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  border: 1px solid var(--brand-line); background: var(--brand-soft);
  color: var(--link); text-decoration: none; font-size: 14px; font-weight: 500;
}
.release-pill .badge { padding: 2px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-on); font-weight: 600; }
.hero h1 { margin: 28px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(44px, 6vw, 72px); line-height: 1.02; letter-spacing: -.03em; }
.hero h1 .accent { color: var(--link); }
.hero .lead { margin: 24px 0 0; max-width: 560px; font-size: 19px; color: var(--ink-3); }
.hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.install-cmd {
  margin-top: 28px; display: flex; align-items: center; gap: 12px; max-width: 520px;
  padding: 8px 8px 8px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 14px;
}
.install-cmd .prompt { color: var(--link); }
.install-cmd code { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer;
}
.copy-btn:hover { color: var(--ink); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn.is-copied { color: var(--link); }
.code-window { border-radius: 16px; background: var(--code-bg); box-shadow: var(--shadow); overflow: hidden; }
.code-window-bar { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--code-line); font-family: var(--font-mono); font-size: 13px; }
.code-window-bar .tab { padding: 6px 12px; border-radius: 6px; color: var(--code-muted); background: none; border: 0; font: inherit; cursor: pointer; }
.code-window-bar .tab[aria-selected="true"] { background: #17293A; color: #E7F0F6; }
.code-window-bar .dot { width: 12px; height: 12px; border-radius: 50%; background: #2A3F50; }
.code-window pre { margin: 0; padding: 22px 24px 26px; overflow-x: auto; font-size: 14px; line-height: 1.75; color: var(--code-text); }
.code-window pre[hidden] { display: none; }
.tok-k { color: #7FD4F0; } .tok-s { color: #F3C677; } .tok-f { color: #9FE0C2; } .tok-c { color: #7B8E9C; } .tok-p { color: var(--brand); }
.band { border-top: 1px solid var(--line); background: var(--surface); }
.band-inner { padding-top: 88px; padding-bottom: 88px; }
.features {
  margin-top: 52px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.feature { padding: 32px; background: var(--surface); }
.feature-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--link); display: flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 20px 0 8px; font-size: 19px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); }
.feature code, .split-copy code { font-size: .9em; color: var(--ink); }
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.split-copy { flex: 1 1 400px; min-width: 0; }
.split-copy p:not(.eyebrow) { margin: 20px 0 0; font-size: 18px; color: var(--ink-3); }
.split-media { flex: 1 1 560px; min-width: 0; }
.more-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; min-height: 44px; font-weight: 600; text-decoration: none; }
.more-link svg { width: 16px; height: 16px; }
.packages-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.packages-head p { margin: 0; max-width: 440px; color: var(--muted); }
.packages { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.package { display: block; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); text-decoration: none; }
.package:hover { color: var(--ink); border-color: var(--brand-line); }
.package-name { font-family: var(--font-mono); font-size: 15px; font-weight: 500; }
.package-desc { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }
.cta { margin: 96px auto; }
.cta-box {
  padding: 64px 48px; border-radius: 20px; background: #0D1B26; color: #fff;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between;
}
:root[data-theme="dark"] .cta-box { background: var(--surface-2); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-box { background: var(--surface-2); border: 1px solid var(--line); } }
.cta-box h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.cta-box h2 span { color: var(--brand); }
.cta-box p { margin: 14px 0 0; color: #B8C7D2; font-size: 18px; }
.cta-box .copy { flex: 1 1 420px; min-width: 0; }
.cta-box .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .inner { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; font-size: 15px; }
.site-footer .about { max-width: 320px; }
.site-footer .about p { margin: 12px 0 0; color: var(--muted); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col strong { font-weight: 600; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }

/* Docs layout */
.docs-shell { max-width: 1440px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: flex-start; }
.docs-sidebar {
  flex: 0 0 280px; align-self: stretch;
  border-right: 1px solid var(--line); background: var(--bg);
  font-size: 15px; line-height: 1.5;
}
.docs-sidebar .inner { position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; padding: 28px 20px 48px 24px; }
.nav-section + .nav-section { margin-top: 2px; }
.nav-section ul { margin: 0; padding: 0; list-style: none; }
.nav-section summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ink); user-select: none;
}
.nav-section summary::-webkit-details-marker { display: none; }
.nav-section summary:hover { background: var(--surface-2); }
.nav-section summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.nav-section summary svg { flex: none; width: 15px; height: 15px; color: var(--faint); transition: transform .2s ease; }
.nav-section[open] > summary svg { transform: rotate(90deg); color: var(--muted); }
.nav-section[open] > ul { margin: 2px 0 10px 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-section a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--ink-3); text-decoration: none; }
.nav-section a:hover { color: var(--ink); background: var(--surface-2); }
.nav-section a[aria-current="page"] { margin-left: -11px; padding-left: 20px; border-radius: 0 6px 6px 0; background: var(--brand-soft-2); color: var(--link); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }

/* Thin, rounded scrollbars for the sidebar and the page outline */
@supports not selector(::-webkit-scrollbar) {
  .docs-sidebar .inner, .docs-toc .inner { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .docs-sidebar .inner:hover, .docs-toc .inner:hover { scrollbar-color: var(--faint) transparent; }
}
.docs-sidebar .inner::-webkit-scrollbar, .docs-toc .inner::-webkit-scrollbar { width: 10px; }
.docs-sidebar .inner::-webkit-scrollbar-track, .docs-toc .inner::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
.docs-sidebar .inner::-webkit-scrollbar-thumb, .docs-toc .inner::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: var(--line-2) padding-box; }
.docs-sidebar .inner:hover::-webkit-scrollbar-thumb, .docs-toc .inner:hover::-webkit-scrollbar-thumb { background-color: var(--faint); }
.docs-sidebar .inner::-webkit-scrollbar-thumb:active, .docs-toc .inner::-webkit-scrollbar-thumb:active { background-color: var(--muted); }
.docs-main { flex: 1 1 560px; min-width: 0; display: flex; gap: 48px; padding: 48px 48px 80px; }
.docs-article { flex: 1 1 auto; min-width: 0; max-width: 760px; }
.docs-toc { flex: 0 0 220px; font-size: 14px; line-height: 1.5; }
.docs-toc .inner { position: sticky; top: calc(var(--header-h) + 48px); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
.docs-toc h2 { margin: 0 0 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.docs-toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.docs-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.docs-toc a.level-3 { padding-left: 26px; font-size: 13px; }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a.is-active { border-left-color: var(--brand); color: var(--link); font-weight: 600; }
.nav-toggle { display: none; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb .sep { margin: 0 6px; color: var(--faint); }
.version-notice { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 24px; padding: 12px 16px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: 15px; }
.version-notice a { color: inherit; font-weight: 600; }
.docs-footer { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.docs-footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; }
.docs-footer a:hover { color: var(--ink); }
.docs-footer svg { width: 16px; height: 16px; }
.docs-footer span { display: inline-flex; align-items: center; min-height: 44px; }
.pager { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pager a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.pager a:hover { border-color: var(--brand-line); }
.pager .dir { display: block; font-size: 13px; color: var(--muted); }
.pager .title { display: block; margin-top: 4px; font-weight: 600; color: var(--ink); }
.pager .next { text-align: right; grid-column: -2 / -1; }
.pager .next .title { color: var(--link); }

@media (max-width: 1180px) {
  .docs-toc { display: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .features { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .docs-sidebar { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .docs-sidebar .inner { position: static; max-height: none; padding: 12px 16px; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  }
  .nav-toggle svg { width: 16px; height: 16px; }
  .docs-nav { display: none; padding-top: 20px; }
  .docs-sidebar.is-open .docs-nav { display: block; }
  .docs-sidebar.is-open .nav-toggle svg { transform: rotate(180deg); }
  .docs-main { padding: 32px 16px 64px; }
  .site-header { position: static; }
  .docs-sidebar .inner { top: 0; }
  .search-btn kbd { display: none; }
  .is-docs .site-header .main-nav { display: none; }
  .is-docs .search-btn { order: 3; flex: 1 1 100%; max-width: none; }
  .is-docs .header-actions { margin-left: auto; }
  .is-home .main-nav { order: 3; flex-basis: 100%; }
  .container { padding: 0 16px; }
  .hero { padding-top: 56px; gap: 40px; }
  .cta-box { padding: 40px 24px; }
}

/* Article typography (rendered Markdown) */
.prose { color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h1 { margin: 10px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 5vw, 48px); line-height: 1.08; letter-spacing: -.025em; color: var(--ink); }
.prose h1 + p { margin-top: 18px; font-size: 19px; color: var(--ink-3); }
.prose h2 { margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.2; letter-spacing: -.015em; color: var(--ink); }
.prose h3 { margin: 32px 0 0; font-size: 20px; font-weight: 600; color: var(--ink); }
.prose h4 { margin: 24px 0 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose .table-wrap, .prose .code-block, .prose > pre, .prose .callout { margin: 14px 0 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line); }
.prose :not(pre) > code { padding: 2px 6px; border-radius: 4px; background: var(--inline-code); color: var(--ink); font-size: .875em; overflow-wrap: anywhere; }
.prose a code { color: inherit; }
.heading-anchor { margin-left: 8px; color: var(--faint); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; }
.prose :is(h2, h3, h4):hover .heading-anchor, .heading-anchor:focus { opacity: 1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.callout { padding: 16px 18px; border-radius: 10px; background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--ink-2); }
.callout > :first-child { margin-top: 0; }
.callout p { margin: 6px 0 0; }
.callout .callout-title { margin: 0; font-weight: 600; color: var(--link); }
.callout-warning, .callout-important { background: var(--warn-bg); border-color: var(--warn-line); }
.callout-warning .callout-title, .callout-important .callout-title { color: var(--warn-ink); }
.callout-caution { background: var(--danger-bg); border-color: var(--danger-line); }
.callout-caution .callout-title { color: var(--danger-ink); }

/* Code blocks */
.code-block { border-radius: 12px; background: var(--code-bg); overflow: hidden; }
.code-block-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--code-line); font-family: var(--font-mono); font-size: 12px; color: var(--code-muted); }
.code-block .copy-btn { background: transparent; color: #9FB2C0; height: 32px; }
.code-block .copy-btn:hover { color: #fff; }
.prose pre { margin: 0; padding: 16px 20px; overflow-x: auto; background: var(--code-bg); border-radius: 12px; color: var(--code-text); font-size: 14px; line-height: 1.75; }
.code-block pre { border-radius: 0; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.hljs-keyword, .hljs-built_in, .hljs-literal, .hljs-type, .hljs-selector-tag { color: #7FD4F0; }
.hljs-string, .hljs-regexp, .hljs-attr, .hljs-symbol, .hljs-template-variable, .hljs-variable.language_ { color: #F3C677; }
.hljs-title, .hljs-title.function_, .hljs-function .hljs-title, .hljs-section { color: #9FE0C2; }
.hljs-title.class_, .hljs-class .hljs-title { color: #F3C677; }
.hljs-comment, .hljs-quote, .hljs-meta { color: #7B8E9C; }
.hljs-number, .hljs-params .hljs-number { color: #F2A98B; }
.hljs-variable, .hljs-template-tag, .hljs-name, .hljs-tag { color: #D7E3EC; }
.hljs-attribute, .hljs-property { color: #B8D6F5; }
.hljs-subst { color: #D7E3EC; }
.hljs-deletion { color: #F4A3A3; } .hljs-addition { color: #9FE0C2; }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }

/* Search dialog */
.search-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 640px); margin: 12vh auto 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(13, 27, 38, .5); overflow: hidden; }
.search-dialog::backdrop { background: rgba(10, 19, 26, .45); backdrop-filter: blur(2px); }
.search-dialog form { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-dialog form svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search-dialog input { flex: 1 1 auto; min-width: 0; min-height: 40px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; outline: none; }
.search-results { margin: 0; padding: 8px; list-style: none; overflow-y: auto; max-height: calc(min(70vh, 640px) - 66px); }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-results a .where { display: block; font-size: 13px; color: var(--muted); }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--brand-soft); }
.search-results mark { background: none; color: var(--link); font-weight: 600; }
.search-empty { padding: 24px 16px; color: var(--muted); text-align: center; }

/* Error page */
.error-page { min-height: calc(100vh - var(--header-h) - 160px); display: flex; align-items: center; justify-content: center; padding: 64px 16px; text-align: center; }
.error-page .code { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(72px, 14vw, 140px); line-height: 1; letter-spacing: -.04em; color: var(--brand); }
.error-page h1 { margin: 16px 0 0; font-family: var(--font-display); font-size: 32px; }
.error-page p { margin: 12px auto 0; max-width: 460px; color: var(--muted); }
.error-page .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
