/* docs.qrulla.com — the same monochrome as qrulla.com and the app, made for reading. */

@font-face {
  font-family: "Inter";
  src: url(/assets/inter.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f7f4;
  --fg: #151515;
  --muted: #6c6c67;
  --card: #ffffff;
  --border: #e3e3de;
  --soft: rgb(0 0 0 / 0.035);
  --accent: #111111;
  --note: #f0f0eb;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c;
    --fg: #ededeb;
    --muted: #9b9b96;
    --card: #141414;
    --border: rgb(255 255 255 / 0.1);
    --soft: rgb(255 255 255 / 0.04);
    --accent: #ffffff;
    --note: #171717;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: calc(var(--top) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15.5px/1.7 var(--font);
  font-feature-settings: "cv11", "ss01";
}
a {
  color: inherit;
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The bar on top: brand, search, language and the site. */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--top);
  padding: 0 clamp(16px, 3vw, 28px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand b {
  font-weight: 600;
  color: var(--muted);
}
.logo {
  width: 30px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}
.search {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}
.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.results {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.18);
  padding: 6px;
}
.results a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
}
.results a small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}
.results a:hover,
.results a.on {
  background: var(--soft);
}
.results p {
  margin: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}
.links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  white-space: nowrap;
}
.links a {
  text-decoration: none;
  color: var(--muted);
}
.links a:hover {
  color: var(--fg);
}
.icon {
  display: none;
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* The guide: the list of pages, the page and what's on it. */
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1360px;
  margin: 0 auto;
}
.side {
  position: sticky;
  top: var(--top);
  align-self: start;
  height: calc(100vh - var(--top));
  overflow: auto;
  padding: 26px 18px 40px clamp(16px, 3vw, 28px);
  border-right: 1px solid var(--border);
}
.group + .group {
  margin-top: 22px;
}
.group h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.group a {
  display: block;
  padding: 5px 10px;
  margin: 1px 0;
  border-radius: 7px;
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.4;
}
.group a:hover {
  background: var(--soft);
}
.group a[aria-current="page"] {
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
}
.main {
  min-width: 0;
}
.page {
  display: grid;
  grid-template-columns: minmax(0, 760px) 200px;
  gap: 48px;
  padding: 40px clamp(16px, 4vw, 56px) 80px;
}
.toc {
  position: sticky;
  top: calc(var(--top) + 32px);
  align-self: start;
  font-size: 13.5px;
}
.toc h4 {
  margin: 0 0 8px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
}
.toc a:hover,
.toc a.on {
  color: var(--fg);
  border-color: var(--fg);
}

.doc .eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 650;
}
.doc .lead {
  margin: 0 0 30px;
  font-size: 18px;
  color: var(--muted);
}
.doc h2 {
  margin: 44px 0 10px;
  font-size: 23px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  font-weight: 620;
}
.doc h3 {
  margin: 28px 0 6px;
  font-size: 17.5px;
  font-weight: 620;
}
.doc h2,
.doc h3 {
  position: relative;
}
.anchor {
  position: absolute;
  left: -0.9em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
}
.doc h2:hover .anchor,
.doc h3:hover .anchor {
  opacity: 1;
}
.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin: 4px 0;
}
.doc li > ul,
.doc li > ol {
  margin: 4px 0 6px;
}
.doc li::marker {
  color: var(--muted);
}
.doc a {
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}
.doc a:hover {
  text-decoration-color: currentColor;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: var(--soft);
  border: 1px solid var(--border);
}
pre {
  margin: 0 0 18px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.6;
}
pre code {
  padding: 0;
  border: 0;
  background: none;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.42em;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--card);
  font: 500 0.82em/1.5 var(--font);
  text-align: center;
}
.note {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--fg);
  border-radius: 0 10px 10px 0;
  background: var(--note);
}
.note p {
  margin: 0;
}
.table {
  margin: 0 0 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
th,
td {
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--soft);
  font-weight: 600;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 54px;
}
.pager a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 550;
}
.pager a:hover {
  border-color: var(--fg);
}
.pager small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12.5px;
}
.pager .next {
  text-align: right;
  grid-column: 2;
}
.help {
  margin-top: 26px !important;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .icon {
    display: block;
  }
  .side {
    position: fixed;
    inset: var(--top) auto 0 0;
    z-index: 15;
    width: min(300px, 86vw);
    height: auto;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  body.nav-open .side {
    transform: none;
    box-shadow: 0 0 60px rgb(0 0 0 / 0.25);
  }
  .brand span {
    display: none;
  }
  .links a:last-child {
    display: none;
  }
  .page {
    padding-top: 28px;
  }
}
