/* Muster docs — same design language as the landing (dark, warm accent),
 * one stylesheet shared by every page under /docs/. No build step. */

:root {
  --page: #0a0a0a;
  --surface: #131314;
  --surface-soft: #101011;
  --surface-raised: #1a1a1c;
  --ink: #f6f6f7;
  --body: #cfcfd2;
  --muted: #98989e;
  --muted-2: #75757b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #f0460e;
  --accent-soft: #ff7a45;
  --accent-line: rgba(240, 70, 14, 0.34);
  --accent-wash: rgba(240, 70, 14, 0.09);
  --accent-wash-2: rgba(240, 70, 14, 0.16);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-card: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 15px/1.65 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* subtle warm wash, echoing the landing hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(240, 70, 14, 0.07), transparent 60%),
    radial-gradient(700px 380px at -10% 30%, rgba(240, 134, 36, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

/* ── top bar ─────────────────────────────────────────────────────────── */

.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand-lockup:hover { text-decoration: none; }
.brand-lockup img { display: block; }

.docs-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-soft);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 2px 10px;
}

.docs-header__spacer { flex: 1; }

.docs-header__links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.docs-header__links > a:not(.button) {
  color: var(--muted);
  font-size: 13.5px;
  padding: 6px 4px;
}
.docs-header__links > a:not(.button):hover { color: var(--ink); text-decoration: none; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: var(--surface-raised);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.button:hover { text-decoration: none; filter: brightness(1.15); }
.button--primary {
  background: linear-gradient(to bottom, var(--accent-soft), var(--accent));
  border-color: transparent;
  color: #fff;
}
.button--small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ── layout ──────────────────────────────────────────────────────────── */

.docs-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.docs-sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  font-size: 13.5px;
}

.docs-sidebar__group { margin-bottom: 22px; }

.docs-sidebar__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin: 0 0 8px;
}

.docs-sidebar__group a {
  display: block;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.45;
}
.docs-sidebar__group a:hover { color: var(--ink); background: var(--surface-raised); text-decoration: none; }
.docs-sidebar__group a[aria-current="page"] {
  color: var(--accent-soft);
  background: var(--accent-wash);
  font-weight: 600;
}

.docs-content { min-width: 0; max-width: 860px; overflow-wrap: anywhere; }
.docs-content [id] { scroll-margin-top: 90px; }

/* ── content typography ──────────────────────────────────────────────── */

.docs-content h1 {
  color: var(--ink);
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 8px 0 14px;
}

.docs-content .lead {
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0 0 30px;
}

.docs-content h2 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.018em;
  margin: 44px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.docs-content h2:first-of-type { border-top: none; padding-top: 0; }

.docs-content h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 620;
  margin: 28px 0 8px;
}

.docs-content p { margin: 0 0 14px; }
.docs-content strong { color: var(--ink); font-weight: 620; }

.docs-content ul, .docs-content ol { margin: 0 0 16px; padding-left: 22px; }
.docs-content li { margin-bottom: 6px; }
.docs-content li::marker { color: var(--muted-2); }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5px 6px;
  color: var(--ink);
  white-space: normal;
}

pre {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
  font-size: 13px;
  line-height: 1.6;
  color: var(--body);
}
pre code .c { color: var(--muted-2); } /* comment lines */

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 0;
}
th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
td code { white-space: nowrap; }

/* ── components ──────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 18px 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  text-decoration: none;
  border-color: var(--accent-line);
  transform: translateY(-2px);
}
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.card .card__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-soft);
  margin-bottom: 8px;
}

.callout {
  display: flex;
  gap: 12px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  padding: 13px 16px;
  margin: 0 0 18px;
  font-size: 13.5px;
}
.callout--note { background: var(--surface); border-color: var(--line); }
.callout__mark { color: var(--accent-soft); font-weight: 700; flex-shrink: 0; }
.callout > :last-child { min-width: 0; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.pill {
  font-size: 12.5px;
  color: var(--body);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

.section-cards { margin-top: 8px; }

/* ── footer ──────────────────────────────────────────────────────────── */

.docs-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 22px 28px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: var(--muted-2);
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.docs-footer nav { margin-left: auto; display: flex; gap: 16px; }
.docs-footer nav a { color: var(--muted); }
.docs-footer nav a:hover { color: var(--ink); text-decoration: none; }

/* ── responsive ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 24px; padding: 24px 18px 60px; }
  .docs-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    background: var(--surface-soft);
  }
  .docs-sidebar__group { margin: 0; min-width: 140px; }
  .docs-sidebar__group a { margin-left: 0; padding: 4px 6px; display: inline-block; }
  .docs-content h1 { font-size: 27px; }
  .docs-header { padding: 12px 18px; }
  .docs-header__links > a:not(.button) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .button { transition: none; }
  .card:hover { transform: none; }
}
