@import "@21n/fonts/styles.css"; @import "tailwindcss"; @import "@docsfn/svelte/theme.css"; /* Twenty One Native — same stack as @superfunctions/docs-theme / other monorepo docs */ :root { --docsfn-font-sans: "Twenty One Native", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* Tailwind v4 sets html { font-family: var(--default-font-family) } from --font-sans; align it */ --font-sans: var(--docsfn-font-sans); /* Component theme uses --docsfn-color-* (see @docsfn/svelte theme.css), not --docsfn-primary */ --docsfn-color-primary: hsl(154, 33%, 24%); --docsfn-color-primary-hover: hsl(154, 33%, 20%); --docsfn-color-accent-soft: hsl(154 33% 24% / 0.12); /* * TopBar is outside DocsLayout but uses position:sticky in theme.css. * Set this to roughly the rendered top bar height so the docs sidebar/TOC stick below it. */ --docsfn-sticky-top-offset: 4rem; /* Whole docs chrome (left sidebar + article + right TOC) max width; centers as a group */ --docsfn-docs-shell-max-width: min(100rem, 100%); /* Article column max inside the middle grid cell; justify-self:center centers it when capped */ --docsfn-main-column-max-width: 48rem; /* Sidebar column + full-bleed gutter to the left when the docs shell is centered */ --docsfn-sidebar-panel-bg: #f4f4f5; } @media (prefers-color-scheme: dark) { :root { --docsfn-sidebar-panel-bg: #232326; --docsfn-color-primary: hsl(155, 39%, 58%); --docsfn-color-primary-hover: hsl(155, 39%, 54%); --docsfn-color-accent-soft: hsl(155 39% 58% / 0.12); } } /* * Tailwind @layer base wins over unscoped rules in the same file order for html — but unlayered * rules beat @layer. Force the document font so we are not stuck on ui-sans-serif / system-ui. */ html, body { font-family: var(--docsfn-font-sans); } /* ─── Site-specific layout (see @docsfn/svelte theme.css for defaults) ───── */ /* Homepage / blog: keep top bar content centered with a comfortable max width */ .docsfn-topbar-container { max-width: var(--fd-layout-width, 1600px); margin-inline: auto; padding-inline: 1rem; box-sizing: border-box; } /* * Docs routes: TopBar inner width matches the docs shell so nav lines up with the article column. * Same max-width as --docsfn-docs-shell-max-width + asymmetric padding = sidebar + main padding. */ @media (min-width: 1024px) { .docsfn-site-root.docsfn-docs-chrome .docsfn-topbar-container { max-width: var(--docsfn-docs-shell-max-width, none); margin-inline: auto; width: 100%; padding-left: calc(var(--docsfn-sidebar-width) + var(--docsfn-main-padding-inline)); padding-right: var(--docsfn-main-padding-inline); box-sizing: border-box; } } /* The published theme hides this column on mobile; an open drawer must override it. */ @media (max-width: 1023px) { .docsfn-site-root .docsfn-sidebar-col.docsfn-sidebar-col--open { display: block; top: var(--docsfn-sticky-top-offset); height: calc(100vh - var(--docsfn-sticky-top-offset)); height: calc(100dvh - var(--docsfn-sticky-top-offset)); } }