:root {
  color-scheme: dark;
  --ground: #1c232d;
  --rail: #161c25;
  --inset: #141a22;
  --rule: #313c4b;
  --text: #dce3ec;
  --soft: #9ba8b9;
  --link: #8cb6f2;
  --link-hover: #bcd5fb;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
code, pre { font-family: var(--mono); font-size: 0.875rem; }
pre {
  margin: 0;
  padding: 18px 20px;
  background: var(--inset);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.55;
}
p { margin: 0; }

/* Page frame: a fixed rail of types beside the content. */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 32px 28px;
  background: var(--rail);
  border-right: 1px solid var(--rule);
}
.wordmark { display: block; color: var(--text); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.wordmark:hover { color: var(--text); text-decoration: none; }
.release { color: var(--soft); font-size: 0.875rem; margin-top: 2px; }
.rail h2 { margin: 32px 0 8px; font-size: 0.875rem; font-weight: 500; color: var(--soft); }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li a { display: block; padding: 4px 0 4px 12px; margin-left: -12px; border-left: 2px solid transparent; }
.rail li a[aria-current="page"] { color: var(--text); border-left-color: var(--link); font-weight: 500; }

main { padding: 56px 64px 96px; max-width: 1560px; }
main section { margin-top: 56px; }
main h1 { margin: 0 0 16px; font-size: 2.5rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; max-width: 24ch; }
main h2 { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.005em; }
main h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; }
.intro > p { font-size: 1.1875rem; line-height: 1.55; color: var(--soft); max-width: 70ch; }
.prose { max-width: 70ch; }
.aside { color: var(--soft); font-size: 0.9375rem; max-width: 80ch; margin-top: 14px; }
h2 + .aside { margin: 0 0 14px; }

.meta { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 28px 0 0; }
.meta dt { color: var(--soft); font-size: 0.875rem; }
.meta dd { margin: 0; overflow-wrap: anywhere; }

/* Tables are plain ruled rows: the content is reference data. */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 11px 24px 11px 0; border-bottom: 1px solid var(--rule); }
th { color: var(--soft); font-size: 0.875rem; font-weight: 500; padding-top: 0; }
tr > :last-child { padding-right: 0; }
td code { color: var(--text); white-space: nowrap; }
.detail { display: block; color: var(--soft); font-size: 0.9375rem; }
.line { display: block; }
.count { text-align: right; font-variant-numeric: tabular-nums; }
.index td:first-child { font-weight: 500; white-space: nowrap; }
.index td:nth-child(2) { color: var(--soft); white-space: nowrap; }
.properties { min-width: 880px; }
.properties td:nth-child(4), .properties td:nth-child(5) { color: var(--soft); font-size: 0.9375rem; }
.properties td:nth-child(5) { overflow-wrap: anywhere; }
.keys { width: auto; min-width: min(100%, 420px); }
.scroll { overflow-x: auto; }

/* Prose on the left, the code it describes on the right. */
.usage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.usage:first-of-type { padding-top: 8px; }
.usage p { color: var(--soft); max-width: 52ch; }
.usage p code { color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 48px; margin: 0; }
.facts dt { font-weight: 600; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--soft); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 64px; align-items: start; }
.split > section:only-child { grid-column: 1 / -1; max-width: 760px; }

@media (max-width: 1000px) {
  .usage, .split { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  main { padding: 40px 32px 72px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .rail { position: static; height: auto; padding: 20px 16px; border-right: 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; }
  .release { margin: 0; }
  .rail h2 { display: none; }
  .rail ul { display: contents; }
  .rail li { list-style: none; }
  .rail li a { margin: 0; padding: 2px 0; border-left: 0; }
  .wordmark { width: auto; margin-right: 4px; }
  main { padding: 32px 16px 64px; }
  main h1 { font-size: 2rem; }
  .index th:nth-child(2), .index td:nth-child(2), .index .count { display: none; }
}
