/* SPDX-License-Identifier: AGPL-3.0-only */
/* The standalone pages (docs, landing, install): ink and paper, following the system like the sign-in pages, with the sign-in card's colours,
   the app's root size and type roles (D372: sizes in rem, the root 100 % of 16 px on desktop and touch) and weights. The frame
   (top bar, footer) is site.css; the structure every docs page shares is doc.css. Generated docs-theme.css supplies the shared theme
   and glass colours; this file supplies the reading type and page geometry.
   Browser zoom is never blocked (D159): every length is rem, the viewport tag has no scale limit.

   Reading (D388): the text is 1 rem, which is 16 px on a desktop and on a phone, set at a line height of 1.6, in a column of
   about 68 characters. The longest line of a page is therefore about 720 px on a desktop and the screen's width on a phone. */
@font-face {
  font-family: "Maple Mono NF";
  src: url("/docs/fonts/roman.latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ui-overlay-saturation: 160%;
  /* The app's root size and type sizes (packages/ui/styles.css, D372), written again because these pages load no token file. */
  --ui-base: 1;
  font-size: calc(16px * var(--ui-base));
  --ui-size-body: 0.875rem; --ui-size-label: 0.8125rem; --ui-size-eyebrow: 0.75rem;
  /* The reading size and the secondary size: the long text is read at 1 rem, a caption or a footnote at the eyebrow role. */
  --read: 1rem;
  --text-body: var(--read); --text-secondary: var(--ui-size-label); --row: 1.75rem;
  --r-xs: 0.375rem; --r-sm: 0.5rem; --r-md: 0.75rem; --r-lg: 1.125rem; --r-pill: 999px;
  --pill-h: 2.375rem; --gutter: 1rem;
  --fw-secondary: 450; --fw-body: 500; --fw-label: 550; --fw-title: 650;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  /* The app names this one curve --ease-out (style.css); doc.css is shared with the in-app reader and reads that name, so the standalone pages define it too. */
  --ease-out: var(--ease);
  /* The same three transition durations as the app (packages/ui/styles.css, D372); doc.css reads them. */
  --t-press: 120ms; --t-pop: 180ms; --t-panel: 240ms;
  --font-read: "Maple Mono NF", ui-monospace, monospace;
  /* The top bar's height, so a sticky column and a heading reached by a link sit below it. */
  --bar-h: calc(env(safe-area-inset-top) + 0.625rem + var(--pill-h) + 0.75rem);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-read);
  font-synthesis: none;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--bar-h);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
}
@media (pointer: coarse) { :root { --ui-base: 1; --pill-h: 2.75rem; --row: 2.75rem; } }

body { margin: 0; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); font-size: var(--read); font-weight: var(--fw-body); line-height: 1.6; font-synthesis: none; }
p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin: 0.4em 0; }
strong { font-weight: var(--fw-title); }
a { color: var(--fg); text-decoration-color: var(--fg-3); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }

/* ---- The reading type -------------------------------------------------------------------------------------------------------
   One scale in `em` of the 1 rem text: title 2.05, section 1.5, sub-section 1.2. doc.css sets the structure and a smaller scale for
   the canvas window; these rules come from the `.docs-col` and outrank it, so the in-app reader is unchanged. */
.docs-col .doc h1 { margin: 0 0 0.5rem; font-size: 2.05em; font-weight: var(--fw-title); line-height: 1.15; letter-spacing: -0.03em; }
.docs-col .doc .lede { margin: 0 0 2rem; color: var(--fg-2); font-size: 1.18em; line-height: 1.5; }
.docs-col .doc h2 { margin: 3.25rem 0 0.875rem; padding-top: 2rem; border-top: 1px solid var(--line); font-size: 1.5em; font-weight: var(--fw-title); line-height: 1.25; letter-spacing: -0.02em; }
.docs-col .doc h3 { margin: 2.5rem 0 0.625rem; font-size: 1.2em; font-weight: var(--fw-title); line-height: 1.3; }
.docs-col .doc h4 { margin: 1.75rem 0 0.5rem; font-size: 1em; font-weight: var(--fw-title); }
.docs-col .doc .doc-body > h2:first-child { padding-top: 0; border-top: 0; }
.docs-col .doc :target { scroll-margin-top: calc(var(--bar-h) + 1rem); }
/* Under 40 rem the top bar is not sticky (site.css), so nothing covers the heading: it lands 1 rem from the top, not 82 px low (#482). */
@media (max-width: 40rem) { .docs-col .doc :target { scroll-margin-top: 1rem; } }
/* The measure: 68 characters of Maple Mono, about 720 px at the desktop size. */
.docs-col .doc-head, .docs-col .doc-body { max-width: 68ch; }
.docs-col .doc code { font-size: 0.88em; }
.docs-col .doc pre { padding: 0.875rem 1.125rem; font-size: 0.88em; line-height: 1.6; }
.docs-col .doc .doc-code > .ui-copied { top: 0.875rem; left: 1.125rem; }
.docs-col .doc .callout, .docs-col .doc .why, .docs-col .doc .table, .docs-col .doc .doc-code, .docs-col .doc .quote, .docs-col .doc blockquote { margin-bottom: 1.25rem; }
.docs-col .doc .callout { padding: 0.875rem 1.125rem; }
.docs-col .doc .notes { font-size: var(--text-secondary); }
.docs-col .doc .toc { top: calc(var(--bar-h) + 0.5rem); max-height: calc(100dvh - var(--bar-h) - 1.5rem); font-size: var(--text-secondary); }
.docs-col .doc .toc-fold summary { font-size: 1em; }
@media (pointer: coarse) { :root { --text-secondary: 0.9375rem; } }
