/* Design tokens: internal/ui/static/app.css (sections 0–2). */
/*
 * appTown design system. See the ui-design skill.
 * Layers: primitives → semantic tokens → components. Components use semantic tokens only.
 * Light/dark: semantic colors use light-dark(); <html data-theme> pins color-scheme,
 * otherwise the device preference applies ("system").
 */

/* 0. The interface font (self-hosted, SIL OFL; apps may pick another in branding) */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* The appTown wordmark font: Quicksand Bold (the branding catalog's file, SIL OFL), rounded and
   geometric like the logo's lettering. Its own family name so an app's "Quicksand" never clashes. Only for Wordmark. */
@font-face { font-family: "appTown Wordmark"; src: url("/fonts/quicksand.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

/* 1. Primitives ------------------------------------------------------------------- */
:root {
  --gray-0: oklch(100% 0 0);
  --gray-50: oklch(98.5% 0.002 260);
  --gray-100: oklch(96.5% 0.004 260);
  --gray-200: oklch(92.5% 0.006 260);
  --gray-300: oklch(87% 0.008 260);
  --gray-400: oklch(71% 0.012 260);
  --gray-500: oklch(55.5% 0.014 260);
  --gray-600: oklch(45% 0.014 260);
  --gray-700: oklch(37% 0.012 260);
  --gray-800: oklch(27.5% 0.01 260);
  --gray-850: oklch(23% 0.009 260);
  --gray-900: oklch(20% 0.008 260);
  --gray-950: oklch(15% 0.006 260);

  /* Brand teal (matches the logo); 600 on white and 400 on gray-950 stay above 4.5:1. */
  /* appTown violet (hue 285): the centre of the logo's gradient. Apps override it. */
  --accent-300: oklch(82% 0.1 285);
  --accent-400: oklch(72% 0.16 285);
  --accent-500: oklch(60% 0.22 285);
  --accent-600: oklch(51% 0.23 285);
  --accent-700: oklch(44% 0.21 285);
  /* The logo's colours, for appTown's own brand surfaces only (sign-in, the brand line);
     never in app content, which uses the accent. */
  --brand-cyan: oklch(80% 0.14 215);
  --brand-blue: oklch(58% 0.23 262);
  --brand-violet: oklch(51% 0.27 295);
  --brand-magenta: oklch(63% 0.26 355);
  --brand-orange: oklch(73% 0.19 50);
  --brand-yellow: oklch(87% 0.17 92);
  --brand-night: oklch(15% 0.025 280);
  --brand-gradient: linear-gradient(105deg, var(--brand-cyan), var(--brand-blue) 22%, var(--brand-violet) 45%, var(--brand-magenta) 70%, var(--brand-orange) 88%, var(--brand-yellow));

  --red-300: oklch(76% 0.12 25);
  --red-600: oklch(53% 0.2 25);
  --red-700: oklch(47% 0.18 25);
  --green-300: oklch(80% 0.13 150);
  --green-700: oklch(46% 0.12 150);
  --amber-300: oklch(84% 0.14 80);
  --amber-700: oklch(50% 0.12 70);

  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "appTown Wordmark", var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --radius-preset-sharp: 0.125rem;
  --radius-preset-default: 0.5rem;
  --radius-preset-round: 1rem;
  --radius-full: 999px;

  --shadow-1: 0 1px 2px oklch(0% 0 0 / 0.06), 0 1px 3px oklch(0% 0 0 / 0.08);
  --shadow-2: 0 4px 12px oklch(0% 0 0 / 0.12), 0 2px 4px oklch(0% 0 0 / 0.08);

  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --toast-timeout: 4s; /* success/info toasts hide after this; danger stays */

  --z-base: 0;
  --z-sticky: 10;
  --z-overlay: 25; /* the phone/tablet menu drawer, above the bars */
  --z-menu: 20;
  --z-toast: 30;

  --border-width: 1px;
  --focus-width: 2px;
  --touch-target: 2.75rem;
  --content-max: 112rem; /* desktop pages use the width; only absurdly wide screens stop growing */
  --site-max: 72rem; /* the public home page's column */
  --form-max: 36rem;
  --field-max: 32rem; /* widest a single input gets in a row form */
  --prose-max: 48rem; /* readable line length for long text */
  --icon-size: 1.25rem;
  --topbar-height: 3.25rem; /* the phone/tablet top bar */
  --sidenav-width: 15rem;
  --bottomnav-height: 3.75rem;
  --menu-min: 14rem;
  --select-max: 18rem; /* tallest a Select's option list gets before it scrolls */
  --avatar-size: 2rem;
  --toast-max: 28rem;
  /* Safe area: the system bars, notch and gesture bar of an edge-to-edge phone (the
     Android app, iOS). 0 everywhere else. The body pads by them, so full-height
     layouts use --viewport-height instead of 100dvh. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* The strips on top of the page (siteBanners) take their height from here, so
     full-screen layouts (editor, sign-in) still fit with them. */
  --banner-beta: 0px;
  --banner-app: 0px;
  --viewport-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - var(--banner-beta) - var(--banner-app));
}

/* 2. Semantic tokens ----------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --color-bg: light-dark(var(--gray-50), var(--gray-950));
  --color-surface: light-dark(var(--gray-0), var(--gray-900));
  --color-surface-raised: light-dark(var(--gray-0), var(--gray-850));
  --color-surface-hover: light-dark(var(--gray-100), var(--gray-800));
  --color-border: light-dark(var(--gray-200), var(--gray-800));
  --color-border-strong: light-dark(var(--gray-300), var(--gray-700));
  --color-text: light-dark(var(--gray-900), var(--gray-50));
  --color-text-muted: light-dark(var(--gray-600), var(--gray-400));
  --color-accent: light-dark(var(--accent-600), var(--accent-400));
  --color-accent-hover: light-dark(var(--accent-700), var(--accent-300));
  --color-accent-contrast: light-dark(var(--gray-0), var(--gray-950));
  --color-danger: light-dark(var(--red-600), var(--red-300));
  --color-danger-hover: light-dark(var(--red-700), var(--red-300));
  --color-danger-contrast: light-dark(var(--gray-0), var(--gray-950));
  --color-success: light-dark(var(--green-700), var(--green-300));
  --color-warning: light-dark(var(--amber-700), var(--amber-300));
  --color-focus-ring: light-dark(var(--accent-500), var(--accent-300));

  /* Builder-customizable knobs (overridden by the generated app theme block). */
  --radius: var(--radius-preset-default);
  --radius-sm: calc(var(--radius) * 0.75);
  --density: 0.9; /* comfortable = 0.9, compact = 0.75 (app branding) */

  --control-height: max(calc(2.5rem * var(--density)), 2rem);
  --control-pad-x: calc(var(--space-4) * var(--density));
  --gap: calc(var(--space-4) * var(--density));
  --page-pad: var(--space-5);
  --section-gap: var(--space-6); /* above and below the hairline between sections */

  /* Accent tints: navigation, selected rows, chips (follow an app's accent). */
  --color-accent-soft: light-dark(color-mix(in oklab, var(--accent-600) 10%, var(--gray-0)), color-mix(in oklab, var(--accent-400) 16%, var(--gray-950)));
  --color-accent-softer: light-dark(color-mix(in oklab, var(--accent-600) 5%, var(--gray-0)), color-mix(in oklab, var(--accent-400) 8%, var(--gray-950)));
  --color-sidebar: light-dark(color-mix(in oklab, var(--accent-600) 4%, var(--gray-50)), color-mix(in oklab, var(--accent-400) 5%, var(--gray-900)));
}

/* Tile colours (app/group/role icon tiles, branding swatches): one hue each, white
   icon on the solid colour in both themes. */
.tile--teal { --tile: oklch(52% 0.09 195); }
.tile--blue { --tile: oklch(54% 0.17 255); }
.tile--indigo { --tile: oklch(50% 0.18 275); }
.tile--violet { --tile: oklch(52% 0.18 300); }
.tile--pink { --tile: oklch(56% 0.18 350); }
.tile--red { --tile: oklch(54% 0.19 25); }
.tile--orange { --tile: oklch(60% 0.16 50); }
.tile--amber { --tile: oklch(64% 0.13 80); }
.tile--green { --tile: oklch(54% 0.13 150); }
.tile--slate { --tile: oklch(48% 0.03 255); }

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Breakpoints (media queries can't read custom properties; keep in sync):
   mobile < 40rem ≤ tablet < 64rem ≤ desktop */
@media (max-width: 39.99rem) {
  :root {
    --page-pad: var(--space-4);
    --control-height: var(--touch-target);
    --grid-min: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
  }
}


/*
 * appTown Docs (docs.apptown.app). tools/docsgen puts the app's design tokens
 * (internal/ui/static/app.css, sections 0–2) above this file, so colours, type,
 * spacing and light/dark match the app. Use tokens only; no new colours here.
 * Layout: top bar; sidebar | article | "On this page" (≥80rem); the sidebar opens
 * from the menu button on phones and tablets (<64rem), without JavaScript.
 */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-height) + var(--space-4)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-sans); font-size: var(--text-md); line-height: var(--leading-normal); }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-hover); }
:focus-visible { outline: var(--focus-width) solid var(--color-focus-ring); outline-offset: var(--focus-width); }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: var(--space-4); top: -100%; z-index: var(--z-toast); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); background: var(--color-accent); color: var(--color-accent-contrast); }
.skip:focus { top: var(--space-2); }

/* Shared pieces from the app: the wordmark and buttons. */
.wordmark { font-family: var(--font-brand); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; color: var(--color-text); }
.wordmark__town { background: linear-gradient(90deg, var(--brand-violet), var(--brand-magenta) 40%, var(--brand-orange) 75%, var(--brand-yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (forced-colors: active) { .wordmark__town { background: none; color: CanvasText; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-height); padding-inline: var(--control-pad-x); border: var(--border-width) solid transparent; border-radius: var(--radius-sm); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn--primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn--primary:hover { background: var(--color-accent-hover); color: var(--color-accent-contrast); }

/* The beta strip (site.json "beta"), above the top bar. */
.betabar { display: flex; align-items: center; justify-content: center; gap: var(--space-3); min-height: 2rem; padding: var(--space-1) var(--space-4); background: var(--color-accent-soft); font-size: var(--text-xs); text-align: center; }
.betabar__badge { padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--color-accent); color: var(--color-accent-contrast); font-weight: var(--weight-semibold); }

/* Top bar */
.top { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--space-4); height: var(--topbar-height); padding: 0 var(--space-5); padding-top: var(--safe-top); border-bottom: var(--border-width) solid var(--color-border); background: var(--color-surface); }
.top::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--brand-gradient); }
.top__brand { display: flex; align-items: center; gap: var(--space-2); color: inherit; text-decoration: none; }
.top__brand img { block-size: 1.5rem; inline-size: auto; }
.top__docs { padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--color-accent-soft); color: var(--color-accent); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.top__menu { display: none; flex-direction: column; justify-content: center; gap: 4px; inline-size: var(--control-height); block-size: var(--control-height); padding: 0 var(--space-2); border-radius: var(--radius-sm); cursor: pointer; }
.top__menu span { display: block; height: 2px; border-radius: 2px; background: var(--color-text); }
.top__menu:hover { background: var(--color-surface-hover); }
.top__theme { min-height: var(--control-height); padding-inline: var(--space-3); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); background: transparent; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.top__theme:hover { background: var(--color-surface-hover); color: var(--color-text); }
.nav-open { position: absolute; opacity: 0; pointer-events: none; }

/* Search: a box in the top bar, results drop down under it. */
.search { position: relative; flex: 1; max-width: 28rem; margin-inline-start: auto; }
.search__input { width: 100%; min-height: var(--control-height); padding: 0 var(--space-8) 0 var(--space-3); border: var(--border-width) solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); font: inherit; font-size: var(--text-sm); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__key { position: absolute; inset-inline-end: var(--space-2); top: 50%; translate: 0 -50%; padding: 0 var(--space-1); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-muted); font-family: var(--font-mono); font-size: var(--text-xs); }
.search__input:focus + .search__key { display: none; }
.search__results { position: absolute; inset-inline: 0; top: calc(100% + var(--space-1)); z-index: var(--z-menu); max-height: min(70vh, 28rem); margin: 0; padding: var(--space-1); overflow-y: auto; list-style: none; border: var(--border-width) solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-raised); box-shadow: var(--shadow-2); }
.search__results a { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; }
.search__results strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.search__results span { color: var(--color-text-muted); font-size: var(--text-xs); }
.search__results a:hover, .search__results [aria-selected="true"] a { background: var(--color-accent-soft); }
.search__empty { padding: var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); }

/* Layout */
.layout { display: grid; grid-template-columns: 16rem minmax(0, var(--prose-max)) 14rem; justify-content: center; gap: var(--space-10); max-width: 90rem; margin-inline: auto; padding: 0 var(--space-5); }
.nav, .toc { position: sticky; top: var(--topbar-height); align-self: start; max-height: calc(100dvh - var(--topbar-height)); overflow-y: auto; padding-block: var(--space-6); }
.nav { display: flex; flex-direction: column; gap: var(--space-5); }
.nav__section { display: flex; flex-direction: column; gap: 1px; }
.nav__title { margin: 0 0 var(--space-1); padding-inline: var(--space-3); color: var(--color-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: 0.05em; text-transform: uppercase; }
.nav__link { padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); color: var(--color-text-muted); font-size: var(--text-sm); text-decoration: none; }
.nav__link:hover { background: var(--color-surface-hover); color: var(--color-text); }
.nav__link[aria-current="page"] { background: var(--color-accent-soft); color: var(--color-accent); font-weight: var(--weight-semibold); }
.main { min-width: 0; padding-block: var(--space-8) var(--space-12); }
.toc { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-sm); }
.toc__title { margin: 0 0 var(--space-1); font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: 0.05em; text-transform: uppercase; }
.toc__link { padding-block: 2px; padding-inline-start: var(--space-3); border-inline-start: 2px solid var(--color-border); color: var(--color-text-muted); text-decoration: none; }
.toc__link--h3 { padding-inline-start: var(--space-6); }
.toc__link:hover { color: var(--color-text); }
.toc__link[aria-current="true"] { border-color: var(--color-accent); color: var(--color-accent); }

/* Article: rendered Markdown. */
.eyebrow { margin: 0 0 calc(var(--space-2) * -1); color: var(--color-accent); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.prose { display: flex; flex-direction: column; gap: var(--space-4); }
.prose > * { margin: 0; }
.prose h1 { font-size: clamp(var(--text-xl), 3vw, var(--text-2xl)); line-height: var(--leading-tight); letter-spacing: -0.02em; }
.prose h1 + p { color: var(--color-text-muted); font-size: var(--text-lg); }
.prose h2 { margin-top: var(--space-6); padding-top: var(--space-6); border-top: var(--border-width) solid var(--color-border); font-size: var(--text-xl); line-height: var(--leading-tight); letter-spacing: -0.01em; }
.prose h3 { margin-top: var(--space-4); font-size: var(--text-lg); line-height: var(--leading-tight); }
.prose h4 { margin-top: var(--space-2); font-size: var(--text-md); }
.prose h2, .prose h3 { position: relative; }
.anchor { position: absolute; inset-inline-end: 100%; padding-inline-end: var(--space-2); color: var(--color-text-muted); font-weight: var(--weight-normal); text-decoration: none; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.prose ul, .prose ol { padding-inline-start: var(--space-6); display: flex; flex-direction: column; gap: var(--space-1); }
.prose li > p { margin: 0; }
.prose li > ul, .prose li > ol { margin-top: var(--space-1); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 0.1em var(--space-1); border-radius: var(--radius-sm); background: var(--color-surface-hover); overflow-wrap: anywhere; }
.prose pre { position: relative; padding: var(--space-4); overflow-x: auto; border: var(--border-width) solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); font-size: var(--text-sm); line-height: var(--leading-normal); }
.prose pre code { padding: 0; background: transparent; font-size: inherit; overflow-wrap: normal; }
.copy { position: absolute; top: var(--space-2); inset-inline-end: var(--space-2); padding: 0 var(--space-2); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-raised); color: var(--color-text-muted); font: inherit; font-size: var(--text-xs); cursor: pointer; opacity: 0; }
.prose pre:hover .copy, .copy:focus-visible { opacity: 1; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { padding: var(--space-2) var(--space-3); border-bottom: var(--border-width) solid var(--color-border); text-align: start; vertical-align: top; }
.prose th { font-weight: var(--weight-semibold); white-space: nowrap; }
.prose tr:hover td { background: var(--color-accent-softer); }
.prose blockquote { padding: var(--space-3) var(--space-4); border-inline-start: 3px solid var(--color-accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--color-accent-softer); }
.prose blockquote > * { margin: 0; }
.prose blockquote > * + * { margin-top: var(--space-2); }
.prose hr { width: 100%; border: 0; border-top: var(--border-width) solid var(--color-border); }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose kbd { padding: 0 var(--space-1); border: var(--border-width) solid var(--color-border-strong); border-bottom-width: 2px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.85em; }

/* Videos: {{video "id" "Title"}}. 16:9; a placeholder until the video exists. */
.video { display: flex; flex-direction: column; gap: var(--space-2); }
.video__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: var(--border-width) solid var(--color-border); border-radius: var(--radius); background: var(--brand-night); }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--soon .video__frame { display: grid; place-items: center; background:
  radial-gradient(60% 70% at 10% 0%, oklch(from var(--brand-cyan) l c h / 0.35), transparent 70%),
  radial-gradient(60% 70% at 100% 100%, oklch(from var(--brand-magenta) l c h / 0.35), transparent 70%),
  var(--brand-night); }
.video__soon { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--gray-0); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.video__play { display: grid; place-items: center; inline-size: 3.5rem; block-size: 3.5rem; border-radius: var(--radius-full); background: oklch(from var(--gray-0) l c h / 0.16); }
.video__play::after { content: ""; margin-inline-start: 4px; border-block: 0.6rem solid transparent; border-inline-start: 1rem solid var(--gray-0); }
.video figcaption { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Previous / next and the footer. */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-12); }
.pager__link { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border: var(--border-width) solid var(--color-border); border-radius: var(--radius); color: var(--color-text); font-weight: var(--weight-medium); text-decoration: none; }
.pager__link span { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-normal); }
.pager__link:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pager__link--next { grid-column: 2; text-align: end; }
.foot { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-10); padding-top: var(--space-5); border-top: var(--border-width) solid var(--color-border); color: var(--color-text-muted); font-size: var(--text-sm); }
.foot a { color: inherit; }

/* Narrower desktops: no "On this page". */
@media (max-width: 79.99rem) {
  .layout { grid-template-columns: 15rem minmax(0, var(--prose-max)); }
  .toc { display: none; }
}
/* Phones and tablets: the sidebar slides in from the menu button. */
@media (max-width: 63.99rem) {
  .layout { display: block; padding: 0 var(--space-4); }
  .top { gap: var(--space-3); padding-inline: var(--space-3); }
  .top__menu { display: flex; }
  .nav { position: fixed; inset: var(--topbar-height) auto 0 0; z-index: var(--z-overlay); width: min(20rem, 85vw); max-height: none; padding: var(--space-5) var(--space-4); border-inline-end: var(--border-width) solid var(--color-border); background: var(--color-surface); box-shadow: var(--shadow-2); translate: -105% 0; transition: translate var(--duration-normal); }
  .nav-open:checked ~ .layout .nav { translate: 0 0; }
  .nav-open:focus-visible ~ .top .top__menu { outline: var(--focus-width) solid var(--color-focus-ring); }
  .main { padding-top: var(--space-6); }
  .anchor { display: none; }
}
@media (max-width: 39.99rem) {
  .top .btn, .top__docs, .top__theme, .search__key { display: none; }
  .search { max-width: none; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { grid-column: 1; }
  .prose h1 + p { font-size: var(--text-md); }
}
@media print {
  .top, .nav, .toc, .pager, .copy { display: none; }
  .layout { display: block; }
}
