/* Herald site. Palette and type from docs/brand: ink on paper, one warm accent.
   No web fonts are downloaded: Source Serif 4 and IBM Plex Sans are used when installed,
   otherwise close system faces. */

:root {
  --ink: #1a1a1a;
  --paper: #f6f1e7;
  --sunrise: #e2572b; /* graphics, rules and large text only */
  --ember: #b8431c; /* small accent text and links */
  --press: #5c574f;
  --rule: #1a1a1a;
  --hair: #d9d1c1;
  --serif: "Source Serif 4", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia,
    serif;
  --display: "Source Serif 4 Display", "Source Serif 4", Charter, "Bitstream Charter",
    "Sitka Display", Cambria, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.6 var(--serif);
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* ---------- masthead ---------- */

.topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0 0;
  font: 0.75rem/1.4 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--press);
}

/* language menu: a native <details> disclosure, no script. The summary shows the
   current language (code on narrow screens, name on wide ones); the menu lists all */
.lang {
  position: relative;
  font-weight: 600;
}

.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2rem;
  padding: 0 0.25rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary svg {
  display: inline-block;
  flex: none;
}

.lang[open] .chevron {
  transform: rotate(180deg);
}

.lang summary .code {
  display: none;
}

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.125rem);
  z-index: 5;
  min-width: 11.25rem;
  margin: 0;
  padding: 0.375rem 0;
  list-style: none;
  background: var(--paper);
  border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font: 400 0.9375rem/1.3 var(--serif);
  letter-spacing: 0;
  text-transform: none;
}

.lang li + li a {
  border-top: 1px solid var(--hair);
}

.lang ul a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.625rem 0.875rem;
  color: var(--ink);
  text-decoration: none;
}

.lang ul a:hover {
  color: var(--ember);
}

.lang ul .code {
  font: 600 0.6875rem/1.3 var(--sans);
  letter-spacing: 0.08em;
  color: var(--press);
}

.lang ul [aria-current] {
  font-weight: 600;
}

.lang ul [aria-current] .code {
  color: var(--ember);
}

@media (max-width: 60rem) {
  .lang summary .code {
    display: inline;
  }

  .lang summary .name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.masthead {
  text-align: center;
  padding: 1.25rem 0 0;
}

.masthead .logo {
  display: inline-block;
}

.masthead .logo img {
  width: clamp(180px, 30vw, 270px);
}

.rules {
  border: 0;
  border-top: 3px solid var(--rule);
  margin: 1.25rem 0 0;
  height: 4px;
  border-bottom: 1px solid var(--rule);
}

.sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2rem;
  margin: 0;
  padding: 0.6rem 0;
  list-style: none;
  font: 600 0.78rem/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
}

.sections a {
  display: inline-block; /* the padding counts: 24 px touch targets once the list wraps */
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
}

.sections a:hover,
.sections [aria-current] {
  color: var(--ember);
}

.sections [aria-current] {
  box-shadow: inset 0 -2px 0 var(--sunrise);
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

.kicker {
  font: 600 0.75rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 0.9rem;
}

.standfirst {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.45;
  color: var(--press);
  max-width: 34em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 3px solid var(--rule);
  padding-top: 0.6rem;
  margin: 0 0 1.75rem;
}

.section-head h2 {
  font: 600 0.8rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head p {
  margin: 0;
  font: 0.8rem/1.4 var(--sans);
  color: var(--press);
}

.meta,
small {
  font: 0.8rem/1.5 var(--sans);
  color: var(--press);
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.85em;
}

:not(pre) > code {
  background: #ece5d6;
  padding: 0.05em 0.3em;
  border-radius: 2px;
}

pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  border-radius: 2px;
}

pre .c {
  color: #a39e94;
}

/* copy button added by copy.js */
.codeblock {
  position: relative;
  margin: 0 0 1.25rem;
}

.codeblock pre {
  margin: 0;
  padding-right: 3rem;
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #a39e94;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
}

.copy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy:hover,
.copy:focus-visible {
  color: var(--paper);
  border-color: #5c574f;
}

.copy.done {
  color: var(--paper);
}

.copy:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- layout blocks ---------- */

main {
  padding-bottom: 4rem;
}

.block {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 4vw, 3.5rem);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  align-items: end;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 5px;
  background: var(--sunrise);
  margin-top: 1.6rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
  font: 600 0.9rem/1 var(--sans);
}

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 0.95rem 1.35rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.button:hover {
  background: #000;
}

.more {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--sunrise);
  padding-bottom: 0.2rem;
}

.figures {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.figures div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hair);
}

.figures dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.figures dd {
  margin: 0;
  font: 0.85rem/1.4 var(--sans);
  color: var(--press);
}

/* ---------- sample briefing ---------- */

.sample-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.sheet {
  background: #fbf8f1;
  border: 1px solid var(--hair);
  box-shadow: 0 1px 0 var(--hair), 0 18px 40px -28px rgb(26 26 26 / 0.35);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  font-size: 1.02rem;
}

.sheet header {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.9rem;
  margin-bottom: 0.4rem;
}

.sheet header h3 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.sheet header p {
  margin: 0.45rem 0 0;
  font: 0.82rem/1.4 var(--sans);
  color: var(--press);
}

.sheet h4 {
  font: 600 0.72rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 1.6rem 0 0;
}

.story {
  padding: 0.8rem 0 1rem;
  border-bottom: 1px solid var(--hair);
}

.story:last-of-type {
  border-bottom: 0;
}

.story h5 {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.story p {
  margin: 0 0 0.45rem;
}

.story .why {
  font-style: italic;
}

.story .why b {
  font-style: normal;
}

.story .src {
  font: 0.78rem/1.5 var(--sans);
  color: var(--press);
  margin: 0;
}

.story .src a {
  font-weight: 600;
}

.agenda {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  font-size: 0.95rem;
}

.agenda li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding: 0.3rem 0;
}

.agenda time {
  font: 600 0.78rem/1.8 var(--sans);
  color: var(--press);
}

.sheet footer {
  border-top: 1px solid var(--ink);
  margin-top: 1.25rem;
  padding-top: 0.6rem;
  font: 0.75rem/1.5 var(--sans);
  color: var(--press);
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: note;
}

.notes li {
  counter-increment: note;
  position: relative;
  padding: 0 0 1.4rem 3rem;
}

.notes li::before {
  content: counter(note);
  position: absolute;
  left: 0;
  top: -0.35rem;
  font: 600 2rem/1 var(--display);
  color: var(--sunrise);
  font-variant-numeric: lining-nums;
}

.notes h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.notes p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--press);
}

.disclaimer {
  margin-top: 1rem;
}

/* ---------- lists of channels and agents ---------- */

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
}

.columns h3 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.columns > div > p {
  color: var(--press);
}

.ledger {
  margin: 1rem 0 0;
  border-top: 1px solid var(--rule);
}

.ledger div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hair);
}

.ledger dt {
  font: 600 0.9rem/1.5 var(--sans);
}

.ledger dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* ---------- principles strip ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.principles li {
  padding: 1.25rem 1.5rem 0 0;
}

.principles li + li {
  padding-left: 1.5rem;
  border-left: 1px solid var(--hair);
}

.principles h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.principles p {
  font-size: 0.98rem;
  color: var(--press);
  margin: 0;
}

/* ---------- article pages ---------- */

.article-head {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 48rem;
}

.article-head h1 {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.prose {
  max-width: 38rem;
}

.prose h2 {
  font-size: 1.65rem;
  margin: 2.5rem 0 0.8rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.dropcap::first-letter {
  float: left;
  font: 600 4.6rem/0.8 var(--display);
  color: var(--sunrise);
  padding: 0.35rem 0.6rem 0 0;
}

/* get started: the one-line prompt for a coding agent, wrapped instead of scrolled */
.agent-install {
  max-width: 38rem;
  margin-top: 2.5rem;
}

.agent-install pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 38rem) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  margin-top: 2.5rem;
}

.aside {
  border-top: 3px solid var(--rule);
  padding-top: 0.8rem;
  align-self: start;
  position: sticky;
  top: 1.5rem;
}

.aside p {
  font-size: 0.98rem;
  color: var(--press);
}

.aside .pullquote {
  font: 600 clamp(1.5rem, 2.6vw, 1.9rem) / 1.2 var(--display);
  color: var(--ink);
  margin: 0 0 1rem;
}

.pullquote::before {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  background: var(--sunrise);
  margin-bottom: 0.9rem;
}

.tenets {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: tenet;
}

.tenets > li {
  counter-increment: tenet;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0 1rem;
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 0.6rem;
}

.tenets > li::before {
  content: counter(tenet, decimal-leading-zero);
  font: 600 2.4rem/1 var(--display);
  color: var(--sunrise);
  font-variant-numeric: lining-nums;
}

.tenets > li > div {
  max-width: 46rem;
}

.tenets h2 {
  font-size: 1.55rem;
  margin: 0.1rem 0 0.6rem;
}

.tenets ul {
  padding-left: 1.1rem;
  margin: 0 0 0.8rem;
}

.tenets li li {
  margin-bottom: 0.35rem;
}

/* ---------- pipeline ---------- */

.diagram {
  margin: 0;
}

.diagram svg {
  width: 100%;
}

.report {
  max-width: 52rem;
}

.diagram figcaption {
  margin-top: 0.75rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font: 0.8rem/1.4 var(--sans);
  color: var(--press);
}

.legend li::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.45rem;
  vertical-align: -0.1rem;
  background: var(--ink);
}

.legend .ai::before {
  background: var(--sunrise);
}

.stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stages li {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0 1.4rem;
}

.stages h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.stages h3 span {
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.1em;
  color: var(--ember);
  margin-right: 0.5rem;
  vertical-align: 0.15rem;
}

.stages p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--press);
}

/* ---------- get started ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0 1rem;
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 0.5rem;
}

.steps > li::before {
  content: counter(step);
  font: 600 2.4rem/1 var(--display);
  color: var(--sunrise);
  font-variant-numeric: lining-nums;
}

.steps h2 {
  font-size: 1.55rem;
  margin: 0.15rem 0 0.6rem;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.links li {
  border-bottom: 1px solid var(--hair);
}

.links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  color: var(--ink);
  text-decoration: none;
  font: 0.95rem/1.4 var(--sans);
}

.links a::after {
  content: "→";
  color: var(--ember);
}

.links a:hover {
  color: var(--ember);
}

.not-found {
  max-width: 38rem;
  margin: 2.5rem 0 3rem;
}

/* ---------- footer ---------- */

.colophon {
  border-top: 3px solid var(--rule);
  margin-top: 2rem;
  padding: 1.25rem 0 3rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem 2rem;
  align-items: start;
  font: 0.8rem/1.6 var(--sans);
  color: var(--press);
}

.colophon img {
  width: 40px;
}

.colophon p {
  margin: 0;
}

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

/* ---------- small screens ---------- */

@media (max-width: 60rem) {
  .hero,
  .sample-grid,
  .with-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .aside {
    position: static;
  }

  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }

  .topline .edition {
    display: none;
  }

  .topline {
    justify-content: flex-end;
  }

  .sections {
    gap: 0.25rem 1.1rem;
    font-size: 0.7rem;
  }

  .columns,
  .principles,
  .stages {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles li,
  .principles li + li {
    padding: 1.1rem 0 1rem;
    border-left: 0;
    border-bottom: 1px solid var(--hair);
  }

  .ledger div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .tenets > li,
  .steps > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .tenets > li::before,
  .steps > li::before {
    margin-bottom: 0.5rem;
  }

  .colophon {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .topline,
  .sections,
  .actions {
    display: none;
  }
}

/* the pipeline diagram has a wide and a narrow drawing; show one */
.diagram svg.narrow {
  display: none;
  max-width: 26rem;
}

@media (max-width: 40rem) {
  .diagram svg.wide {
    display: none;
  }

  .diagram svg.narrow {
    display: block;
  }
}

/* ---------- documentation (site/docs, rendered from docs/*.md by scripts/build_docs.py) ---------- */

.docs-page {
  --wrap: 84rem;
}

.docs {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 0 clamp(2rem, 4vw, 3.5rem);
  padding-top: 2rem;
}

.docs-menu {
  display: none;
}

.docs-nav {
  align-self: start;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 0.25rem 0.25rem 2rem 0;
}

.docs-nav p,
.docs-menu nav p,
.toc p {
  font: 600 0.7rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 1.25rem 0 0.4rem;
}

.docs-nav p:first-child,
.toc p {
  margin-top: 0;
}

.docs-nav ul,
.docs-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  font: 0.875rem/1.4 var(--sans);
}

.docs-nav a,
.docs-menu ul a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.6rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
}

.docs-nav a:hover,
.docs-menu ul a:hover {
  color: var(--ember);
}

.docs-nav [aria-current],
.docs-menu [aria-current] {
  color: var(--ember);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sunrise);
}

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.doc-head h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.toc {
  border-top: 3px solid var(--rule);
  padding-top: 0.6rem;
  margin: 0.5rem 0 2rem;
  font: 0.85rem/1.4 var(--sans);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc ol ol {
  padding-left: 0.9rem;
}

.toc a {
  display: block;
  padding: 0.2rem 0;
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ember);
}

.doc-body {
  max-width: 46rem;
}

.doc-body h2 {
  font-size: 1.65rem;
  margin: 2.75rem 0 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.doc-body h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.6rem;
}

.doc-body h4 {
  font: 600 1rem/1.4 var(--sans);
  margin: 1.5rem 0 0.5rem;
}

.doc-body [id] {
  scroll-margin-top: 1rem;
}

.anchor {
  color: inherit;
  text-decoration: none;
}

.anchor:hover::after {
  content: " #";
  color: var(--sunrise);
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.3rem;
  margin: 0 0 1.1rem;
}

.doc-body li {
  margin-bottom: 0.35rem;
}

.doc-body li > ul,
.doc-body li > ol {
  margin: 0.35rem 0 0;
}

.doc-body blockquote {
  margin: 0 0 1.25rem;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--sunrise);
  color: var(--press);
}

.doc-body hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 2rem 0;
}

.doc-body img {
  display: inline-block;
  vertical-align: middle;
}

.doc-body pre {
  font-size: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.doc-body table {
  border-collapse: collapse;
  font: 0.875rem/1.45 var(--sans);
}

.doc-body th,
.doc-body td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.9rem 0.45rem 0;
  border-bottom: 1px solid var(--hair);
}

.doc-body th {
  border-bottom: 1px solid var(--rule);
}

.doc-index {
  margin: 0;
}

.doc-index div {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hair);
}

.doc-index dt {
  font: 600 0.95rem/1.5 var(--sans);
}

.doc-index dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--press);
}

.doc-foot {
  max-width: 46rem;
  margin-top: 3rem;
  border-top: 3px solid var(--rule);
  padding-top: 0.75rem;
  font: 0.875rem/1.4 var(--sans);
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.pager a {
  display: block;
  padding: 0.75rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--hair);
}

.pager a:hover {
  color: var(--ember);
}

.pager span {
  display: block;
  font: 600 0.7rem/1.6 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

@media (min-width: 80rem) {
  .doc {
    grid-template-columns: minmax(0, 1fr) 13rem;
    column-gap: 3rem;
  }

  .doc > * {
    grid-column: 1;
  }

  .doc > .toc {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    margin: 0;
    padding-bottom: 2rem;
  }
}

@media (max-width: 80rem) {
  .toc ol ol {
    display: none;
  }
}

@media (max-width: 60rem) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0;
  }

  .docs-nav {
    display: none;
  }

  .docs-menu {
    display: block;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 1.5rem;
  }

  .docs-menu summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    font: 600 0.78rem/1.4 var(--sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .docs-menu summary::-webkit-details-marker {
    display: none;
  }

  .docs-menu summary span {
    margin-left: auto;
    color: var(--ember);
    letter-spacing: 0;
    text-transform: none;
  }

  .docs-menu summary::after {
    content: "+";
    width: 1rem;
    text-align: center;
    color: var(--ember);
  }

  .docs-menu[open] summary::after {
    content: "−";
  }

  .docs-menu nav {
    padding-bottom: 1rem;
  }

  .doc-index div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }
}

@media print {
  .docs-nav,
  .docs-menu,
  .toc,
  .pager {
    display: none;
  }
}
