/* beeloop.ai/docs (docs.ts): the site's look on a manual's layout. The list of pages on the left, the page, its parts
   on the right. */
@font-face {
  font-family: "Geist";
  src: url("/static/site/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --raise: #121213;
  --well: #0e0e0f;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --ink: #ffffff;
  --body: #d2d2cd;
  --mute: #9a9a95;
  --honey: #f6d77a;
  --honey-light: #fbe6a3;
  --on-honey: #17120a;
  --bar: 64px;
  --gutter: clamp(16px, 3vw, 40px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--bar) + 20px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16px/1.65 "Geist", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--honey);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--honey-light);
  text-decoration: underline;
}

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

.hide {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--honey);
  color: var(--on-honey);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

/* --- the bar --- */

.docs-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--bar);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 11, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--honey-light);
  text-decoration: none;
}

.docs-home {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--honey);
  font-size: 0.82rem;
  font-weight: 560;
}

.docs-home:hover {
  border-color: var(--honey);
  text-decoration: none;
}

.docs-bar .links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.docs-bar .links a {
  padding: 7px 12px;
  color: var(--mute);
  font-size: 0.9rem;
  white-space: nowrap;
}

.docs-bar .links a:hover {
  color: var(--honey);
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--honey);
  color: var(--on-honey);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.button:hover {
  background: var(--honey-light);
  color: var(--on-honey);
  text-decoration: none;
}

/* --- the three columns --- */

.docs {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 230px;
  max-width: 1520px;
  margin: 0 auto;
}

.docs-side,
.docs-on {
  position: sticky;
  top: var(--bar);
  align-self: start;
  max-height: calc(100vh - var(--bar));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.docs-side {
  padding: 22px 18px 40px var(--gutter);
  border-right: 1px solid var(--line);
  min-height: calc(100vh - var(--bar));
}

.docs-menu > summary {
  display: none;
}

.docs-search {
  position: relative;
  margin-bottom: 18px;
}

.docs-search input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raise);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

.docs-search input::placeholder {
  color: var(--mute);
}

.docs-search input:focus {
  border-color: var(--honey);
  outline: none;
}

.docs-search kbd {
  position: absolute;
  top: 9px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--mute);
  font: inherit;
  font-size: 0.78rem;
  pointer-events: none;
}

.docs-part > p {
  margin: 20px 0 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-part:first-child > p {
  margin-top: 0;
}

.docs-contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-contents a {
  display: block;
  padding: 5px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--body);
  font-size: 0.93rem;
  line-height: 1.4;
}

.docs-contents a:hover {
  background: var(--raise);
  color: var(--ink);
  text-decoration: none;
}

.docs-contents a[aria-current="page"] {
  border-left-color: var(--honey);
  background: var(--raise);
  color: var(--honey);
  font-weight: 560;
}

.docs-contents ul ul {
  margin: 2px 0 6px 14px;
  border-left: 1px solid var(--line);
}

.docs-contents ul ul a {
  padding: 3px 12px;
  color: var(--mute);
  font-size: 0.86rem;
}

/* What a search found, in place of the list of pages. */
.docs-found p {
  margin: 0 0 8px;
  color: var(--mute);
  font-size: 0.85rem;
}

.docs-found a {
  display: block;
  margin-bottom: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--body);
  font-size: 0.86rem;
  line-height: 1.45;
}

.docs-found a:hover,
.docs-found a:focus-visible {
  border-color: var(--honey);
  text-decoration: none;
}

.docs-found a b {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 560;
}

.docs-found a small {
  display: block;
  color: var(--honey);
  font-size: 0.76rem;
}

.docs-found mark {
  background: none;
  color: var(--honey);
  font-weight: 560;
}

/* --- the page --- */

.docs-page {
  min-width: 0;
  padding: 30px clamp(18px, 4vw, 64px) 40px;
}

.docs-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--mute);
  font-size: 0.86rem;
}

.prose {
  max-width: 780px;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

.prose h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.035em;
}

.prose h2 {
  margin: 52px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 1.55rem;
}

.prose h3 {
  margin: 34px 0 10px;
  font-size: 1.18rem;
}

.prose h4 {
  margin: 26px 0 8px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.prose .anchor {
  margin-left: 10px;
  color: var(--mute);
  font-weight: 400;
  opacity: 0;
}

.prose :is(h2, h3, h4):hover .anchor,
.prose .anchor:focus-visible {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

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

.prose li {
  margin-bottom: 6px;
}

.prose li > ul,
.prose li > ol {
  margin: 6px 0 4px;
}

.prose li::marker {
  color: var(--honey);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(246, 215, 122, 0.4);
}

.prose code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--raise);
  color: var(--ink);
  font: 0.86em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.prose pre {
  margin: 0 0 18px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--well);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.86rem;
  line-height: 1.6;
}

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

.prose figure {
  margin: 24px 0 26px;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--well);
}

.prose .zoom {
  display: block;
  cursor: zoom-in;
}

.prose figcaption {
  margin-top: 9px;
  color: var(--mute);
  font-size: 0.86rem;
}

.prose blockquote {
  margin: 0 0 18px;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--line-strong);
  color: var(--ink);
}

/* Notes, as a manual sets them apart: a kind, then what to know. */
.note {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--honey);
  border-radius: 0 12px 12px 0;
  background: var(--raise);
}

.note p {
  margin: 0;
}

.note .note-kind {
  margin-bottom: 4px;
  color: var(--honey);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note.tip {
  border-left-color: #5fc98d;
}

.note.tip .note-kind {
  color: #5fc98d;
}

.note.warning {
  border-left-color: #ef8b56;
}

.note.warning .note-kind {
  color: #ef8b56;
}

.table {
  margin: 0 0 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

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

.prose th {
  background: var(--raise);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

/* The pages before and after. */
.docs-turn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 780px;
  margin-top: 56px;
}

.docs-turn a {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}

.docs-turn a:hover {
  border-color: var(--honey);
  text-decoration: none;
}

.docs-turn a span {
  color: var(--mute);
  font-size: 0.8rem;
}

.docs-turn a b {
  font-weight: 560;
}

.docs-turn .after {
  text-align: right;
}

.docs-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 780px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.86rem;
}

.docs-foot span {
  margin-right: auto;
}

.docs-foot a {
  color: var(--mute);
}

/* --- on this page --- */

.docs-on {
  padding: 34px var(--gutter) 40px 8px;
}

.docs-on p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-on ul {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  list-style: none;
}

.docs-on a {
  display: block;
  margin-left: -1px;
  padding: 4px 0 4px 14px;
  border-left: 1px solid transparent;
  color: var(--mute);
  font-size: 0.86rem;
  line-height: 1.4;
}

.docs-on .l3 a {
  padding-left: 26px;
}

.docs-on a:hover {
  color: var(--ink);
  text-decoration: none;
}

.docs-on a.here {
  border-left-color: var(--honey);
  color: var(--honey);
}

/* --- narrower screens --- */

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

  .docs-on {
    display: none;
  }
}

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

  .docs-bar .links {
    display: none;
  }

  .docs-bar .button {
    margin-left: auto;
  }

  .docs-side {
    position: static;
    min-height: 0;
    max-height: none;
    padding: 12px var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-menu > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    color: var(--ink);
    font-weight: 560;
    cursor: pointer;
    list-style: none;
  }

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

  .docs-menu > summary::after {
    content: "+";
    color: var(--honey);
    font-size: 1.3rem;
    font-weight: 400;
  }

  .docs-menu[open] > summary::after {
    content: "−";
  }

  .docs-menu[open] > summary {
    margin-bottom: 10px;
  }

  .docs-search kbd {
    display: none;
  }

  .docs-contents a {
    padding-block: 9px;
  }

  .docs-turn {
    grid-template-columns: 1fr;
  }

  .docs-turn > span {
    display: none;
  }

  .docs-turn .after {
    text-align: left;
  }
}
