/* Monoclan docs: the reading room of the Route world. A light page, a translucent bar on top,
   one violet for links, focus and the brand's mark; nothing framed, nothing striped. */

@font-face {
  font-family: "Onest";
  font-display: swap;
  font-weight: 400 900;
  src: url("./fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-display: swap;
  font-weight: 400 900;
  src: url("./fonts/onest-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-display: swap;
  font-weight: 400 900;
  src: url("./fonts/onest-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-display: swap;
  font-weight: 400 900;
  src: url("./fonts/onest-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
  --bar: rgb(255 255 255 / 0.82);
  --bar-ink: #1d1d1f;
  --bar-muted: #6e6e73;
  --paper: #ffffff;
  --sunk: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --accent: #5b3df5;
  --accent-ink: #4a2fe0;
  --tint: rgb(91 61 245 / 0.09);
  --code-bg: #f5f5f7;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bar: rgb(0 0 0 / 0.78);
    --bar-ink: #f5f5f7;
    --bar-muted: #98989d;
    --paper: #000000;
    --sunk: #1c1c1e;
    --ink: #f5f5f7;
    --muted: #98989d;
    --line: #2c2c2e;
    --accent: #9d8bff;
    --accent-ink: #b3a6ff;
    --tint: rgb(157 139 255 / 0.14);
    --code-bg: #1c1c1e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bar: rgb(0 0 0 / 0.78);
  --bar-ink: #f5f5f7;
  --bar-muted: #98989d;
  --paper: #000000;
  --sunk: #1c1c1e;
  --ink: #f5f5f7;
  --muted: #98989d;
  --line: #2c2c2e;
  --accent: #9d8bff;
  --accent-ink: #b3a6ff;
  --tint: rgb(157 139 255 / 0.14);
  --code-bg: #1c1c1e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    17px / 1.65 "Onest",
    ui-sans-serif,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--paper);
  padding: 8px 12px;
}

/* The bar along the top */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 24px;
  background: var(--bar);
  color: var(--bar-ink);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bar-ink);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.brand span:last-child {
  font-weight: 400;
  color: var(--bar-muted);
}
/* The mark: a violet tile with the route on it, two stops and the line between them. */
.mark {
  inline-size: 24px;
  block-size: 24px;
  border-radius: 7px;
  background: var(--accent);
  position: relative;
}
.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: #fff;
}
.mark::before {
  top: 5px;
  left: 5px;
  box-shadow: 4px 4px 0 -2px #fff, 7px 7px 0 -2px #fff;
}
.mark::after {
  right: 5px;
  bottom: 5px;
}
.top-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-links a,
.top-links button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--bar-ink);
  font: 500 15px / 1 inherit;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.top-links a:hover,
.top-links button:hover {
  background: var(--sunk);
}
.theme span {
  inline-size: 16px;
  block-size: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.menu {
  display: none !important;
}

/* Three columns: the index, the page, what is on it */
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 220px;
  gap: 48px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}
.side,
.toc {
  position: sticky;
  top: 60px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 28px 0 40px;
  font-size: 15px;
}
.nav-h {
  margin: 20px 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.nav-h:first-child {
  margin-top: 0;
}
.side ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side a,
.toc a {
  display: block;
  padding: 5px 10px;
  margin-inline-start: -10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.side a:hover,
.toc a:hover {
  background: var(--sunk);
}
.side a[aria-current="page"] {
  background: var(--tint);
  color: var(--accent-ink);
  font-weight: 600;
}
.toc a {
  color: var(--muted);
  font-size: 14px;
  padding-block: 4px;
}

/* The page itself */
.content {
  min-width: 0;
  padding: 36px 0 64px;
}
article {
  max-width: 72ch;
}
h1 {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.lede {
  margin: 0 0 32px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
}
h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 25px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h3 {
  margin: 32px 0 8px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 650;
}
h2,
h3 {
  position: relative;
}
.anchor {
  position: absolute;
  left: -1.1em;
  opacity: 0;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}
p,
ul,
ol {
  margin: 0 0 16px;
}
li {
  margin: 4px 0;
}
li > p {
  margin: 0;
}
strong {
  font-weight: 650;
}
blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--tint);
  border-radius: 14px;
}
blockquote p:last-child {
  margin: 0;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--code-bg);
}
pre {
  position: relative;
  margin: 20px 0;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--code-bg);
  font-size: 14.5px;
  line-height: 1.6;
}
pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font:
    500 12.5px / 1.4 "Onest",
    sans-serif;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
pre:hover .copy,
.copy:focus-visible {
  opacity: 1;
}
.table {
  margin: 20px 0;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
th,
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
td code {
  white-space: nowrap;
}

/* API reference */
.endpoint {
  margin: 28px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.ep {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ep code {
  font-size: 15px;
  background: none;
  padding: 0;
}
.method {
  display: inline-block;
  min-width: 56px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 700 12px / 1.6 var(--mono);
  text-align: center;
  color: #fff;
  background: #5b3df5;
}
.m-get {
  background: #0a6ed1;
}
.m-delete {
  background: #c4001a;
}
.m-patch,
.m-put {
  background: #9a5200;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 72ch;
  margin-top: 56px;
}
.pager a {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--sunk);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.pager a:hover {
  background: var(--tint);
}
.pager a span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.pager .next {
  text-align: right;
}
.foot {
  max-width: 72ch;
  margin-top: 40px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 820px) {
  .shell {
    display: block;
    padding: 0 16px;
  }
  .menu {
    display: inline-flex !important;
  }
  .top {
    padding: 0 12px 0 16px;
  }
  .top-links a[href="/api/"] {
    display: none;
  }
  .side {
    display: none;
    position: static;
    max-height: none;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-open .side {
    display: block;
  }
  h1 {
    font-size: 30px;
  }
  .lede {
    font-size: 18px;
  }
  body {
    font-size: 16.5px;
  }
  .pager {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
