/* IBM Plex Sans 2.0, SIL Open Font License 1.1 (fonts/IBMPlexSans-LICENSE.txt).
 * IBM's own split files, unmodified (Plex is a Reserved Font Name, so we do not
 * subset it ourselves), with IBM's unicode ranges: Latin1 for text, Pi for
 * arrows, math, and punctuation, loaded only by a page that uses them.
 * Three faces: Text (Plex's weight 450, drawn for running text) as the
 * family's 400, its italic, and SemiBold for heads and strong. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-Text-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A,
    U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-Text-Pi.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042,
    U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC,
    U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199,
    U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215,
    U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11,
    U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-TextItalic-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A,
    U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-TextItalic-Pi.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042,
    U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC,
    U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199,
    U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215,
    U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11,
    U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A,
    U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-SemiBold-Pi.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042,
    U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC,
    U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199,
    U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215,
    U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11,
    U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD;
}

/* OpenMono, SIL Open Font License 1.1 (fonts/LICENSE). */
/* The files and their ranges come from the OpenCode website (src/font/README.md). In each style the "cyrillic"
 * rule is after the "rest" rule: both have U+0300-0301, and the browser uses the last rule that has a character. */
@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-017F, U+03A3, U+03C3, U+2000-200D, U+2010-2029, U+202F-2064, U+2070, U+2074-2079,
    U+2080-2081, U+20AC, U+2122, U+2190-21FF, U+2211-2212, U+2219-221A, U+221E, U+2248, U+2260, U+2264-2265,
    U+22C5, U+22EF, U+2303, U+2318, U+2325, U+232B, U+238B, U+23CE, U+2500-25FF, U+26A0, U+2713, U+2715-2717,
    U+FFFD;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-regular-rest.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0180-03A1, U+03A4-03C2, U+03C4-03FF, U+0531-058F, U+0E3F, U+1D00-1DBF, U+1E00-1FFE, U+2071, U+207A-207F,
    U+2082-209C, U+20A1-20AB, U+20AD-20C0, U+20D2, U+20D8, U+20EB, U+2100-2121, U+2124-218B, U+2200-2210,
    U+2213-2218, U+221B-221D, U+221F-2247, U+2249-225F, U+2261-2263, U+2266-22C4, U+22C6-22EE, U+22F0-2302,
    U+2304-2317, U+2319-2324, U+2326-232A, U+232D-238A, U+238D-23CC, U+23CF-2429, U+266D, U+266F, U+2687,
    U+2699, U+2731, U+2736, U+274C, U+2794, U+279C-279E, U+27DC, U+27E6-27EB, U+27F3, U+2916, U+2948, U+294A,
    U+2987-2988, U+29BF, U+2A00, U+2A05-2A06, U+2ADC, U+2AEE, U+2B0E-2B13, U+2B16, U+2B1D, U+2B25, U+2B29-2B2A,
    U+2B30, U+2C60-2C7F, U+A720-A7FF, U+AB30-AB6B, U+E0B8, U+E0BA, U+E0BC, U+E0BE, U+F882-F892, U+FB01-FB02,
    U+10788-107B9, U+1CD06-1CEAB, U+1D538-1D56B, U+1DF05-1DF1D, U+1FB82-1FBE7;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-regular-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0300-0301, U+0400-052F, U+A64C-A64D;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-017F, U+03A3, U+03C3, U+2000-200D, U+2010-2029, U+202F-2064, U+2070, U+2074-2079,
    U+2080-2081, U+20AC, U+2122, U+2190-21FF, U+2211-2212, U+2219-221A, U+221E, U+2248, U+2260, U+2264-2265,
    U+22C5, U+22EF, U+2303, U+2318, U+2325, U+232B, U+238B, U+23CE, U+2500-25FF, U+26A0, U+2713, U+2715-2717,
    U+FFFD;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-bold-rest.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0180-03A1, U+03A4-03C2, U+03C4-03FF, U+0531-058F, U+0E3F, U+1D00-1DBF, U+1E00-1FFE, U+2071, U+207A-207F,
    U+2082-209C, U+20A1-20AB, U+20AD-20C0, U+20D2, U+20D8, U+20EB, U+2100-2121, U+2124-218B, U+2200-2210,
    U+2213-2218, U+221B-221D, U+221F-2247, U+2249-225F, U+2261-2263, U+2266-22C4, U+22C6-22EE, U+22F0-2302,
    U+2304-2317, U+2319-2324, U+2326-232A, U+232D-238A, U+238D-23CC, U+23CF-2429, U+266D, U+266F, U+2687,
    U+2699, U+2731, U+2736, U+274C, U+2794, U+279C-279E, U+27DC, U+27E6-27EB, U+27F3, U+2916, U+2948, U+294A,
    U+2987-2988, U+29BF, U+2A00, U+2A05-2A06, U+2ADC, U+2AEE, U+2B0E-2B13, U+2B16, U+2B1D, U+2B25, U+2B29-2B2A,
    U+2B30, U+2C60-2C7F, U+A720-A7FF, U+AB30-AB6B, U+E0B8, U+E0BA, U+E0BC, U+E0BE, U+F882-F892, U+FB01-FB02,
    U+10788-107B9, U+1CD06-1CEAB, U+1D538-1D56B, U+1DF05-1DF1D, U+1FB82-1FBE7;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-bold-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0300-0301, U+0400-052F, U+A64C-A64D;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-017F, U+03A3, U+03C3, U+2000-200D, U+2010-2029, U+202F-2064, U+2070, U+2074-2079,
    U+2080-2081, U+20AC, U+2122, U+2190-21FF, U+2211-2212, U+2219-221A, U+221E, U+2248, U+2260, U+2264-2265,
    U+22C5, U+22EF, U+2303, U+2318, U+2325, U+232B, U+238B, U+23CE, U+2500-25FF, U+26A0, U+2713, U+2715-2717,
    U+FFFD;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-italic-rest.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0180-03A1, U+03A4-03C2, U+03C4-03FF, U+0531-058F, U+0E3F, U+1D00-1DBF, U+1E00-1FFE, U+2071, U+207A-207F,
    U+2082-209C, U+20A1-20AB, U+20AD-20C0, U+20D2, U+20D8, U+20EB, U+2100-2121, U+2124-218B, U+2200-2210,
    U+2213-2218, U+221B-221D, U+221F-2247, U+2249-225F, U+2261-2263, U+2266-22C4, U+22C6-22EE, U+22F0-2302,
    U+2304-2317, U+2319-2324, U+2326-232A, U+232D-238A, U+238D-23CC, U+23CF-2429, U+266D, U+266F, U+2687,
    U+2699, U+2731, U+2736, U+274C, U+2794, U+279C-279E, U+27DC, U+27E6-27EB, U+27F3, U+2916, U+2948, U+294A,
    U+2987-2988, U+29BF, U+2A00, U+2A05-2A06, U+2ADC, U+2AEE, U+2B0E-2B13, U+2B16, U+2B1D, U+2B25, U+2B29-2B2A,
    U+2B30, U+2C60-2C7F, U+A720-A7FF, U+AB30-AB6B, U+E0B8, U+E0BA, U+E0BC, U+E0BE, U+F882-F892, U+FB01-FB02,
    U+10788-107B9, U+1CD06-1CEAB, U+1D538-1D56B, U+1DF05-1DF1D, U+1FB82-1FBE7;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-italic-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0300-0301, U+0400-052F, U+A64C-A64D;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-bold-italic-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0-017F, U+03A3, U+03C3, U+2000-200D, U+2010-2029, U+202F-2064, U+2070, U+2074-2079,
    U+2080-2081, U+20AC, U+2122, U+2190-21FF, U+2211-2212, U+2219-221A, U+221E, U+2248, U+2260, U+2264-2265,
    U+22C5, U+22EF, U+2303, U+2318, U+2325, U+232B, U+238B, U+23CE, U+2500-25FF, U+26A0, U+2713, U+2715-2717,
    U+FFFD;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-bold-italic-rest.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range:
    U+0180-03A1, U+03A4-03C2, U+03C4-03FF, U+0531-058F, U+0E3F, U+1D00-1DBF, U+1E00-1FFE, U+2071, U+207A-207F,
    U+2082-209C, U+20A1-20AB, U+20AD-20C0, U+20D2, U+20D8, U+20EB, U+2100-2121, U+2124-218B, U+2200-2210,
    U+2213-2218, U+221B-221D, U+221F-2247, U+2249-225F, U+2261-2263, U+2266-22C4, U+22C6-22EE, U+22F0-2302,
    U+2304-2317, U+2319-2324, U+2326-232A, U+232D-238A, U+238D-23CC, U+23CF-2429, U+266D, U+266F, U+2687,
    U+2699, U+2731, U+2736, U+274C, U+2794, U+279C-279E, U+27DC, U+27E6-27EB, U+27F3, U+2916, U+2948, U+294A,
    U+2987-2988, U+29BF, U+2A00, U+2A05-2A06, U+2ADC, U+2AEE, U+2B0E-2B13, U+2B16, U+2B1D, U+2B25, U+2B29-2B2A,
    U+2B30, U+2C60-2C7F, U+A720-A7FF, U+AB30-AB6B, U+E0B8, U+E0BA, U+E0BC, U+E0BE, U+F882-F892, U+FB01-FB02,
    U+10788-107B9, U+1CD06-1CEAB, U+1D538-1D56B, U+1DF05-1DF1D, U+1FB82-1FBE7;
}

@font-face {
  font-family: "OpenMono";
  src: url("./fonts/openmono-bold-italic-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0300-0301, U+0400-052F, U+A64C-A64D;
}

/* Tokens, themes, and page primitives. One sans family, IBM Plex Sans, sets
 * every word of text; OpenMono sets code and diagrams. Hierarchy comes from
 * size, weight, and space only. The grays are IBM's neutral design-system ramp.
 * See DESIGN.md. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #161616;             /* IBM gray 100 */
  --ink-2: #525252;           /* gray 70: notes, summaries, chrome */
  --rule: #e0e0e0;            /* gray 20: hairlines */
  --rule-strong: #161616;     /* the one rule under a table's heads */
  --underline: #a8a8a8;       /* gray 40: link underlines */
  --code-lit: #525252;
  --code-com: #6f6f6f;        /* gray 60 */

  --font-text: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "OpenMono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-body: 1.0625rem;     /* 17px */
  --leading: 1.55;
  --text-small: 0.9375rem;    /* 15px: notes, summaries, chrome */
  --text-code: 0.875rem;      /* 14px: code blocks and diagrams */

  --measure: 34rem;           /* about 72 characters of Plex at 17px */
  --wide: 46rem;              /* code, tables, and diagrams */
  --gutter: 1.5rem;
  --space-block: 1rem;        /* between paragraphs */
  --space-figure: 1.75rem;    /* around code, tables, and diagrams */
}

/* Dark ink is gray 20, not white: lower contrast keeps light text on a dark
 * ground from blooming heavier than the same weight on paper. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161616;
  --ink: #e0e0e0;
  --ink-2: #a8a8a8;
  --rule: #393939;
  --rule-strong: #8d8d8d;
  --underline: #6f6f6f;
  --code-lit: #c6c6c6;
  --code-com: #8d8d8d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #161616;
    --ink: #e0e0e0;
    --ink-2: #a8a8a8;
    --rule: #393939;
    --rule-strong: #8d8d8d;
    --underline: #6f6f6f;
    --code-lit: #c6c6c6;
    --code-com: #8d8d8d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text-body);
  line-height: var(--leading);
  font-kerning: normal;
  font-synthesis: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Links are ink with a gray hairline under them; the line darkens on hover. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--underline);
}

a:hover {
  text-decoration-color: currentColor;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
}

strong {
  font-weight: 600;
}

p,
li {
  text-wrap: pretty;
}

code,
pre {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

.skip {
  position: absolute;
  left: -100vw;
}

.skip:focus {
  position: static;
}

[data-wordmark] {
  display: block;
  overflow: visible;
}

@media (max-width: 40rem) {
  :root {
    --text-body: 1.03125rem;  /* 16.5px: still about 48 characters on a phone */
    --text-code: 0.8125rem;
    --gutter: 1.25rem;
  }

  h1 {
    font-size: 1.625rem;
  }
}

/* Chrome: the top line on document pages and the footer, with the theme
 * button. Chrome is set small and in the secondary gray, so the title and
 * the text are always the loudest things on the page. Nothing is sticky. */

.page {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

/* The wordmark at the left, the three sections at the right, one hairline
 * under them. Nothing else: the theme follows the system, and its override
 * lives in the footer. */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem 1rem;
  border-block-end: 1px solid var(--rule);
  font-size: var(--text-small);
  line-height: 1.3;
}

.top .home {
  color: var(--ink);
}

/* The nav cut, 70 × 24 units at 1px per unit: every stem lands on whole
 * pixels. */
.top [data-wordmark] {
  width: 70px;
  height: 24px;
}

.top nav {
  display: flex;
  gap: 1.5rem;
  margin-inline-start: auto;
}

.top nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.top nav a:hover,
.top nav a[aria-current] {
  color: var(--ink);
}

[data-theme-toggle] {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
}

[data-theme-toggle]:hover {
  color: var(--ink);
}

/* The footer line: links and the license at the left, the theme button at
 * the right end. */
.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  font-size: var(--text-small);
  line-height: 1.4;
  color: var(--ink-2);
}

.colophon a {
  color: inherit;
  text-decoration: none;
}

.colophon a:hover {
  color: var(--ink);
}

.colophon [data-theme-toggle] {
  margin-inline-start: auto;
  padding-inline-start: 1.5rem;
}

.colophon > :is(a, span) + :is(a, span)::before {
  content: "·";
  display: inline-block;
  margin-inline: 0.75ch;
}

.doc-foot {
  margin-block: 4rem 2.5rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--rule);
}

/* Previous and next, by name. */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-block-end: 2rem;
}

.pager a {
  text-decoration: none;
}

.pager a:hover {
  text-decoration: underline;
}

.pager a[rel="next"] {
  margin-inline-start: auto;
  text-align: end;
}

/* The drafting reveal, drawn by js/egg.js only while a reader rests on the
 * wordmark: one-device-pixel construction lines over the mark, then one
 * link to /mark/. Both sit above the page and take no space in it, and
 * the lines never take a click. */
.egg-plate {
  position: absolute;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
  color: var(--ink-2);
}

.egg-plate line {
  fill: none;
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.egg-plate .r {
  stroke: var(--underline);
}

.egg {
  position: absolute;
  z-index: 1;
  margin: 0;
  padding-inline-end: 0.5rem;
  background: var(--bg);
  color: var(--ink-2);
  font-size: var(--text-small);
  line-height: 1.4;
  white-space: nowrap;
}

.egg span {
  margin-inline-end: 1ch;
  font-variant-numeric: tabular-nums;
}

.egg a {
  color: var(--ink);
}

/* In the top line, below its hairline. */
.top .egg {
  margin-block-start: 1rem;
}

/* The text. One grid, one left axis: prose holds the 34rem measure; code,
 * tables, and diagrams may extend right to the 46rem frame, and scroll
 * inside themselves past that. The page never scrolls sideways. */

.prose {
  display: grid;
  grid-template-columns:
    [text-start] min(var(--measure), 100%)
    [text-end] minmax(0, calc(var(--wide) - var(--measure)))
    [wide-end];
  overflow-wrap: break-word;
}

.prose > * {
  grid-column: text;
  min-width: 0;
}

.prose > :is(.code-block, .table-scroll, .box-figure, .diagram) {
  grid-column: text-start / wide-end;
  justify-self: start;
  width: fit-content;
  min-width: min(100%, var(--measure));
  max-width: 100%;
  margin-block: calc(var(--space-figure) - var(--space-block)) var(--space-figure);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin-block: 0 var(--space-block);
}

/* Heads: SemiBold, a little larger, more space above than below so each
 * belongs to the text it introduces. Grid items do not collapse margins. */

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-block-start: 1.5rem;
}

.prose h2 {
  margin-block: 2.75rem 0.75rem;
}

.prose h3 {
  margin-block: 2rem 0.5rem;
  font-size: 1.0625rem;
}

.prose h4 {
  margin-block: 1.5rem 0.375rem;
  font-size: 1rem;
}

.prose .anchor {
  margin-inline-start: 0.4ch;
  font-weight: 400;
  color: var(--ink-2);
  text-decoration: none;
  opacity: 0;
}

.prose :is(h2, h3):hover .anchor,
.prose .anchor:focus-visible {
  opacity: 1;
}

/* Lists */

.prose ul,
.prose ol {
  padding-inline-start: 1.25rem;
}

.prose li::marker {
  color: var(--ink-2);
}

.prose li + li {
  margin-block-start: 0.375rem;
}

.prose li > :is(ul, ol) {
  margin-block: 0.375rem 0;
}

/* A quotation: indented, in the secondary gray, no bar. */
.prose blockquote {
  margin-inline: 1.25rem 0;
  color: var(--ink-2);
}

.prose blockquote > :last-child {
  margin-block-end: 0;
}

.prose hr {
  width: 100%;
  margin: 2rem 0;
  border: 0;
  border-block-start: 1px solid var(--rule);
}

.prose img {
  max-width: 100%;
  height: auto;
}

/* Inline code: OpenMono in the text's ink, no wash and no box. Its x-height
 * (0.520 em) matches Plex's (0.516 em); 0.9em offsets its wider set. */
.prose code {
  font-size: 0.9em;
}

.prose :not(pre) > code {
  overflow-wrap: anywhere;
}

/* Code blocks: a hairline above and below, no fill, the code on the text
 * axis. */
.prose > .code-block {
  position: relative;
  width: 100%;
}

.prose pre {
  margin: 0;
  tab-size: 4;
}

.prose .code-block pre {
  padding-block: 1rem;
  overflow-x: auto;
  border-block: 1px solid var(--rule);
  font-size: var(--text-code);
  line-height: 1.55;
}

.prose .code-block pre code {
  font-size: inherit;
}

/* The copy control sits on the top rule at the right, so it never covers
 * a line of code. */
.prose .copy-code {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  translate: 0 -50%;
  padding: 0 0 0 0.625rem;
  border: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: 0.8125rem;
  line-height: 1.5;
  cursor: pointer;
  opacity: 0;
}

.prose .copy-code:hover {
  color: var(--ink);
}

.prose .code-block:hover .copy-code,
.prose .copy-code:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .prose .copy-code {
    opacity: 1;
  }
}

/* Highlighting by weight and shade, rendered at build time. */
.prose .tok-kw {
  font-weight: 700;
}

/* A session transcript: what the reader types is in ink, what the system
 * prints is in the secondary gray, so commands read first without any
 * block turning bold and heavy. */
pre:has(.tok-in) {
  color: var(--ink-2);
}

.tok-in {
  color: var(--ink);
}

.prose .tok-lit {
  color: var(--code-lit);
}

.prose .tok-com {
  color: var(--code-com);
  font-style: italic;
}

/* Diagrams: box drawings redrawn at build time as SVG (src/diagram.rs).
 * Lines are 1px in the secondary gray and stay 1px when a narrow screen
 * scales the figure down; labels are Plex in ink. Below three quarters of
 * its size a figure scrolls instead of shrinking. No frame, no fill. */
.prose .diagram {
  margin-inline: 0;
  overflow-x: auto;
  color: var(--ink-2);
}

.diagram svg {
  display: block;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.diagram-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}

.diagram-head {
  fill: currentColor;
}

.diagram text {
  fill: var(--ink);
  font-family: var(--font-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* A drawing in plain ASCII stays text, with no frame or fill. */
.prose .box-figure {
  margin-inline: 0;
  overflow-x: auto;
}

.prose .box-figure pre {
  width: max-content;
  font-size: var(--text-code);
  line-height: 1.25;
}

/* Tables: one ink rule under the heads, gray hairlines between rows, no
 * verticals, no fills. */
.prose .table-scroll {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}

.prose th,
.prose td {
  padding: 0.5rem 1.25rem 0.5rem 0;
  border-block-end: 1px solid var(--rule);
  text-align: left;
  vertical-align: baseline;
}

.prose :is(th, td):last-child {
  padding-inline-end: 0;
}

.prose thead th {
  padding-block-start: 0;
  border-block-end-color: var(--rule-strong);
  white-space: nowrap;
}

/* A cell that is one identifier never wraps. */
.prose td.id {
  white-space: nowrap;
}

.prose td code {
  overflow-wrap: normal;
}

/* Document pages: the title and the document lists on /rfcs/ and the
 * landing page. */

main {
  display: block;
}

/* The title, alone, with room above and below. */
.doc-head {
  max-width: var(--measure);
  margin-block: 3.5rem 1.5rem;
}

/* Document lists: the title in SemiBold, then what it covers in gray. */
.doc-list,
.prose .doc-list {
  margin-block: 0 var(--space-figure);
  padding: 0;
  list-style: none;
}

.doc-list li + li,
.prose .doc-list li + li {
  margin-block-start: 1.25rem;
}

.doc-list a {
  font-weight: 600;
  text-decoration: none;
}

.doc-list a:hover {
  text-decoration: underline;
}

.doc-list br {
  display: none;
}

.doc-list .summary {
  display: block;
  margin-block-start: 0.125rem;
  color: var(--ink-2);
  font-size: var(--text-small);
  line-height: 1.5;
}

/* Landing and 404: one centered column at the reading measure. The
 * wordmark, the opening paragraph a size up, the facts, one session
 * transcript, the documents, the footer line. Space separates the groups;
 * nothing else does. */

.landing {
  width: min(100% - 2 * var(--gutter), var(--measure));
  margin-inline: auto;
  padding-block: 7rem 3rem;
}

/* The hero cut, 75 × 24 units at 2px per unit: stems stay on whole
 * pixels. 150px fits a phone, so it keeps this size on every screen. */
.landing [data-wordmark] {
  width: 150px;
  height: 48px;
}

.landing h1 {
  margin-block-end: 3rem;
}

.landing .home {
  color: var(--ink);
}

.landing p,
.landing ul {
  margin-block: 0 var(--space-block);
}

/* The opening paragraph: what Plurics is, in one breath. */
.landing h1 + p {
  margin-block-end: 2rem;
  font-size: 1.375rem;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.landing .facts {
  padding-inline-start: 1.25rem;
}

.landing li::marker {
  color: var(--ink-2);
}

.facts li + li {
  margin-block-start: 0.5rem;
}

.landing code {
  font-size: 0.9em;
}

/* The transcript: hairlines above and below, no fill, a size down so its
 * longest command fits the measure. */
.shell {
  margin: 2.5rem 0 0;
  padding-block: 1rem;
  overflow-x: auto;
  border-block: 1px solid var(--rule);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.landing h2 {
  margin-block: 4rem 1.25rem;
}

.landing footer {
  margin-block-start: 5rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--rule);
}

@media (max-width: 40rem) {
  .landing {
    padding-block-start: 3.5rem;
  }

  .landing h1 {
    margin-block-end: 2rem;
  }

  .landing h1 + p {
    font-size: 1.1875rem;
  }
}
