/*
 * The docs site's stylesheet (logu.dev/docs, built by scripts/docs-site.ts). Look and voice from
 * DESIGN.md: the role colors come from src/styles/app.css (the generator copies the light and
 * night blocks in place of the marker below), Geist to read and Geist Mono for data, hairlines
 * instead of shadows, one signal color. No inline styles anywhere (the docs CSP is style-src 'self').
 */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/geist-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/geist-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/geist-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/geist-mono-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/geist-mono-latin-500-normal.woff2) format("woff2");
}
/* The app's metric-matched fallbacks (src/styles/app.css): the swap moves nothing */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica");
  size-adjust: 103.49%;
  ascent-override: 97.11%;
  descent-override: 28.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono Fallback";
  src: local("Courier New"), local("Menlo");
  size-adjust: 99.98%;
  ascent-override: 100.52%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}

/* DESIGN.md §3.1, copied from src/styles/app.css by the generator */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --ink: #121110;
  --ink-2: #3f3b36;
  --ink-3: #645d55;
  --ink-4: #a39c93;
  --line: #e2dfd9;
  --line-2: #eeece8;
  --signal: #c2410c;
  --on-signal: #ffffff;
  --signal-ink: #b23a00;
  --info: #0b6bb8;
  --danger: #b91c1c;
  --focus: #121110;
  --signal-tint: #fbe4d5;
  --info-tint: #e3eef9;
  --muted-tint: #eeece8;
  color-scheme: light;
}
.dark {
  --bg: #07080a;
  --surface: #0c0e11;
  --surface-2: #0a0b0e;
  --ink: #edeef0;
  --ink-2: #b2b6bd;
  --ink-3: #8d939c;
  --ink-4: #4e535b;
  --line: #1f2329;
  --line-2: #16191d;
  --signal: #c2410c;
  --on-signal: #ffffff;
  --signal-ink: #fb923c;
  --info: #56b4e9;
  --danger: #f87171;
  --focus: #edeef0;
  --signal-tint: #2a1609;
  --info-tint: #0b1e2c;
  --muted-tint: #1a1d22;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
  --bg: #07080a;
  --surface: #0c0e11;
  --surface-2: #0a0b0e;
  --ink: #edeef0;
  --ink-2: #b2b6bd;
  --ink-3: #8d939c;
  --ink-4: #4e535b;
  --line: #1f2329;
  --line-2: #16191d;
  --signal: #c2410c;
  --on-signal: #ffffff;
  --signal-ink: #fb923c;
  --info: #56b4e9;
  --danger: #f87171;
  --focus: #edeef0;
  --signal-tint: #2a1609;
  --info-tint: #0b1e2c;
  --muted-tint: #1a1d22;
    color-scheme: dark;
  }
}

:root {
  --font-sans: "Geist", "Geist Fallback", system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace;
  --radius-card: 8px;
  --radius-control: 6px;
  --duration-fast: 120ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header: 56px;
}
.dark {
  --radius-card: 4px;
  --radius-control: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "tnum";
}
a {
  color: inherit;
  text-decoration-color: var(--ink-4);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
code,
pre,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.micro {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.skip:focus {
  top: 8px;
}

/* Header: the mark, search, theme, the app */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header);
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand svg {
  height: 14px;
  width: auto;
}
.brand .micro {
  color: var(--ink-3);
}
.top-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}
.search {
  position: relative;
}
.search input {
  width: min(320px, 44vw);
  height: 36px;
  padding: 0 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
@media (min-width: 720px) {
  .search input {
    font-size: 14px;
  }
}
.search input::placeholder {
  color: var(--ink-3);
}
.results {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  width: min(440px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.results[hidden] {
  display: none;
}
.results ul {
  list-style: none;
  margin: 0;
  padding: 4px;
}
.results a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  text-decoration: none;
}
.results a:hover,
.results a:focus-visible,
.results a[aria-selected="true"] {
  background: var(--line-2);
}
.results .r-title {
  display: block;
  font-weight: 500;
}
.results .r-path {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.results .r-text {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
}
.results p {
  margin: 0;
  padding: 12px;
  color: var(--ink-3);
}
.icon-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  text-decoration: none;
  cursor: pointer;
}
.icon-button svg {
  width: 16px;
  height: 16px;
}
.icon-button svg[hidden] {
  display: none;
}
.icon-button:hover,
.button:hover {
  background: var(--line-2);
}
@media (pointer: coarse) {
  .icon-button,
  .button,
  .search input {
    height: 44px;
    min-width: 44px;
  }
}
.dark .button {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 12px;
}
.app-link {
  display: none;
}
@media (min-width: 720px) {
  .app-link {
    display: inline-flex;
  }
}

/* Layout: sidebar · content · on this page */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
}
.side {
  display: none;
}
.menu {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.menu > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu > summary::before {
  content: "+";
  font-family: var(--font-mono);
  color: var(--ink-3);
}
.menu[open] > summary::before {
  content: "−";
}
.menu nav {
  padding: 0 16px 16px;
}
@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .menu {
    display: none;
  }
  .side {
    display: block;
    position: sticky;
    top: var(--header);
    align-self: start;
    height: calc(100vh - var(--header));
    overflow: auto;
    padding: 20px 16px 40px;
    border-inline-end: 1px solid var(--line);
  }
}
@media (min-width: 1280px) {
  .layout.has-toc {
    grid-template-columns: 248px minmax(0, 1fr) 220px;
  }
}
.nav-group + .nav-group {
  margin-top: 20px;
}
.nav-group > .micro {
  margin: 0 0 6px;
  padding: 0 10px;
}
.nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-group ul ul {
  margin: 2px 0 6px;
  padding-inline-start: 10px;
}
.nav-group a {
  position: relative;
  display: block;
  padding: 5px 10px;
  border-radius: var(--radius-control);
  color: var(--ink-2);
  font-size: 13.5px;
  text-decoration: none;
}
.nav-group a:hover {
  background: var(--line-2);
  color: var(--ink);
}
.nav-group a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  background: var(--surface-2);
}
/* The active item's 2px signal rule on its inner start edge (DESIGN.md §5) */
.nav-group a[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 0;
  width: 2px;
  background: var(--signal);
}
.nav-group .op {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.nav-group .op .method {
  flex: none;
  width: 3.4em;
}

main {
  min-width: 0;
  padding: 28px 16px 64px;
}
@media (min-width: 720px) {
  main {
    padding: 40px 40px 80px;
  }
}
.content {
  max-width: 760px;
}
.toc {
  display: none;
}
@media (min-width: 1280px) {
  .has-toc .toc {
    display: block;
    position: sticky;
    top: var(--header);
    align-self: start;
    max-height: calc(100vh - var(--header));
    overflow: auto;
    padding: 40px 16px 40px 0;
  }
}
.toc ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-inline-start: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 3px 0 3px 12px;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
}

/* Prose */
.content h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.content h2 {
  margin: 40px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.content h3 {
  margin: 28px 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.content h4 {
  margin: 20px 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.content :is(h2, h3, h4) .anchor {
  margin-inline-start: 6px;
  color: var(--ink-4);
  text-decoration: none;
  opacity: 0;
}
.content :is(h2, h3, h4):hover .anchor,
.content .anchor:focus-visible {
  opacity: 1;
}
.content p,
.content li {
  color: var(--ink-2);
}
.content strong {
  color: var(--ink);
  font-weight: 600;
}
.content ul,
.content ol {
  padding-inline-start: 1.4em;
}
.content li + li {
  margin-top: 4px;
}
.content :not(pre) > code {
  padding: 1px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.content blockquote {
  margin: 16px 0;
  padding: 2px 16px;
  border-inline-start: 2px solid var(--line);
}
.content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}
.lead {
  font-size: 17px;
  color: var(--ink-2);
}
.codeblock {
  position: relative;
  margin: 16px 0;
}
.content pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  line-height: 1.55;
  font-size: 13px;
}
.content pre code {
  font-size: inherit;
  color: var(--ink);
}
.copy {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  height: 28px;
  min-width: 0;
  padding: 0 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.codeblock:hover .copy,
.copy:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .copy {
    opacity: 1;
  }
}
.table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.content th,
.content td {
  padding: 8px 12px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line-2);
}
.content tr:last-child td {
  border-bottom: 0;
}
.content th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2);
}
.content td {
  color: var(--ink-2);
}

/* Home */
.content .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin: 16px 0 8px;
  padding: 0;
  list-style: none;
}
.cards li + li {
  margin: 0;
}
.cards a {
  display: block;
  height: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  text-decoration: none;
}
.cards a:hover {
  border-color: var(--ink-4);
}
.cards .c-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.cards .c-text {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-2);
}
.tagline {
  margin: 0 0 8px;
}

/* API reference */
.endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.endpoint code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.method {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: var(--muted-tint);
  border-radius: 3px;
}
.method.post,
.method.put,
.method.patch {
  color: var(--info);
  background: var(--info-tint);
}
.method.delete {
  color: var(--danger);
  background: var(--muted-tint);
}
.hint {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--info);
  border-radius: var(--radius-card);
}
.hint p {
  margin: 4px 0 0;
  color: var(--ink);
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
  gap: 12px;
  margin: 16px 0;
}
.facts div {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.facts dt {
  margin: 0;
}
.facts dd {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}
.field {
  white-space: nowrap;
}
.req {
  color: var(--ink);
}
.content details {
  margin: 12px 0;
}
.content summary {
  cursor: pointer;
  min-height: 32px;
  color: var(--ink-2);
}
.status {
  font-family: var(--font-mono);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .copy {
    transition: none;
  }
}
@media print {
  .top,
  .layout > .side,
  .menu,
  .layout > .toc,
  .codeblock > .copy {
    display: none;
  }
}
