.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px;
  background: rgba(5, 7, 11, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--frame);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 500 15px/1 var(--sans); letter-spacing: -0.01em; }
.brand .muted { font-family: var(--mono); font-size: 13px; margin-left: 2px; }
.top-links { display: flex; align-items: center; gap: 18px; font: 13px/1 var(--mono); }

.embed .top { display: none; }
.embed .toc { top: 0; max-height: 100vh; }
.embed .content section { scroll-margin-top: 8px; }

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1160px; margin: 0 auto; gap: 48px;
  padding: 0 24px;
}
.toc {
  position: sticky; top: 56px; align-self: start;
  display: flex; flex-direction: column; gap: 2px;
  padding: 36px 0;
  max-height: calc(100vh - 56px); overflow-y: auto;
}
.toc a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 10px; border-radius: 3px;
  font: 13px/1.3 var(--mono); color: var(--label);
  border-left: 1px solid transparent;
}
.toc a span { color: var(--cross); font-size: 11.5px; }
.toc a:hover { color: var(--text); background: var(--surface); }
.toc a.active { color: var(--text); background: var(--surface); }
.toc a.active span { color: var(--signal); }

.content { padding: 36px 0 80px; min-width: 0; }
.content section { padding: 44px 0; border-bottom: 1px solid var(--frame); scroll-margin-top: 64px; }
.content section:last-of-type { border-bottom: 0; }
.content h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.035em; font-weight: 400; margin: 14px 0 16px; }
.content h3 { font-size: 18px; margin: 28px 0 10px; }
.content section > p, .content section > ul { max-width: 720px; }
.content section > .frame, .content section > pre, .content section > .tabs { margin: 20px 0; }
.sub { font: 12.5px/1 var(--mono); color: var(--label); margin: 26px 0 0 !important; }
.method {
  font: 500 13px/1 var(--mono); color: var(--night); background: var(--signal);
  padding: 5px 7px; border-radius: 3px; vertical-align: 5px; margin-right: 6px; letter-spacing: 0;
}
.method.get { background: var(--ok); }
.content strong { color: var(--text); font-weight: 500; }
.content em { color: var(--label); font-style: normal; font-family: var(--mono); font-size: 11px; margin-left: 4px; }

.hero { padding-top: 32px !important; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 300; margin: 18px 0 22px; }
.hero h1 .dim { color: var(--label); }
.lead { font-size: 17px; line-height: 1.65; color: var(--body); }
.baseurl { display: flex; align-items: center; gap: 16px; padding: 14px 16px; max-width: 560px; margin: 28px 0 !important; }
.baseurl code { flex: 1; background: none; border: 0; padding: 0; font-size: 14px; color: var(--text); }
.agent-note { max-width: 640px; margin: -12px 0 28px; color: var(--body); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--frame); border-radius: var(--radius); max-width: 720px; }
.facts > div { display: grid; gap: 6px; padding: 16px 18px; border-right: 1px solid var(--frame); }
.facts > div:last-child { border-right: 0; }
.facts strong { font: 400 20px/1.1 var(--sans); letter-spacing: -0.02em; color: var(--text); }
.facts span:last-child { font: 12.5px/1.3 var(--mono); color: var(--label); }

.points { padding-left: 0; list-style: none; }
.points li { position: relative; padding-left: 20px; margin: 10px 0; }
.points li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 7px; height: 1px; background: var(--cross); }

.tabs { border: 1px solid var(--frame); border-radius: var(--radius); overflow: hidden; }
.tabs pre.code { border: 0; border-radius: 0; }
.tab-bar { display: flex; gap: 2px; padding: 6px; background: var(--surface); border-bottom: 1px solid var(--frame); }
.tab-bar button {
  font: 12.5px/1 var(--mono); color: var(--label);
  background: none; border: 0; border-radius: 3px; padding: 7px 10px; cursor: pointer;
}
.tab-bar button:hover { color: var(--text); }
.tab-bar button[aria-selected="true"] { color: var(--text); background: var(--frame); }

table.params td:first-child { white-space: nowrap; }
table.errors td.num { color: var(--text); }
table.errors td:last-child { color: var(--label); font-size: 12.5px; white-space: nowrap; }

.foot { display: flex; justify-content: space-between; padding-top: 40px; font: 12.5px/1 var(--mono); }

@media (max-width: 860px) {
  .embed .top { display: none; }
.embed .toc { top: 0; max-height: 100vh; }
.embed .content section { scroll-margin-top: 8px; }

.layout { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .toc { display: none; }
  .top { padding: 0 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--frame); }
  .facts > div:last-child { border-bottom: 0; }
  table.errors td:last-child { white-space: normal; }
}

/* 15 / for AI agents */
.steps { max-width: 720px; padding-left: 20px; }
.steps li { margin: 8px 0; padding-left: 4px; }
.steps li::marker { color: var(--signal); font: 12.5px var(--mono); }
.mdfile { margin: 24px 0 0; overflow: hidden; }
.mdfile-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; background: var(--surface); border-bottom: 1px solid var(--frame);
}
.mdfile-name { display: flex; align-items: center; gap: 8px; font: 13px/1 var(--mono); color: var(--text); }
.mdfile-name .muted { color: var(--label); }
.mdfile-actions { display: flex; gap: 8px; }
.mdfile-actions a.btn { text-decoration: none; }
.mdfile-body {
  position: relative; max-height: 420px; overflow: hidden;
  padding: 8px 28px 24px; background: var(--night);
}
.mdfile-body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  background: linear-gradient(to bottom, rgba(5, 7, 11, 0), var(--night));
  pointer-events: none;
}
.mdfile.open .mdfile-body { max-height: none; }
.mdfile.open .mdfile-body::after { display: none; }
.mdfile-toggle {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px; background: var(--surface); border: 0; border-top: 1px solid var(--frame);
  font: 12.5px/1 var(--mono); color: var(--signal); cursor: pointer;
}
.mdfile-toggle:hover { background: var(--surface-hi); }
.mdfile-toggle .chev { width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.mdfile.open .mdfile-toggle .chev { transform: translateY(2px) rotate(-135deg); }

.mdfile-body { color: var(--body); font-size: 14.5px; line-height: 1.7; }
.mdfile-body h2 { font-size: 26px; font-weight: 400; letter-spacing: -0.03em; color: var(--text); margin: 24px 0 12px; }
.mdfile-body h3 { font-size: 19px; font-weight: 500; color: var(--text); margin: 36px 0 10px; padding-top: 24px; border-top: 1px solid var(--frame); }
.mdfile-body h4 { font-size: 15px; font-weight: 500; color: var(--text); margin: 24px 0 8px; }
.mdfile-body p, .mdfile-body ul, .mdfile-body ol { max-width: 760px; margin: 10px 0; }
.mdfile-body ul, .mdfile-body ol { padding-left: 22px; }
.mdfile-body li { margin: 5px 0; }
.mdfile-body li::marker { color: var(--cross); }
.mdfile-body li.task { list-style: none; position: relative; margin-left: -22px; padding-left: 26px; }
.mdfile-body li.task .box { position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border: 1px solid var(--frame-hi); border-radius: 3px; }
.mdfile-body pre.code, .mdfile-body .frame { margin: 14px 0; }
.mdfile-body pre.code[data-lang]::before { content: attr(data-lang); display: block; font-size: 11px; color: var(--cross); margin-bottom: 6px; }
.mdfile-body table.grid th { text-align: left; }
.mdfile-body a { color: var(--signal); }
@media (max-width: 860px) {
  .mdfile-body { padding: 4px 16px 20px; }
}
.plain { max-width: 760px; padding-left: 20px; display: grid; gap: 8px; }
.plain li::marker { color: var(--signal); }
