:root {
  color-scheme: light;
  --ink: light-dark(#19291f, #e6ece1);
  --muted: light-dark(#526457, #adb9aa);
  --line: light-dark(#d5ded4, #3a473d);
  --paper: light-dark(#fcfdf9, #151b17);
  --surface: light-dark(#fff, #202922);
  --sidebar: light-dark(#f5f7f1, #1a211c);
  --soft: light-dark(#edf2e7, #2b362d);
  --link: light-dark(#205641, #b8d7a2);
  --selected: light-dark(#e3edcf, #354831);
  --selected-text: light-dark(#1a3825, #dcebc8);
  --secondary: light-dark(#405346, #c0ccbe);
  --focus: light-dark(#527a30, #bfde93);
  --lime: #e0efb4;
  --header-height: 4.65rem;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  font: 100%/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
  }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--link);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
header {
  position: sticky;
  z-index: 5;
  top: 0;
  height: var(--header-height);
  padding: 0 clamp(1rem, 3vw, 3.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #192c23;
  color: #f2f6ed;
  --focus: #bfde93;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.07em;
}
.brand-sub {
  padding-left: 1rem;
  border-left: 1px solid #566a5c;
  color: #d1ded1;
  font-size: 0.96rem;
}
.paper {
  color: #e6eddf;
  text-decoration: none;
  font-size: 0.94rem;
  margin-left: 0.35rem;
}
.appearance {
  --switch-rule: #718774;
  --switch-icon: #d1ded1;
  --switch-hover: #354e3d;
  --switch-selected: #d9e6a4;
  --switch-on-selected: #1a2b21;
  --switch-focus: #efd093;
  display: inline-flex;
  position: relative;
  flex: none;
  align-items: center;
  gap: 0.125rem;
  margin: 0;
  padding: 0.125rem;
  min-inline-size: 0;
  border: 1px solid var(--switch-rule);
  border-radius: 2rem;
}
.appearance .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme-option {
  position: relative;
  display: inline-grid;
  place-items: center;
}
.theme-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.theme-option svg {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.56rem;
  border-radius: 50%;
  color: var(--switch-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.theme-option:hover svg { background: var(--switch-hover); }
.theme-option input:checked + svg {
  background: var(--switch-selected);
  color: var(--switch-on-selected);
}
.theme-option input:focus-visible + svg {
  outline: 2px solid var(--switch-focus);
  outline-offset: 2px;
}
@media (pointer: coarse) {
  .theme-option svg { width: 2.75rem; height: 2.75rem; padding: 0.81rem; }
}
@media (forced-colors: active) {
  .appearance {
    --switch-rule: ButtonText;
    --switch-icon: ButtonText;
    --switch-hover: ButtonFace;
    --switch-selected: Highlight;
    --switch-on-selected: HighlightText;
    --switch-focus: Highlight;
  }
  .theme-option svg { forced-color-adjust: none; }
}
.search {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #5b7263;
  border-radius: 0.5rem;
  background: #253d31;
  color: #e6eddf;
  width: min(19rem, 36vw);
}
.search > span {
  font-size: 1.4rem;
  line-height: 1;
}
.search input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: 0;
  color: white;
  font-size: 1rem;
  outline-offset: 1px;
}
.search input::placeholder {
  color: #c1d0c4;
}
.search kbd {
  border: 1px solid #6a8170;
  border-radius: 0.25rem;
  padding: 0 0.32rem;
  color: #cbdbcc;
  font-size: 0.82rem;
}
#results {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(31rem, 88vw);
  max-height: 60vh;
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.4rem;
  box-shadow: 0 8px 25px #1c312322;
}
#results a,
#results p {
  display: block;
  padding: 0.55rem 0.75rem;
  margin: 0;
}
#results a {
  text-decoration: none;
  border-radius: 0.35rem;
}
#results a:hover,
#results a:focus {
  background: var(--soft);
}
#results small {
  display: block;
  color: var(--muted);
}
#menu {
  display: none;
}
.layout {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr) auto;
  max-width: 100rem;
  margin: auto;
  min-height: calc(100vh - var(--header-height));
}
nav {
  padding: 2rem 1.2rem;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}
nav a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.57rem;
  font-size: 0.95rem;
  color: var(--secondary);
  border-radius: 0.4rem;
  padding: 0.42rem 0.62rem;
}
nav a.active {
  background: var(--selected);
  color: var(--selected-text);
  font-weight: 650;
}
.nav-group,
.toc > p {
  text-transform: uppercase;
  letter-spacing: 0.115em;
  font-weight: 700;
  font-size: 0.77rem;
  color: var(--muted);
  margin: 1.9rem 0.65rem 0.35rem;
}
.glyph {
  width: 1.23rem;
  height: 1.23rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  flex: none;
}
main {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.65rem clamp(1.1rem, 3.5vw, 4rem) 5rem;
  min-width: 0;
}
.crumb {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.45rem;
}
.crumb a {
  color: var(--muted);
  text-decoration: none;
}
.crumb span {
  color: var(--muted);
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 17.5rem;
  border-radius: 0.9rem;
  padding: clamp(1.8rem, 3.5vw, 3rem);
  background: #244335;
  color: #f6f8ed;
}
.hero > div:first-child {
  z-index: 1;
  max-width: 71%;
}
.hero h1,
article h1 {
  font-size: clamp(2.5rem, 4.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.065em;
  margin: 0 0 1.05rem;
}
.hero p {
  max-width: 37rem;
  color: #e2ebdc;
  line-height: 1.55;
  margin: 0 0 1.35rem;
  font-size: 1.05rem;
}
.cta {
  display: inline-block;
  background: var(--lime);
  color: #203725;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.62rem 1rem;
  border-radius: 0.45rem;
  text-decoration: none;
}
.strata {
  position: absolute;
  z-index: 0;
  right: 0;
  top: 0;
  width: 32%;
  height: 100%;
  opacity: 0.84;
  background: repeating-linear-gradient(
    157deg,
    transparent 0 16px,
    #648b69 17px 18px,
    transparent 19px 31px
  );
  mask-image: linear-gradient(to right, transparent, #000 33%);
}
.strata::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 100%;
  right: -4%;
  background: repeating-linear-gradient(
    145deg,
    #244335 0 16px,
    #a1b47b 17px 18px,
    #244335 19px 31px
  );
  transform: skewY(-12deg);
}
.section-title,
article h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin: 2.4rem 0 1rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 1.12rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
}
.card:hover {
  background: var(--soft);
  border-color: #829980;
  text-decoration: none;
}
.card > .glyph {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--link);
}
.card h3 {
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  margin: 0.65rem 0 0.2rem;
}
.card p {
  color: var(--muted);
  margin: 0;
}
.toc {
  width: clamp(10rem, 14vw, 15rem);
  padding: 1.65rem 1.25rem 0.65rem 0;
  align-self: start;
  position: sticky;
  top: var(--header-height);
  max-height: calc(100vh - 5rem);
  overflow: auto;
}
.toc p {
  margin: 0.2rem 0 0.65rem;
}
.toc a {
  display: block;
  text-decoration: none;
  line-height: 1.4;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding: 0.38rem 0.65rem;
  font-size: 0.88rem;
}
.toc a:hover {
  color: var(--link);
  text-decoration: underline;
}
article {
  max-width: 76ch;
  overflow-wrap: anywhere;
}
article h1 {
  font-size: clamp(2.35rem, 3.5vw, 3.6rem);
  margin: 0.5rem 0 1.1rem;
}
article h1 + p {
  font-size: 1.13rem;
  color: var(--secondary);
}
article h2,
article h3 {
  scroll-margin-top: calc(var(--header-height) + 1.35rem);
}
article pre {
  padding: 1rem 1.1rem;
  border-radius: 0.5rem;
  color: #e4efda;
  background: #1f3328;
  overflow: auto;
  line-height: 1.55;
  font-size: 0.9rem;
}
article code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
article :not(pre) > code {
  background: var(--soft);
  padding: 0.08rem 0.23rem;
  border-radius: 0.2rem;
  font-size: 0.9em;
}
article li + li {
  margin-top: 0.45rem;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.96rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--soft);
}
article img {
  max-width: 100%;
}
.skip,
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  width: auto;
  height: auto;
  clip-path: none;
  z-index: 10;
  top: 0.3rem;
  left: 0.3rem;
  background: var(--surface);
  padding: 0.5rem;
}
[hidden] {
  display: none !important;
}
@media (max-width: 70rem) {
  .layout {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 47rem) {
  :root {
    --header-height: 4rem;
  }
  header {
    gap: 0.65rem;
  }
  .brand-sub,
  .paper,
  .search kbd {
    display: none;
  }
  .search {
    width: auto;
    flex: 1;
    max-width: 17rem;
  }
  .search input {
    font-size: 0.92rem;
  }
  #menu {
    display: inline-block;
    color: white;
    background: transparent;
    border: 1px solid #718774;
    border-radius: 0.35rem;
    padding: 0.3rem 0.55rem;
  }
  .layout {
    display: block;
  }
  nav {
    display: none;
  }
  nav.open {
    display: block;
    position: fixed;
    z-index: 4;
    left: 0;
    right: 0;
    top: var(--header-height);
    max-height: calc(100dvh - var(--header-height));
    overflow: auto;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
  }
  .nav-group {
    margin: 1rem 0.65rem 0.25rem;
  }
  main {
    padding: 1rem 1rem 3rem;
  }
  .hero {
    min-height: 0;
    padding: 1.65rem 1.25rem;
  }
  .hero > div:first-child {
    max-width: 90%;
  }
  .strata {
    width: 17%;
    opacity: 0.5;
  }
  .hero h1 {
    font-size: 2.55rem;
  }
  .crumb {
    margin: 0 0 0.9rem;
  }
  .cards {
    gap: 0.6rem;
  }
  .card {
    padding: 0.85rem;
  }
  article table:has(thead th:nth-child(3)) {
    min-width: 24rem;
  }
  #results {
    position: fixed;
    left: 0.7rem;
    right: 0.7rem;
    top: calc(var(--header-height) - 0.2rem);
    width: auto;
  }
}
@media (max-width: 34rem) {
  :root {
    --header-height: 6.5rem;
  }
  header {
    height: auto;
    min-height: var(--header-height);
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.4rem 0.65rem;
    padding-block: 0.45rem;
  }
  .search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 25rem) {
  .cards {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 1.4rem;
  }
  .search > span {
    display: none;
  }
}

.nav-litepaper {
  display: none;
}
.source-path {
  font-size: 0.88rem;
  color: var(--muted);
}
.source-code span,
.checkout-list li {
  scroll-margin-top: calc(var(--header-height) + 1.35rem);
}
.source-code span:target {
  background: #4b6348;
}
.checkout-list li:target {
  background: var(--selected);
  outline: 1px solid var(--line);
}
@media (max-width: 47rem) {
  .nav-litepaper {
    display: flex;
  }
}
@media print {
  header,
  nav,
  .toc,
  .crumb,
  .skip {
    display: none;
  }
  .layout,
  main,
  article {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  pre {
    white-space: pre-wrap;
  }
}

main footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
}
main footer a {
  color: var(--muted);
}
