:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #1c2d37;
  background: #f7f9fa;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #096274; text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid #0a8399; outline-offset: 4px; }

.topbar { background: #142936; color: #fff; }
.topbar-inner {
  max-width: 78rem;
  min-height: 4.25rem;
  margin: auto;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem 1.5rem;
}
.wordmark { color: #fff; font-size: 1.05rem; font-weight: 720; text-decoration: none; }
.toplinks { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; }
.toplinks a { color: #d9e8ed; font-size: .9rem; text-decoration: none; }
.toplinks a:hover, .toplinks a[aria-current] { color: #fff; text-decoration: underline; }

.layout {
  max-width: 78rem;
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  gap: clamp(1rem, 5vw, 5rem);
  margin: auto;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem);
}
.sections { position: sticky; top: 1.5rem; display: grid; gap: .4rem; }
.sections a { border-left: 2px solid #d4e0e3; padding: .35rem .7rem; text-decoration: none; }
.sections a:hover { border-color: #0a8399; text-decoration: underline; }
article { min-width: 0; max-width: 54rem; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
article h1 { margin: 0 0 .65rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.07; letter-spacing: -.04em; }
article h2 { margin: 2.4rem 0 .6rem; font-size: clamp(1.25rem, 3vw, 1.65rem); scroll-margin-top: 1rem; }
article p, article ul, article ol { margin: .7rem 0 1.05rem; }
article li { margin-bottom: .45rem; }
article code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
article :not(pre) > code { padding: .12em .3em; border-radius: .2rem; background: #e8eff1; }
article pre { overflow: auto; border-radius: .5rem; background: #142936; color: #eff6f8; padding: 1rem; }
article table { width: 100%; border-collapse: collapse; background: #fff; }
article th, article td { text-align: left; padding: .45rem .7rem; border: 1px solid #d4e0e3; }
article th { background: #e8eff1; }
.reference { background: #fff; min-height: calc(100vh - 4.25rem); }

@media (max-width: 44rem) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sections { position: static; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); font-size: .9rem; }
}
