:root {
  color: #17211b;
  background: #f5f2ea;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #17211b;
  --muted: #69726c;
  --paper: #f5f2ea;
  --paper-bright: #fffdf8;
  --green: #1e6b4d;
  --green-dark: #123d2e;
  --green-soft: #dce9df;
  --orange: #e7663c;
  --line: rgb(23 33 27 / 0.14);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgb(23 33 27 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 33 27 / 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px;
}

a {
  color: inherit;
}

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

.docs-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(28px, calc((100vw - 1380px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(245 242 234 / 0.92);
  backdrop-filter: blur(18px);
}

.docs-brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.docs-brand-mark {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  transform: rotate(45deg);
}

.docs-brand-mark::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--orange);
  content: "";
  inset: 4px;
}

.docs-header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.docs-header nav a {
  color: #4d5751;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.docs-header nav a:hover,
.docs-header nav a:focus-visible {
  color: var(--green);
}

.docs-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  width: min(1380px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
}

.docs-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  padding: 34px 26px 60px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.docs-nav-group + .docs-nav-group {
  margin-top: 25px;
}

.docs-nav-group h2 {
  margin: 0 0 7px 10px;
  color: #89918c;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.docs-nav-group a {
  display: block;
  margin: 2px 0;
  padding: 7px 10px;
  border-radius: 8px;
  color: #4e5952;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.35;
  text-decoration: none;
}

.docs-nav-group a:hover,
.docs-nav-group a:focus-visible {
  color: var(--green-dark);
  background: rgb(255 253 248 / 0.65);
}

.docs-nav-group a.is-active {
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 780;
}

.docs-main {
  min-width: 0;
}

.docs-article {
  width: min(900px, calc(100% - 80px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.docs-article h1,
.docs-article h2,
.docs-article h3,
.docs-article h4 {
  position: relative;
  color: var(--ink);
  scroll-margin-top: 94px;
}

.docs-article h1 {
  max-width: 820px;
  margin: 0 0 30px;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 68px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.docs-article h2 {
  margin: 64px 0 21px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.docs-article h3 {
  margin: 43px 0 15px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.docs-article h4 {
  margin: 30px 0 12px;
  font-size: 16px;
}

.heading-anchor {
  margin-left: 9px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.65em;
  font-weight: 600;
  opacity: 0;
  text-decoration: none;
}

.docs-article h1:hover .heading-anchor,
.docs-article h2:hover .heading-anchor,
.docs-article h3:hover .heading-anchor,
.docs-article h4:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.docs-article p,
.docs-article li {
  color: #4f5a53;
  font-size: 16px;
  line-height: 1.75;
}

.docs-article p {
  margin: 0 0 18px;
}

.docs-article ul,
.docs-article ol {
  margin: 0 0 24px;
  padding-left: 26px;
}

.docs-article li + li {
  margin-top: 7px;
}

.docs-article a {
  color: var(--green);
  font-weight: 650;
  text-decoration-color: rgb(30 107 77 / 0.35);
  text-underline-offset: 3px;
}

.docs-article strong {
  color: var(--ink);
}

.docs-article :not(pre) > code {
  padding: 0.13em 0.38em;
  border: 1px solid rgb(23 33 27 / 0.09);
  border-radius: 5px;
  color: #18583f;
  background: rgb(255 253 248 / 0.8);
  font-size: 0.88em;
}

.docs-article pre {
  max-width: 100%;
  margin: 22px 0 28px;
  padding: 23px 25px;
  overflow-x: auto;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 14px;
  color: #edf7ef;
  background: #17211b;
  box-shadow: 0 18px 50px rgb(18 61 46 / 0.12);
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}

.docs-article pre code {
  color: inherit;
}

.docs-article blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 23px;
  border-left: 3px solid var(--orange);
}

.docs-article blockquote p {
  margin: 0;
  color: #4b554f;
  font-style: italic;
}

.docs-article table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 24px 0 32px;
  overflow-x: auto;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 14px;
}

.docs-article th,
.docs-article td {
  min-width: 140px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  color: #4f5a53;
  text-align: left;
  vertical-align: top;
}

.docs-article th {
  color: var(--ink);
  background: var(--green-soft);
  font-weight: 780;
}

.docs-article hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.docs-footer {
  display: flex;
  justify-content: space-between;
  width: min(900px, calc(100% - 80px));
  margin: 0 auto;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.docs-footer a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

/* The contents toggle is a checkbox so the drawer needs no JavaScript. It stays
   focusable for the keyboard while the label carries the visible button. */
.docs-nav-state {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip-path: inset(50%);
}

.docs-nav-button {
  display: none;
  gap: 8px;
  align-items: center;
  padding: 6px 13px;
  border: 1px solid var(--docs-border, rgb(0 0 0 / 0.16));
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.docs-nav-icon {
  position: relative;
  width: 15px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.docs-nav-state:focus-visible + .docs-shell .docs-sidebar,
.docs-nav-state:focus-visible ~ .docs-shell .docs-sidebar {
  outline: 2px solid var(--accent, #1d6b4f);
}

@media (max-width: 900px) {
  .docs-shell {
    display: block;
  }

  .docs-nav-button {
    display: inline-flex;
  }

  /* A drawer rather than a block above the article: the page opens on the text,
     and the contents appear only when asked for. */
  .docs-sidebar {
    position: static;
    display: none;
    max-height: 70vh;
    height: auto;
    padding: 18px 24px 22px;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin;
  }

  .docs-nav-state:checked ~ .docs-shell .docs-sidebar {
    display: block;
  }

  .docs-nav-group + .docs-nav-group {
    margin-top: 18px;
  }

  .docs-article {
    width: min(760px, calc(100% - 48px));
    padding-top: 52px;
  }

  .docs-footer {
    width: calc(100% - 48px);
  }
}

@media (max-width: 560px) {
  .docs-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .docs-header nav {
    gap: 14px;
  }

  /* The drawer already lists the documentation home and the brand already leads back to the
     gallery, so on a narrow phone the header keeps only what nothing else reaches. Fitting
     these in left about two pixels to spare, which any wider set of fonts spends. */
  .docs-nav-external,
  .docs-nav-gallery,
  .docs-nav-home {
    display: none;
  }

  .docs-header {
    gap: 10px;
  }

  .docs-nav-button {
    padding: 6px 11px;
  }

  .docs-brand {
    font-size: 16px;
  }

  .docs-brand-mark {
    width: 18px;
    height: 18px;
  }

  .docs-brand-mark::after {
    width: 6px;
    height: 6px;
    inset: 4px;
  }

  .docs-sidebar {
    padding-inline: 18px;
  }

  .docs-article {
    width: calc(100% - 36px);
    padding: 42px 0 72px;
  }

  .docs-article h1 {
    font-size: 43px;
  }

  .docs-article h2 {
    margin-top: 50px;
    font-size: 25px;
  }

  .docs-article p,
  .docs-article li {
    font-size: 15px;
  }

  .docs-article pre {
    padding: 18px;
    border-radius: 10px;
    font-size: 12px;
  }

  .docs-footer {
    display: grid;
    gap: 8px;
    width: calc(100% - 36px);
  }
}

.docs-preview {
  margin: 20px 0 28px;
}

.docs-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--docs-border, rgb(0 0 0 / 0.12));
  border-radius: 10px;
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.08);
}

.docs-lang-switch {
  padding: 4px 12px;
  white-space: nowrap;
  border: 1px solid var(--docs-border, rgb(0 0 0 / 0.16));
  border-radius: 999px;
}

.docs-nav-lang {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgb(120 120 120 / 0.16);
  font-size: 0.72em;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.docs-stale {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid rgb(180 83 9 / 0.35);
  border-radius: 10px;
  background: rgb(180 83 9 / 0.08);
  font-size: 0.95em;
}
