/* Kite docs — one stylesheet, no build step. */
:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --fg: #0b1220;
  --fg-muted: #5b6675;
  --border: #e2e8f0;
  --accent: #0f172a;
  --accent-fg: #ffffff;
  --code-bg: #f1f5f9;
  --good: #0c6b62;
  --warn: #8a5a0b;
  --danger: #b03d0b;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a111d;
    --surface: #111b2b;
    --fg: #e9eef7;
    --fg-muted: #8593a9;
    --border: #22304a;
    --accent: #e9eef7;
    --accent-fg: #0a111d;
    --code-bg: #172337;
    --good: #3ed0c0;
    --warn: #d8a441;
    --danger: #f5895a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

header.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.01em; }
.brand svg { width: 17px; height: 17px; }
.top nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; color: var(--fg-muted); }
.top nav a:hover { color: var(--fg); }

.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 48px; max-width: 1120px; margin: 0 auto; padding: 40px 24px 96px; }
aside { position: sticky; top: 84px; align-self: start; font-size: 14px; }
aside h4 { margin: 20px 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
aside h4:first-child { margin-top: 0; }
aside a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 6px; color: var(--fg-muted); text-decoration: none; }
aside a:hover { background: var(--surface); color: var(--fg); }

main { min-width: 0; }
main h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 12px; }
main h2 { font-size: 22px; letter-spacing: -0.015em; margin: 52px 0 12px; padding-top: 8px; }
main h3 { font-size: 16.5px; margin: 30px 0 8px; }
main p, main li { color: var(--fg-muted); }
main strong { color: var(--fg); font-weight: 600; }
.lead { font-size: 18px; color: var(--fg-muted); margin-bottom: 8px; }

pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 9px; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
p code, li code, td code { background: var(--code-bg); padding: .12em .38em; border-radius: 4px; font-size: .87em; color: var(--fg); }

table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 18px 0; display: block; overflow-x: auto; }
th { text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-muted); border-bottom: 1px solid var(--border); padding: 9px 12px; white-space: nowrap; }
td { border-bottom: 1px solid var(--border); padding: 9px 12px; color: var(--fg-muted); vertical-align: top; }
td:first-child { color: var(--fg); white-space: nowrap; }

.note { border-left: 3px solid var(--border); background: var(--surface); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 20px 0; font-size: 14.5px; }
.note.warn { border-left-color: var(--warn); }
.note.good { border-left-color: var(--good); }
.note p { margin: 0; }
.note p + p { margin-top: 8px; }
.note b { color: var(--fg); }

footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 24px; text-align: center; font-size: 13px; color: var(--fg-muted); }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; gap: 24px; }
  aside { position: static; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .top nav { display: none; }
}

/* --- multi-page additions --- */
.brand-sub { color: var(--fg-muted); font-weight: 500; }
aside a.here { background: var(--surface); color: var(--fg); font-weight: 550; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); }
.pager a { flex: 0 1 auto; display: block; padding: 12px 16px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-weight: 550; color: var(--fg); }
.pager a:hover { background: var(--surface); }
.pager a span { display: block; font-size: 11.5px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 2px; }
.pager .next { text-align: right; margin-left: auto; }

/* Two columns, not auto-fit. Auto-fit gave three across, which left a lone
   orphan card on the second row whenever there were four of them. */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.cards a { display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; transition: background .12s, border-color .12s; }
.cards a:hover { background: var(--surface); border-color: var(--fg-muted); }
.cards b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 5px; }
.cards b::after { content: " →"; color: var(--fg-muted); font-weight: 400; }
.cards span { display: block; font-size: 14px; line-height: 1.55; color: var(--fg-muted); }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }

.api { border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin: 20px 0; }
.api > h3 { margin: 0 0 4px; font-family: var(--mono); font-size: 15px; color: var(--fg); }
.api > p:first-of-type { margin-top: 0; }
.api pre { margin-bottom: 0; }

.pill { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--code-bg); color: var(--fg-muted); vertical-align: middle; margin-left: 6px; }

main ul { padding-left: 20px; }
main li + li { margin-top: 5px; }
main img { max-width: 100%; border: 1px solid var(--border); border-radius: 10px; }
figure { margin: 24px 0; }
figcaption { font-size: 13.5px; color: var(--fg-muted); margin-top: 8px; }

/* --- sidebar promo --- */
.promo {
  margin-top: 28px;
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  position: relative;
}
/* The accent stripe rounds with the card, so it does not need the card to
   clip — clipping there was cutting the note off instead. */
.promo::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; inset-block: 0;
  width: 3px;
  background: var(--fg);
  border-start-start-radius: 10px;
  border-end-start-radius: 10px;
}
.promo-eyebrow {
  display: block;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 7px;
}
.promo b { display: block; color: var(--fg); font-size: 14.5px; line-height: 1.35; margin-bottom: 6px; }
.promo p { font-size: 13px; line-height: 1.5; color: var(--fg-muted); margin: 0 0 12px; }
.promo-cta {
  display: block; text-align: center;
  padding: 8px 12px; border-radius: 7px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 13.5px; font-weight: 550; text-decoration: none;
}
.promo-cta:hover { opacity: .88; }
.promo-note { display: block; margin-top: 9px; font-size: 11.5px; color: var(--fg-muted); text-align: center; }

@media (max-width: 820px) {
  .promo { margin-top: 20px; }
}
