:root {
  --bg: #fdfdfc;
  --ink: #15171a;
  --muted: #555b63;
  --rule: #cfd3d8;
  --link: #0b4fb3;
  --visited: #6a3d9a;
  --pass: #11693d;
  --fail: #b3261e;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --ink: #e4e6e9;
    --muted: #9aa1aa;
    --rule: #33373e;
    --link: #8db4ff;
    --visited: #c3a4ee;
    --pass: #6fd69b;
    --fail: #ff8f86;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.7 var(--serif); }
a { color: var(--link); text-underline-offset: 0.18em; }
a:visited { color: var(--visited); }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
code, pre, .meta, .toc { font-family: var(--mono); }
code { font-size: 0.88em; }
p, ul, ol, dl, table, pre { margin: 0 0 1rem; }

.page { display: grid; grid-template-columns: 12rem minmax(0, 46rem); gap: 3.5rem; width: min(100% - 2rem, 62rem); margin: 0 auto; padding: 3rem 0 6rem; }

/* contents */
.toc { position: sticky; top: 2rem; align-self: start; font-size: 0.85rem; line-height: 1.4; }
.toc .name { display: block; margin-bottom: 1rem; font-weight: 700; font-size: 1rem; color: var(--ink); text-decoration: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0.45rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* title block, like the head of an RFC */
.title { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--ink); }
h1 { margin: 0; font: 700 2.4rem/1.1 var(--mono); letter-spacing: -0.02em; }
.tagline { margin: 0.6rem 0 1.5rem; font-size: 1.25rem; line-height: 1.4; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 1.5rem; margin: 0; font-size: 0.85rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }

h2 { margin: 3rem 0 0.75rem; font: 700 1.35rem/1.25 var(--serif); }
h3 { margin: 1.5rem 0 0.35rem; font: 700 1.05rem/1.3 var(--serif); }
section > h2:first-child { margin-top: 0; }
section + section { margin-top: 3rem; }

ul, ol { padding-left: 1.4rem; }
li { margin: 0.3rem 0; }
ol.plain li { margin: 0.7rem 0; }
.refs { list-style: none; padding: 0; font-size: 0.97rem; }
.end { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.92rem; }

/* real terminal output, not a mock-up of a window */
pre { overflow-x: auto; padding: 0.9rem 1rem; border-left: 3px solid var(--rule); font-size: 0.8rem; line-height: 1.6; white-space: pre; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.p { color: var(--muted); }
.pass { color: var(--pass); font-weight: 700; }
.fail { color: var(--fail); font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 1rem 0.55rem 0; border-bottom: 1px solid var(--rule); }
thead th { border-bottom: 2px solid var(--ink); font-weight: 700; }
td:first-child { white-space: nowrap; }

/* narrow screens: the contents list moves above the text */
@media (max-width: 54rem) {
  .page { display: block; padding-top: 1.5rem; }
  .toc { position: static; margin-bottom: 2.5rem; }
  .toc ol { columns: 2; column-gap: 1.5rem; }
  h1 { font-size: 2rem; }
}
@media (max-width: 36rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  td { border: 0; padding: 0.1rem 0; white-space: normal; }
  td:first-child { font-weight: 700; }
}
