/* Rendered-Markdown styling for the consumer API reference (DOCS.md).
 *
 * Shared by the developer portal's API Docs panel and the public docs site, so
 * DOCS.md looks the same wherever it is read — it is one source document and
 * should not acquire a different personality per surface.
 *
 * Every custom property carries a fallback, because this stylesheet has to work
 * both inside the portal (which defines the palette on :root) and on a
 * standalone page that defines nothing.
 */

.markdown{ font-size:15px; line-height:1.72; color:var(--ink,#2b2440); }
.markdown > *:first-child{ margin-top:0; }
.markdown h1{ font-size:27px; font-weight:900; letter-spacing:-0.025em; margin:4px 0 6px; color:var(--ink,#1a1330); }
.markdown h2{ font-size:20px; font-weight:800; letter-spacing:-0.02em; margin:38px 0 12px; padding-bottom:9px; border-bottom:2px solid var(--line,#eae7f2); color:var(--ink,#1a1330); }
.markdown h3{ font-size:16.5px; font-weight:800; margin:28px 0 8px; color:var(--ink,#1a1330); }
/* The per-endpoint subheads (Parameters / Response / Example) — small, spaced
   and muted, so they read as labels rather than competing with the h3 above. */
.markdown h4{ font-size:11.5px; font-weight:800; text-transform:uppercase; letter-spacing:.09em; color:var(--muted2,#a09bb3); margin:20px 0 7px; }
.markdown h5,.markdown h6{ font-size:13.5px; font-weight:800; margin:16px 0 6px; }
/* In-document anchor jumps (docJump in docs.js, and the public doc's native
   TOC hrefs) land the heading flush with the scrollport top, which is exactly
   where the sticky topbar/header sits on every page this stylesheet is used
   from — the heading scrolls in already hidden underneath it. scroll-margin-top
   clears that on both the JS scrollIntoView path and native #fragment
   navigation, without either caller needing to know the header's height. */
.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{ scroll-margin-top:96px; }
.markdown p{ margin:12px 0; }
.markdown ul,.markdown ol{ margin:12px 0 12px 20px; } .markdown li{ margin:6px 0; padding-left:3px; }
.markdown li::marker{ color:var(--brand,#6d28d9); }
.markdown strong{ font-weight:700; color:var(--ink,#1a1330); }
.markdown code{ font-family:ui-monospace,'SF Mono',Menlo,monospace; font-size:12.5px; background:#f3effb; color:#5b21b6; padding:2px 6px; border-radius:6px; border:1px solid #ece5f9; overflow-wrap:anywhere; }
.markdown pre{ background:#1a1330; padding:16px 18px; border-radius:14px; overflow-x:auto; margin:14px 0; box-shadow:0 6px 18px rgba(26,19,48,.14); }
.markdown pre code{ background:none; border:none; padding:0; color:#e6def7; font-size:12.5px; line-height:1.65; }
.markdown a{ color:var(--brand,#6d28d9); font-weight:600; border-bottom:1px solid rgba(109,40,217,.28); }
.markdown a:hover{ border-bottom-color:var(--brand,#6d28d9); }
/* Blockquotes in DOCS.md are all "> **Tip:** …" asides — render them as callout
   cards rather than the usual quotation rule. */
.markdown blockquote{ background:#faf8ff; border:1px solid #ece5f9; border-left:3px solid var(--brand,#6d28d9); border-radius:0 12px 12px 0; padding:13px 16px; color:#4b4360; margin:16px 0; font-size:14px; }
.markdown blockquote strong{ color:var(--brand,#6d28d9); }
.markdown table{ border-collapse:separate; border-spacing:0; margin:16px 0; display:block; overflow-x:auto; border:1px solid var(--line,#eae7f2); border-radius:12px; font-size:13px; }
.markdown th,.markdown td{ padding:9px 14px; text-align:left; border-bottom:1px solid var(--line,#eae7f2); }
.markdown tbody tr:last-child td{ border-bottom:none; }
.markdown tbody tr:nth-child(even){ background:#fbfaff; }
.markdown th{ background:#f6f2fd; font-weight:800; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted,#6b6480); border-bottom:1px solid var(--line,#eae7f2); white-space:nowrap; }
.markdown td code{ white-space:nowrap; }
.markdown hr{ border:none; border-top:1px solid var(--line,#eae7f2); margin:30px 0; }
/* GLOSSARY.md's "**Term** — definition" paragraphs (docs.js tags them
   .gterm and gives each one a slugified id) need the same scroll-margin as
   headings above, or landing on one via /glossary#autograph scrolls it
   halfway under the sticky top bar instead of flush below it. They also get
   a brief highlight when they're the jump target — via :target for a real
   navigation (typing the URL, following a link from outside the page), and
   via .gt-hit for a same-page jump through showDoc's pushState (which,
   unlike a real navigation, does NOT make the browser re-evaluate :target —
   docs_public.html's showDoc toggles this class by hand to cover that case). */
.markdown p.gterm{ scroll-margin-top:96px; }
.markdown p.gterm:target, .markdown p.gterm.gt-hit{ background:#faf5ff; border-left:3px solid var(--brand,#6d28d9); border-radius:0 10px 10px 0; padding:10px 14px; margin:12px -14px; }
/* Inline glossary references injected into DOCS.md's rendered body
   (docs_public.html's linkGlossaryTerms) — styled distinctly from a normal
   link (dotted, ink-colored) since it's an in-page gloss, not a navigation
   link, until hovered/focused. */
.markdown a.gloss-term{ position:relative; color:var(--ink,#1a1330); font-weight:600; border-bottom:1px dotted var(--muted,#6b6480); cursor:help; }
.markdown a.gloss-term:hover, .markdown a.gloss-term:focus-visible{ color:var(--brand,#6d28d9); border-bottom-color:var(--brand,#6d28d9); }
.markdown a.gloss-term::after{ content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 9px); transform:translateX(-50%) translateY(4px); width:280px; max-width:80vw; background:#1a1330; color:#f3effb; font-size:12.5px; font-weight:500; line-height:1.55; padding:10px 12px; border-radius:10px; box-shadow:0 10px 24px rgba(26,19,48,.28); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .12s ease, transform .12s ease; z-index:40; }
.markdown a.gloss-term::before{ content:''; position:absolute; left:50%; bottom:calc(100% + 3px); transform:translateX(-50%); border:6px solid transparent; border-top-color:#1a1330; opacity:0; visibility:hidden; transition:opacity .12s ease; }
.markdown a.gloss-term:hover::after, .markdown a.gloss-term:focus-visible::after,
.markdown a.gloss-term:hover::before, .markdown a.gloss-term:focus-visible::before{ opacity:1; visibility:visible; transform:translateX(-50%) translateY(0); }
@media (max-width:720px){ .markdown{ font-size:14.5px; } }
