/* Documentation layout: three columns (nav, content, help), collapsing on small screens. */

.badge-docs {
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 500 12px "Geist Mono", monospace;
  color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.nav a[aria-current="page"] {
  color: var(--fg);
  background: var(--tile-2);
}

.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 180px;
  gap: 48px;
  padding: 24px 0 64px;
}

.docs-nav,
.docs-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.docs-nav nav,
.docs-toc {
  display: grid;
  gap: 2px;
}

.docs-group {
  margin: 18px 0 6px;
  font: 600 12px "Geist", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.docs-nav nav a,
.docs-toc a {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--fg-2);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.docs-nav nav a:hover,
.docs-toc a:hover {
  color: var(--fg);
  background: var(--tile);
}

.docs-nav nav a.active {
  color: var(--fg);
  background: var(--tile);
  border-left-color: var(--fg);
  border-radius: 0 6px 6px 0;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-3);
}

.docs-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: 14px "Geist", sans-serif;
}

.docs-body {
  min-width: 0;
  max-width: 760px;
}

.doc {
  padding: 8px 0 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  scroll-margin-top: 24px;
}

.doc:last-child {
  border-bottom: 0;
}

.doc h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.08;
}

.doc h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.doc h3 {
  font-size: 17px;
  margin: 24px 0 8px;
  letter-spacing: -0.01em;
}

.doc p,
.doc li,
.doc dd {
  color: var(--fg-2);
  font-size: 15.5px;
  line-height: 1.7;
}

.doc p {
  margin: 10px 0;
}

.doc ul,
.doc ol {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.doc li strong,
.doc p strong,
.doc em {
  color: var(--fg);
}

.doc em {
  font-style: normal;
  font-weight: 500;
}

.doc a {
  color: var(--fg);
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--fg), transparent 60%);
}

.doc a:hover {
  text-decoration-color: var(--fg);
}

.doc-lede {
  font-size: 18px !important;
  margin-top: 14px !important;
}

kbd {
  font: 12px "Geist Mono", monospace;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--tile-2);
  box-shadow: inset 0 -1px 0 var(--line-strong);
  color: var(--fg);
}

.callout {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-2);
  font-size: 15px;
}

.callout strong {
  color: var(--fg);
}

.doc-table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 14.5px;
}

.doc-table th {
  text-align: left;
  font-weight: 600;
  color: var(--fg);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
}

.doc-table td {
  padding: 10px 12px;
  color: var(--fg-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.doc-table td:first-child {
  color: var(--fg);
  white-space: nowrap;
}

.cmd-table td:first-child code {
  background: transparent;
  padding: 0;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.dot.ok {
  background: var(--ok);
}
.dot.warn {
  background: var(--warn);
}
.dot.crit {
  background: var(--crit);
}

.defs {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 20px;
  margin: 14px 0;
}

.defs dt {
  font-weight: 600;
  color: var(--fg);
  font-size: 15px;
}

.defs dd {
  margin: 0;
}

.code-block {
  margin: 14px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0c0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font: 12px "Geist", sans-serif;
  color: rgba(244, 241, 236, 0.55);
}

.code-head button {
  padding: 4px 10px;
  border-radius: 5px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f1ec;
  font: 500 12px "Geist", sans-serif;
  cursor: pointer;
}

.code-head button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  color: #e9e5de;
}

.trouble {
  border-radius: 10px;
  margin: 10px 0;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
}

.trouble summary {
  padding: 12px 16px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
}

.trouble p {
  padding: 0 16px 12px;
  margin: 0;
}

.docs-empty {
  padding: 40px 0;
  color: var(--fg-2);
}

@media (max-width: 1100px) {
  .docs {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .docs-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs {
    grid-template-columns: 1fr;
  }
  .docs-nav {
    position: static;
    max-height: none;
  }
  .docs-nav nav {
    display: none;
  }
  .defs {
    grid-template-columns: 1fr;
  }
}

.changelog {
  margin: 24px auto 64px;
}
