/* Revere's docs (docs.revere.sh), on top of revere.css: the same sand paper, ink and one type
   size, with a quiet list of pages on the left, prose, code in sand wells, previous / next. */

.docs .top, .docs .legal { animation: none; }

/* ---- header: the lantern, "Revere docs", two small links ---- */
.docs-brand { display: flex; align-items: flex-start; gap: 14px; }
.docs-brand__name { font-size: 13px; line-height: 1.02; letter-spacing: -0.01em; padding-top: 4px; font-weight: 600; white-space: nowrap; }
.docs-brand__name:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- the page: the list of pages, then the prose ---- */
.docs-wrap {
  flex: 1; width: 100%; max-width: 1160px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px;
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(56px, 8vw, 96px);
}
.docs-nav ul { display: flex; flex-direction: column; gap: 1px; font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; }
.docs-nav a { display: block; padding: 5px 8px; margin-left: -8px; border-radius: 4px; color: var(--ink-2); transition: background-color .15s, color .15s; }
.docs-nav a:hover { color: var(--ink); background: var(--sand-2); }
.docs-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
/* wide: prose stays at a reading measure; code and tables may use the column's full width */
@media (min-width: 900px) {
  .docs-wrap { grid-template-columns: 12rem minmax(0, 54rem); column-gap: clamp(48px, 6vw, 104px); }
  .docs-nav { position: sticky; top: 32px; align-self: start; padding-top: 2px; }
  .docs-title, .prose > p, .prose > ul, .prose > h2 { max-width: 41rem; }
}
@media (max-width: 899px) {
  .docs-nav { padding-bottom: 14px; border-bottom: 1px solid var(--sand-3); }
  .docs-nav ul { flex-direction: row; flex-wrap: wrap; gap: 2px 6px; margin-left: -8px; }
  .docs-nav a { margin-left: 0; padding: 4px 8px; }
  .prose pre { font-size: 13px; padding: 14px 16px; }
}
.docs-main { min-width: 0; }

/* ---- prose: Revere's size, a little more air between lines for reading ---- */
.docs-title { font-weight: 600; margin-bottom: calc(var(--text) * 1.1); text-wrap: balance; }
.prose { display: flex; flex-direction: column; gap: calc(var(--text) * .85); line-height: 1.34; }
.prose h2 { font-size: inherit; font-weight: 600; line-height: var(--lead); margin-top: calc(var(--text) * 1.1); scroll-margin-top: 24px; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul { display: flex; flex-direction: column; gap: .45em; padding-left: 1.1em; list-style: disc; }
.prose li::marker { color: var(--ink-2); }
.prose em { font-style: italic; }

/* inline code: a small sand well; blocks: a bigger one */
.prose code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8em; letter-spacing: 0;
  background: var(--sand-2); border-radius: 4px; padding: .08em .3em; overflow-wrap: anywhere;
}
.prose a code { background: color-mix(in srgb, var(--sand-2) 70%, var(--sand)); }
.prose pre {
  background: var(--sand-2); border-radius: 6px; padding: 16px 18px; overflow-x: auto;
  font-size: 14px; line-height: 1.6; letter-spacing: 0; tab-size: 2;
}
.prose pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.prose pre .p, .prose pre .c { color: var(--ink-2); }
.prose pre .p { user-select: none; -webkit-user-select: none; }
.prose li pre { margin-top: 10px; }

/* tables: hairlines, smaller type */
.tbl-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.35; letter-spacing: -0.01em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--sand-3); }
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose thead th { font-weight: 600; border-bottom-color: color-mix(in srgb, var(--ink) 30%, transparent); }

/* ---- previous / next ---- */
.pn { display: flex; justify-content: space-between; gap: 24px; margin-top: calc(var(--text) * 2.4); padding-top: 18px; border-top: 1px solid var(--sand-3); }
/* the same soft well on hover as revere.sh's calls to action */
.pn a { display: flex; flex-direction: column; gap: 4px; font-weight: 600; min-width: 0; padding: 8px 10px; margin: -8px -10px; border-radius: 6px; transition: background-color .15s; }
.pn a span { font-size: 13px; font-weight: 400; color: var(--ink-2); }
.pn a:hover { background: var(--sand-2); }
.pn__next { text-align: right; margin-left: auto; }

/* ---- footer ---- */
.docs-foot { padding: 20px var(--gutter); }
