/* docs.lumiverb.io: lumiverb.io's colours and type, set for reading. Nothing from another host. */

:root {
  --bg: #030712;
  --bg-raised: #0b1120;
  --panel: #111827;
  --line: #1f2937;
  --line-soft: #172033;
  --text: #f3f4f6;
  --text-soft: #d1d5db;
  --muted: #9ca3af;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: #a5b4fc;
  --accent-wash: rgba(99, 102, 241, 0.16);
  --code-bg: #0a0f1c;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 24px;
  --top: 60px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-soft);
  text-decoration-color: rgba(165, 180, 252, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  height: var(--top);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

.brand-docs {
  color: var(--muted);
  font-weight: 500;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-size: 15px;
  font-weight: 600;
}

.top-links {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.top-links a {
  color: var(--muted);
  text-decoration: none;
}

.top-links a:hover {
  color: var(--text);
}

/* Layout: contents, the page, what's on it */

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 210px;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.side,
.toc {
  position: sticky;
  top: var(--top);
  align-self: start;
  max-height: calc(100vh - var(--top));
  overflow-y: auto;
  padding: 28px 0 40px;
}

.side ul,
.menu ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-section {
  margin: 22px 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-section:first-child {
  margin-top: 0;
}

.side a,
.menu a {
  display: block;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 7px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
  text-decoration: none;
}

.side a:hover,
.menu a:hover {
  background: var(--panel);
  color: var(--text);
}

.side a[aria-current="page"],
.menu a[aria-current="page"] {
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-weight: 600;
}

.toc p {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
}

/* On a phone or a narrow window: the contents fold into a menu at the top. */

.menu {
  display: none;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-raised);
}

.menu summary {
  padding: 12px var(--gutter);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary::before {
  content: "☰";
  margin-right: 10px;
  color: var(--muted);
}

.menu nav {
  padding: 4px var(--gutter) 20px;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    display: none;
  }

  .menu {
    display: block;
  }
}

/* The page */

.doc {
  padding: 36px 0 64px;
  max-width: 760px;
  min-width: 0;
}

.doc h1 {
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}

.doc h2 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.doc h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 32px 0 8px;
}

.anchor {
  margin-left: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
}

h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 16px;
  color: var(--text-soft);
}

.doc ul,
.doc ol {
  padding-left: 24px;
}

.doc li {
  margin: 4px 0;
}

.doc li > p {
  margin: 0 0 8px;
}

.doc strong {
  color: var(--text);
}

.doc blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--accent-strong);
  background: rgba(79, 70, 229, 0.08);
  border-radius: 0 10px 10px 0;
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: #e5e7eb;
}

.doc pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.doc pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.cmd {
  position: relative;
}

.cmd pre {
  padding-right: 76px;
}

.cmd code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font: 500 13px var(--sans);
  cursor: pointer;
}

.copy:hover {
  color: var(--text);
  border-color: #374151;
}

.table {
  overflow-x: auto;
  margin: 0 0 16px;
}

.doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.doc th {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: #374151;
}

.doc td {
  color: var(--text-soft);
}

/* Previous and next */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--accent);
}

.pager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

.source {
  margin-top: 28px;
  font-size: 14px;
}

.source a {
  color: var(--muted);
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  .top-links {
    gap: 14px;
    font-size: 14px;
  }

  .top-links a:first-child {
    display: none;
  }

  .doc {
    padding-top: 24px;
  }

  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager .next {
    grid-column: 1;
  }
}
