/* Pigeonpost developer docs — one stylesheet, no dependencies, no fonts to fetch.
   Shares the tokens of the main site so the two read as one product. */

:root {
  --navy: #16326b;
  --blue: #2563eb;
  --ink: #14181f;
  --body: #444c58;
  --muted: #6b7480;
  --rule: #e6e9ee;
  --wash: #f7f9fb;
  --bar: rgba(255, 255, 255, .86);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 16.5px/1.68 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top bar ---- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.bar-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { color: var(--ink); font-weight: 640; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--muted); font-weight: 500; }

nav.top { display: flex; gap: 22px; font-size: 14.5px; margin-left: auto; }
nav.top a { color: var(--body); }
nav.top a.on { color: var(--navy); font-weight: 600; }

.gh { display: flex; color: var(--muted); }
.gh svg { width: 19px; height: 19px; fill: currentColor; }
.gh:hover { color: var(--ink); }

/* ---- layout ---- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 50px;
  align-items: start;
}

.side {
  position: sticky;
  top: 58px;
  padding: 34px 0 60px;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
}
.sb-h {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 640;
  margin: 22px 0 9px;
}
.sb-h:first-child { margin-top: 0; }
ul.sb { list-style: none; margin: 0 0 4px; padding: 0; }
ul.sb li { margin: 0; }
ul.sb a {
  display: block;
  padding: 5px 11px;
  margin-left: -11px;
  border-radius: 6px;
  font-size: 14.5px;
  color: var(--body);
}
ul.sb a:hover { background: var(--wash); text-decoration: none; }
ul.sb a.on { color: var(--navy); font-weight: 600; background: var(--wash); }

.doc { padding: 36px 0 80px; min-width: 0; max-width: 74ch; }

/* ---- prose ---- */

h1 { font-size: 32px; color: var(--ink); font-weight: 660; letter-spacing: -.022em; margin: 0 0 22px; line-height: 1.2; }
h2 {
  font-size: 21px;
  color: var(--ink);
  font-weight: 640;
  letter-spacing: -.012em;
  margin: 46px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
h3 { font-size: 17px; color: var(--ink); font-weight: 620; margin: 30px 0 10px; }

.ah { color: var(--rule); margin-left: 9px; font-weight: 400; }
.ah:hover { color: var(--blue); text-decoration: none; }

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 7px; }
li > ul, li > ol { margin: 7px 0 0; }
strong { color: var(--ink); font-weight: 620; }

/* ---- code ---- */

code {
  font: 0.875em/1.5 var(--mono);
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--navy);
  word-break: break-word;
}
pre {
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 15px 17px;
  overflow-x: auto;
  margin: 0 0 20px;
}
pre code { background: none; border: 0; padding: 0; color: var(--ink); font-size: 13.6px; line-height: 1.62; word-break: normal; }

/* ---- tables ---- */

.tw { overflow-x: auto; margin: 0 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 640;
  border-bottom: 1px solid #d8dde5;
  white-space: nowrap;
}
td code { white-space: nowrap; }

/* ---- callout ---- */

.note {
  background: var(--wash);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--navy);
  border-radius: 0 8px 8px 0;
  padding: 14px 17px;
  margin: 0 0 22px;
  font-size: 15.5px;
}
.note > :last-child { margin-bottom: 0; }

/* ---- footer ---- */

.pagefoot {
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}
.pagefoot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.pagefoot a { color: var(--body); }
.pagefoot p { margin: 0; }

/* ---- responsive ---- */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; }
  .side {
    position: static;
    max-height: none;
    padding: 22px 0 4px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 8px;
  }
  ul.sb { display: flex; flex-wrap: wrap; gap: 2px 4px; }
  ul.sb a { margin-left: 0; }
  .sb-h { margin-top: 14px; }
  nav.top { display: none; }
  .doc { padding-top: 24px; }
}

@media (max-width: 520px) {
  h1 { font-size: 27px; }
  h2 { font-size: 19px; }
  .bar-in, .shell { padding: 0 18px; }
}
