@import "tailwindcss"; @import "fumadocs-ui/css/neutral.css"; @import "fumadocs-ui/css/preset.css"; @source "../node_modules/fumadocs-ui/dist/**/*.js"; /* ────────────────────────────────────────────────────────────────────── Botanical Modern — runtime design tokens ────────────────────────────────────────────────────────────────────── */ :root { --bm-bg: #f7f6f1; --bm-surface: #ffffff; --bm-surface-alt: #efece4; --bm-ink: #1a201b; --bm-ink-soft: #3b4239; --bm-ink-muted: #6f7268; --bm-line: #dcd8cc; --bm-line-soft: #e8e4d8; --bm-accent: #3d6b3a; --bm-accent-soft: #dceadb; --bm-accent-ink: #1f3d1d; --bm-danger: #c14a3d; --bm-warn: #a05a2c; /* Code / editor ground. Sits a touch warmer + darker than the page bg (#f7f6f1) so code wells read as a distinct recessed surface instead of blending into the page (the old #fbfaf5 was ~1.5% *lighter* than the page — no perceptible surface). Shared by docs code blocks, the hero CodeWindow, and the playground editor (Monaco paints transparent over this var) so all three stay in sync. Kept light enough that the shiki token palette stays legible. */ --bm-editor-bg: #f2efe6; --bm-syntax-text: #3a3f38; --bm-syntax-comment: #9a9a8a; --bm-syntax-keyword: #7a3a2f; --bm-syntax-string: #3d6b3a; --bm-syntax-type: #2d6e5a; --bm-syntax-method: #6a4a7a; --bm-syntax-lineno: #c8c4b8; /* Decorative vein color for botanical SVGs (BotanicalSpray, HeartLeaf). */ --bm-veins: rgba(0, 0, 0, 0.15); } /* Dark — Conservatory: deep pine ground for chrome, with the warm-charcoal Conservatory editor (from themes/pothos-conservatory-dark.json) inside. Chrome palette comes from directionA.jsx > conservatory ("dark · deep pine ground"); syntax token colors come from the matching VS Code theme JSON. The bright moss (#a8d488) is the single saturated accent. */ .dark { --bm-bg: #142019; --bm-surface: #1a2820; --bm-surface-alt: #1f3026; --bm-ink: #e8efe2; --bm-ink-soft: #a8b8a8; --bm-ink-muted: #7a8a7a; --bm-line: #243228; --bm-line-soft: #1c2820; --bm-accent: #a8d488; --bm-accent-soft: #1f3026; --bm-accent-ink: #c8e8a8; --bm-danger: #dc6e5a; --bm-warn: #e8a87c; /* Editor — Pothos Forest (themes/pothos-forest-dark.json). Editor surface matches the chrome's pine ground, so the editor reads as part of the panel rather than a separate hue. Token colors carry Forest's warm-orange / cool-teal accents. */ --bm-editor-bg: #142019; --bm-syntax-text: #e8efe2; --bm-syntax-comment: #5e7064; --bm-syntax-keyword: #e8a87c; --bm-syntax-string: #a8d488; --bm-syntax-type: #88c0d0; --bm-syntax-method: #d4a8c8; --bm-syntax-lineno: #3a4c40; --bm-veins: rgba(255, 255, 255, 0.18); } /* Map fumadocs tokens onto BM equivalents so docs / popovers blend. */ :root { --color-fd-background: var(--bm-bg); --color-fd-foreground: var(--bm-ink); --color-fd-muted: var(--bm-surface-alt); --color-fd-muted-foreground: var(--bm-ink-muted); --color-fd-popover: var(--bm-surface); --color-fd-popover-foreground: var(--bm-ink); --color-fd-card: var(--bm-surface); --color-fd-card-foreground: var(--bm-ink); --color-fd-border: var(--bm-line); --color-fd-primary: var(--bm-ink); --color-fd-primary-foreground: var(--bm-bg); --color-fd-secondary: var(--bm-surface-alt); --color-fd-secondary-foreground: var(--bm-ink); --color-fd-accent: var(--bm-accent-soft); --color-fd-accent-foreground: var(--bm-accent-ink); --color-fd-ring: var(--bm-accent); /* Callout accents — fumadocs derives `--callout-color` from these per variant (info / warning / error / success). Map them onto the botanical palette so callouts drop the stock blue/amber/red and read as part of the site. Because these reference --bm-* tokens, they adapt to .dark automatically. */ --color-fd-info: var(--bm-accent); --color-fd-warning: var(--bm-warn); --color-fd-error: var(--bm-danger); --color-fd-success: var(--bm-accent); } /* ────────────────────────────────────────────────────────────────────── Tailwind theme — exposes BM tokens as utilities (bg-bm-*, text-bm-*, border-bm-*, font-serif, font-mono, animate-bm-*). ────────────────────────────────────────────────────────────────────── */ @theme inline { --color-bm-bg: var(--bm-bg); --color-bm-surface: var(--bm-surface); --color-bm-surface-alt: var(--bm-surface-alt); --color-bm-ink: var(--bm-ink); --color-bm-ink-soft: var(--bm-ink-soft); --color-bm-ink-muted: var(--bm-ink-muted); --color-bm-line: var(--bm-line); --color-bm-line-soft: var(--bm-line-soft); --color-bm-accent: var(--bm-accent); --color-bm-accent-soft: var(--bm-accent-soft); --color-bm-accent-ink: var(--bm-accent-ink); --color-bm-danger: var(--bm-danger); --color-bm-warn: var(--bm-warn); --color-bm-editor-bg: var(--bm-editor-bg); --color-bm-syntax-text: var(--bm-syntax-text); --color-bm-syntax-comment: var(--bm-syntax-comment); --color-bm-syntax-keyword: var(--bm-syntax-keyword); --color-bm-syntax-string: var(--bm-syntax-string); --color-bm-syntax-type: var(--bm-syntax-type); --color-bm-syntax-method: var(--bm-syntax-method); --color-bm-syntax-lineno: var(--bm-syntax-lineno); --font-serif: var(--font-source-serif); --font-sans: var(--font-reading-sans); --font-mono: var(--font-jetbrains-mono); --animate-bm-pulse: bm-pulse 1s ease-in-out infinite; --animate-bm-spin: bm-spin 0.7s linear infinite; } @keyframes bm-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } } @keyframes bm-spin { to { transform: rotate(360deg); } } /* Honor prefers-reduced-motion. The infinite opacity pulse (used on the playground "compiling…" status pill) is decorative and continuous, so freeze it fully visible for users who opt out of motion. Loading spinners are left running — an active spinner is a functional busy indicator and is generally exempt. */ @media (prefers-reduced-motion: reduce) { .animate-bm-pulse { animation: none; opacity: 1; } } /* ────────────────────────────────────────────────────────────────────── Body defaults ────────────────────────────────────────────────────────────────────── */ body { font-family: var(--font-sans), system-ui, -apple-system, sans-serif; letter-spacing: normal; background: var(--bm-bg); color: var(--bm-ink); } /* ────────────────────────────────────────────────────────────────────── Docs site — fumadocs typography overrides to match Botanical Modern. Layout selectors: #nd-docs-layout · #nd-sidebar · #nd-page · #nd-toc · article Fumadocs uses --color-fd-* for color tokens (already mapped to BM above), so most chrome inherits the right palette. The overrides below are for typography and a few accent hooks the design calls out specifically. ────────────────────────────────────────────────────────────────────── */ @media (min-width: 768px) { [data-sidebar-placeholder] { --fd-sidebar-width: 260px; } #nd-sidebar > * { width: 100%; } } /* Tell fumadocs that the page chrome above its layout is 72px tall — this is the height of our marketing Header. With fumadocs's own nav disabled, the layout sets `--fd-header-height: 0px` inline; we re-assert the variable here so any sticky math (TOC, sidebar, etc.) that derives off `--fd-header-height` gets the right value. */ [class*="[--fd-header-height:0px]"] { --fd-header-height: 72px; } /* Align the TOC column's top padding with the article body's so the "On this page" heading sits at the same y as the page h1, instead of clinging right against the marketing header below. #nd-page uses `py-6 md:pt-8 xl:pt-14`; mirror that here. */ [class*="[grid-area:toc]"] { padding-top: 1.5rem; /* 24px, matches #nd-page py-6 */ } @media (min-width: 768px) { [class*="[grid-area:toc]"] { padding-top: 2rem; /* 32px, matches md:pt-8 */ } } @media (min-width: 1280px) { [class*="[grid-area:toc]"] { padding-top: 3.5rem; /* 56px, matches xl:pt-14 */ } } /* A restrained editorial serif keeps the botanical character; supporting headings use the humanist reading face for quick technical scanning. */ /* Use html.* prefix to beat fumadocs's `:where()`-wrapped prose styles. */ html article#nd-page h1, html article#nd-page h2, html article#nd-page h3 { font-family: var(--font-serif), Georgia, serif; font-weight: 600; color: var(--bm-ink); } html article#nd-page h1 { font-size: 2.625rem; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 0; } html article#nd-page h2 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin-top: 1.6em; margin-bottom: 0.4em; } html article#nd-page h3 { font-weight: 700; font-family: var(--font-sans), system-ui, sans-serif; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.015em; margin-top: 1.5em; } /* Lato gives reading and navigation warm, open humanist letterforms. */ article#nd-page p, article#nd-page ul li, article#nd-page ol li { font-size: 1.0625rem; line-height: 1.7; color: var(--bm-ink-soft); } /* Smaller article headings remain distinct from body copy without relying on tiny labels. Tables share the reading size; code stays a little denser. */ html article#nd-page h4, html article#nd-page h5, html article#nd-page h6 { font-size: 1.125rem; line-height: 1.4; } article#nd-page table { font-size: 1.0625rem; } article#nd-page pre { font-size: 0.875rem; line-height: 1.6; } article#nd-page [role="tab"] { font-size: 0.9375rem; } /* Body copy fills the full content column, matching the code blocks, tables, and figures beside it. (An earlier 72ch cap left paragraphs visibly narrower than the code blocks — the column width is the measure.) */ /* Page description — the frontmatter subtitle rendered by DocsDescription, the immediate sibling right after the H1. Styled as a subtitle bound to the title: muted (distinct from body ink-soft), pulled tight under the H1, and given clear separation from the first body paragraph. The `h1 + p` selector only ever matches this element — body copy lives inside the `.prose` wrapper and is never an adjacent sibling of the H1. */ /* ────────────────────────────────────────────────────────────────────── PAGE HEADER — section eyebrow / title / description, bounded from body. Hierarchy is carried by ROLE signals, not size alone: · section → uppercase, tracked, accent-green eyebrow (a "kicker") · title → serif, weight + tracking (size reduced from 48→42px) · desc → muted ink + constrained measure · a hairline rule bounds the header from the article body The article is a flex column (gap-3 from the page template); child margins are zeroed so the gap owns the vertical rhythm. ────────────────────────────────────────────────────────────────────── */ /* Section eyebrow — the fumadocs breadcrumb div is the article's first child on every doc page (the /docs overview has no breadcrumb, so its h1 stays untouched). One segment: the top-level section name. */ article#nd-page > div:first-child { /* margin-bottom only — the mobile top margin (`max-xl:mt-14`, which clears the sticky mobile TOC pill at scroll-top) must be preserved, so never use the `margin` shorthand here. */ margin-bottom: 0.125rem; } article#nd-page > div:first-child > span, article#nd-page > div:first-child > a { color: var(--bm-accent); font-weight: 600; font-size: 0.875rem; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; } /* Page description — muted subtitle, tight to the title, constrained measure. `h1 + p` only ever matches this element (body copy lives inside `.prose` and is never an adjacent sibling of the H1). */ article#nd-page h1 + p { font-size: 1.0625rem; line-height: 1.5; color: var(--bm-ink-muted); max-width: 60ch; margin: 0; } /* Bound the header from the body with a hairline rule + breathing room, and cancel the first body block's top margin so content sits at a controlled distance below the rule (an unmanaged h2 margin-top left a large floaty gap here before). */ article#nd-page > .prose { border-top: 1px solid var(--bm-line-soft); padding-top: 1.75rem; margin-top: 0.5rem; } article#nd-page > .prose > :first-child { margin-top: 0; } /* Inline code in body — soft-cream chip */ article#nd-page :not(pre) > code { background: var(--bm-surface-alt); color: var(--bm-syntax-keyword); padding: 1px 5px; border-radius: 3px; font-size: 0.875em; font-family: var(--font-mono), ui-monospace, monospace; } /* ────────────────────────────────────────────────────────────────────── Docs code blocks. Fumadocs owns the outer frame (border, radius, shadow live on `figure.shiki`); we only theme the *surface* and the scroll behavior. The inner `
` carries no frame of its own — that is what
produced the box-in-box. Syntax colors come from the shared Pothos
shiki themes wired up in `source.config.ts`, so docs code matches the
playground editor in both light and dark.
────────────────────────────────────────────────────────────────────── */
/* STANDALONE block: the figure is the single frame. It carries fumadocs'
own border + radius (`my-4 bg-fd-card rounded-xl border`); we only repaint
the surface to the editor ground so docs code and the playground editor
read as one material. */
article#nd-page figure.shiki {
background: var(--bm-editor-bg);
}
/* TABBED block (CodeBlockTabs): fumadocs nests a code `figure.bg-fd-secondary`
inside a `div.bg-fd-card.rounded-xl.border` that also holds the tab row —
two frames (card + figure), each with its own border, radius and a
different fill. That is the "double box". Collapse to ONE surface: the
card owns the border/radius/background; the inner figure and its scroll
viewport go transparent, borderless and square. */
article#nd-page div.bg-fd-card:has(> [role="tablist"]) {
background: var(--bm-editor-bg);
}
article#nd-page figure.shiki.bg-fd-secondary {
background: transparent;
border: 0;
border-radius: 0;
margin: 0;
/* Drop fumadocs' `shadow-sm`: on the now-square (radius 0) panel it cast a
square-cornered shadow that poked past the card's rounded corners — a
stray artifact visible in light mode. The card carries the frame. */
box-shadow: none;
}
/* Tab row sits on the same surface — separated by a single hairline, never a
background change + border + radius. (The active-tab underline draws over
this line via fumadocs' own indicator.) */
article#nd-page div.bg-fd-card:has(> [role="tablist"]) > [role="tablist"] {
border-bottom: 1px solid var(--bm-line);
}
/* Inner : no second border, radius, or fill. The frame is the figure
(standalone) or the card (tabbed). */
article#nd-page pre {
background: transparent;
border: 0;
border-radius: 0;
}
/* Vertical scrolling is the page's job, not each block's. Drop the 600px
cap so tall blocks grow to fit; horizontal auto-scroll still handles
wide code (the is `w-max`). */
article#nd-page .fd-scroll-container {
max-height: none;
}
/* Sidebar — uppercase section heads, accent left rule on active items.
The sidebar and TOC selectors below have lower specificity than the
article heading/link rules above, but they never match the same
elements (different subtrees), so the ordering is not a cascade bug. */
/* biome-ignore-start lint/style/noDescendingSpecificity: sidebar/TOC rules target elements disjoint from the article rules */
#nd-sidebar {
font-family: var(--font-sans), system-ui, sans-serif;
}
#nd-sidebar [data-radix-scroll-area-viewport] > div > div > p,
#nd-sidebar h3,
#nd-sidebar [data-section-heading] {
font-size: 0.875rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--bm-ink-muted);
}
#nd-sidebar a {
font-size: 1rem;
color: var(--bm-ink-soft);
border-left: 2px solid transparent;
padding-left: 12px;
transition: color 120ms ease;
}
#nd-sidebar a:hover {
color: var(--bm-ink);
}
#nd-sidebar a[data-active="true"],
#nd-sidebar a[aria-current="page"] {
color: var(--bm-ink);
border-left-color: var(--bm-accent);
background: transparent;
}
/* TOC — design's "On this page" right rail */
[class*="[grid-area:toc]"] {
font-family: var(--font-sans), system-ui, sans-serif;
}
[class*="[grid-area:toc]"] h3,
[class*="[grid-area:toc]"] [data-toc-heading] {
font-size: 0.875rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--bm-ink-muted);
}
[class*="[grid-area:toc]"] a {
font-size: 0.9375rem;
color: var(--bm-ink-muted);
transition: color 120ms ease;
}
[class*="[grid-area:toc]"] a:hover {
color: var(--bm-ink);
}
[class*="[grid-area:toc]"] a[data-active="true"] {
color: var(--bm-ink);
}
/* biome-ignore-end lint/style/noDescendingSpecificity: sidebar/TOC rules target elements disjoint from the article rules */
/* ──────────────────────────────────────────────────────────────────────
Playground — chrome-only utilities (animations + Monaco transparency).
The token utilities live in @theme above and are usable site-wide.
────────────────────────────────────────────────────────────────────── */
.bm-error-squiggle {
text-decoration: underline wavy var(--bm-danger);
text-decoration-thickness: 1.5px;
text-underline-offset: 3px;
}
.bm-sketch-name {
border-bottom: 1px dashed transparent;
padding-bottom: 1px;
outline: none;
transition: border-color 120ms ease;
}
.bm-sketch-name:hover,
.bm-sketch-name:focus {
border-bottom-color: var(--bm-line);
}
/* Monaco — let our editor backgrounds show through */
.playground-shell .monaco-editor,
.playground-shell .monaco-editor .margin,
.playground-shell .monaco-editor-background,
.playground-shell .monaco-editor .inputarea.ime-input {
background-color: transparent;
}
.playground-shell *::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.playground-shell *::-webkit-scrollbar-track {
background: transparent;
}
.playground-shell *::-webkit-scrollbar-thumb {
background: var(--bm-line);
border-radius: 4px;
}
.playground-shell *::-webkit-scrollbar-thumb:hover {
background: var(--bm-ink-muted);
}
/* Search keeps its comfortable 18px input. Scope supporting text to this
dialog rather than changing other dialogs or the playground UI. */
[role="dialog"]:has(input):has(button[aria-selected]) button[aria-selected] {
font-size: 0.9375rem;
}
/* biome-ignore lint/style/noDescendingSpecificity: portaled search is disjoint from article */
[role="dialog"]:has(input):has(button[aria-selected]) button[aria-selected] > div:first-child {
font-size: 0.875rem;
}
/* Header navigation responds to available space in units of its own text,
including when readers enlarge their default font size. */
.bm-site-header {
container-type: inline-size;
}
@container (min-width: 64em) {
.bm-header-desktop-nav {
display: flex;
}
.bm-header-menu,
.bm-header-mobile-nav {
display: none;
}
}
.monaco-editor .playground-source-highlight {
background: color-mix(in srgb, var(--bm-accent) 12%, transparent);
}
.monaco-editor .playground-source-highlight-gutter {
border-left: 3px solid var(--bm-accent);
}