/* The API docs: every page under biz/docs (tools/docs-pages.js writes them). */
:root, .term { --space: #02040a; --deep: #050913; --hull: #0a1120; --line: rgba(160,190,255,.09); --line2: rgba(160,190,255,.16);
  --white: #f4f7fc; --mist: #a7b3c7; --fog: #6c7a92; --cyan: #4fd6ff; --cyan-rgb: 79,214,255; --green: #3ee6a4; --amber: #ffb547; --rose: #ff6b8b; --violet: #a98bff;
  --f: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --m: "JetBrains Mono", ui-monospace, Menlo, monospace; --ease: cubic-bezier(.2,.7,.2,1); color-scheme: dark; }
.term { color: var(--mist); }
:root[data-theme="light"] { --space: #f3f6fa; --deep: #eaf0f6; --hull: #ffffff; --line: rgba(11,26,48,.08); --line2: rgba(11,26,48,.14);
  --white: #0b1a30; --mist: #3a4860; --fog: #5b6880; --cyan: #0a7393; --cyan-rgb: 10,115,147; --green: #087a52; --amber: #9a5b00; --rose: #b42345; --violet: #5b45c4; color-scheme: light; }
* { box-sizing: border-box; }
html { background: var(--space); scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--space); color: var(--mist); font: 15.5px/1.7 var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--white); margin: 0; letter-spacing: -.025em; font-weight: 600; }
code { font: 13px/1.5 var(--m); color: #d8e3f5; background: rgba(255,255,255,.05); padding: 2px 6px; border-radius: 5px; }

/* top bar */
header.top { position: fixed; z-index: 40; inset: 0 0 auto; height: 64px; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: rgba(2,4,10,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
header.top img { height: 32px; display: block; }
.lg-l { display: none !important; } [data-theme="light"] .lg-d { display: none !important; } [data-theme="light"] .lg-l { display: block !important; }
.thm { all: unset; cursor: pointer; flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--mist); box-shadow: inset 0 0 0 1px var(--line2); transition: color .3s var(--ease), background .3s var(--ease); }
.thm:hover { color: var(--white); background: rgba(127,150,190,.08); } .thm:focus-visible { box-shadow: inset 0 0 0 1px var(--cyan), 0 0 0 3px rgba(var(--cyan-rgb),.25); }
.thm svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s, transform .45s cubic-bezier(.2,.7,.2,1); }
.thm .moon { opacity: 0; transform: rotate(-50deg) scale(.6); }
[data-theme="light"] .thm .sun { opacity: 0; transform: rotate(50deg) scale(.6); } [data-theme="light"] .thm .moon { opacity: 1; transform: none; }
header.top .tag { font: 500 11px/1 var(--m); letter-spacing: .14em; color: var(--cyan); padding: 6px 9px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb),.3); }
.search { position: relative; margin-left: 18px; flex: 0 1 380px; }
.search input { width: 100%; height: 38px; padding: 0 14px 0 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line2); color: var(--white); font: 14px var(--f); outline: none; transition: box-shadow .3s var(--ease); }
.search input:focus { box-shadow: inset 0 0 0 1px var(--cyan); }
.search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; stroke: var(--fog); fill: none; stroke-width: 2; }
.search kbd { position: absolute; right: 10px; top: 9px; font: 11px/1 var(--m); color: var(--fog); padding: 4px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line2); }
header.top .r { margin-left: auto; display: flex; gap: 10px; align-items: center; }
header.top .r .b, header.top .live, header.top .tag { white-space: nowrap; }
@media (max-width: 1100px) { header.top .live { display: none; } }
@media (max-width: 860px) { header.top .tag { display: none; } }
.search input { padding-right: 42px; text-overflow: ellipsis; }
@media (max-width: 1240px) { .search kbd { display: none; } .search input { padding-right: 14px; } }
.b { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; font: 600 14px/1 var(--f); color: var(--white); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line2); cursor: pointer; border: 0; transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.b:hover { text-decoration: none; background: rgba(255,255,255,.08); }
.b.p { color: #031018; background: linear-gradient(180deg, #8ae6ff, var(--cyan)); box-shadow: 0 8px 30px -10px rgba(var(--cyan-rgb),.7); }
.live { display: inline-flex; align-items: center; gap: 8px; font: 12px/1 var(--m); color: var(--mist); font-variant-numeric: tabular-nums; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* layout */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); padding-top: 64px; }
aside.nav { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 24px 14px 60px 22px; border-right: 1px solid var(--line); }
aside.nav h5 { margin: 22px 0 8px 10px; font: 600 11px/1 var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--fog); }
aside.nav h5:first-child { margin-top: 0; }
aside.nav .support { margin: 28px 0 0 10px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fog); }
aside.nav .support span { display: block; font: 600 11px/1 var(--m); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
aside.nav .support a { display: inline; padding: 0; background: none; box-shadow: none; color: var(--mist); font-size: 13px; }
aside.nav .support a.mail { color: var(--cyan); } aside.nav .support a:hover { color: var(--white); background: none; text-decoration: underline; }
aside.nav .support p { margin: 10px 0 0; display: flex; gap: 14px; }
.dfoot { border-top: 1px solid var(--line); padding: 28px 0 44px; font: 12.5px/1.6 var(--m); color: var(--fog); }
.dfoot .doc { display: flex !important; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.dfoot a { color: var(--mist); } .dfoot a:hover { color: var(--white); } .dfoot .lg { display: inline-flex; gap: 16px; }
aside.nav a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--mist); font-size: 14px; line-height: 1.35; transition: color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease); }
aside.nav a:hover { text-decoration: none; color: var(--white); background: rgba(255,255,255,.03); }
aside.nav a.on { color: var(--white); background: rgba(var(--cyan-rgb),.08); box-shadow: inset 2px 0 0 var(--cyan); }
.mth { flex: none; font: 600 9.5px/1 var(--m); letter-spacing: .04em; padding: 3px 5px; border-radius: 4px; color: #031018; background: var(--green); }
.mth.ws { background: var(--violet); } .mth.mcp { background: var(--amber); }
main { min-width: 0; }

/* pages */
.page { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; padding: 0 48px; max-width: 1400px; }
.doc.wide { grid-template-columns: minmax(0, 860px); }
.prose h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.04em; margin-bottom: 18px; }
.prose h2, .prose h1.ep { font-size: 28px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.025em; }
.prose h3 { font-size: 18px; margin: 30px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 18px; padding-left: 20px; } .prose li { margin: 6px 0; }
.lead { font-size: 18.5px; color: #b7c3d6; max-width: 720px; }
.eyebrow { font: 500 12px/1 var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: block; }
.ep-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px var(--line); font: 14px/1.4 var(--m); color: var(--white); }
.ep-head .mth { font-size: 11px; padding: 5px 8px; }
.ep-head .cr { margin-left: auto; font-size: 12px; color: var(--amber); white-space: nowrap; }
.badge { font: 600 10.5px/1 var(--m); letter-spacing: .08em; padding: 4px 7px; border-radius: 5px; vertical-align: 3px; margin-left: 8px; }
.badge.new { color: #031018; background: var(--green); } .badge.soon { color: #1a0f00; background: var(--amber); } .badge.only { color: #031018; background: var(--cyan); }
table.params { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 14px; }
table.params th { text-align: left; font: 500 11px/1 var(--m); letter-spacing: .12em; text-transform: uppercase; color: var(--fog); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line2); }
table.params td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.stations { display: block; margin-top: 4px; font-size: 13px; color: var(--fog); }
.stations:empty { display: none; }
.stations a { white-space: nowrap; color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.stations a:hover { color: var(--cyan); }
table.params td:first-child { white-space: nowrap; } table.params.wrap td:first-child { white-space: normal; } table.params td:first-child code { color: var(--cyan); }
table.params .req { font: 500 10.5px/1 var(--m); color: var(--rose); margin-left: 6px; }
table.params .ty { font: 12px/1 var(--m); color: var(--fog); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.card { display: block; padding: 20px; border-radius: 14px; background: linear-gradient(180deg, var(--hull), #060a14); box-shadow: inset 0 0 0 1px var(--line); color: var(--mist); transition: box-shadow .35s var(--ease); }
.card:hover { text-decoration: none; box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb),.4); }
.card b { display: block; color: var(--white); font-size: 16px; margin-bottom: 4px; }
.note { padding: 14px 16px; border-radius: 12px; margin: 18px 0; font-size: 14.5px; background: rgba(var(--cyan-rgb),.06); box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb),.22); color: #cfe7f5; }
.note.warn { background: rgba(255,181,71,.07); box-shadow: inset 0 0 0 1px rgba(255,181,71,.28); color: #f3dfbf; }

/* code panel */
.side { position: sticky; top: 84px; align-self: start; display: grid; gap: 14px; }
.panel { border-radius: 14px; overflow: hidden; background: #04070e; box-shadow: inset 0 0 0 1px var(--line2); }
.panel .hd { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.panel .hd button { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 7px; font: 500 12px/1 var(--m); color: var(--fog); transition: color .3s var(--ease), background .3s var(--ease), filter .3s var(--ease); }
.panel .hd button.on { color: var(--white); background: rgba(255,255,255,.07); }
.panel .hd .sp { flex: 1; }
.panel .hd .run { color: #031018; background: var(--cyan); font-weight: 600; }
.panel .hd .run:hover { filter: brightness(1.1); }
.panel .hd .copy { color: var(--fog); }
.panel pre { margin: 0; padding: 16px 18px; font: 12.5px/1.7 var(--m); color: #c7d3e6; overflow: auto; max-height: 460px; white-space: pre; transition: opacity .3s var(--ease); }
.panel pre.wait { opacity: .35; }
.panel pre .c { color: var(--fog); } .panel pre .s { color: #ffd08a; } .panel pre .k { color: #8fd3ff; } .panel pre .n { color: #9cf0c4; } .panel pre .kw { color: #c792ff; }
.panel .st { font: 12px/1 var(--m); color: var(--fog); padding: 0 8px; white-space: nowrap; min-width: 22ch; text-align: right; font-variant-numeric: tabular-nums; } .panel .st b { color: var(--green); font-weight: 500; }
/* a live answer keeps one fixed height, so typing it out never moves the page */
.panel.res pre { max-height: 380px; }
.panel.res[data-run] pre { height: 380px; }

/* hero of the docs home */
.home { position: relative; overflow: hidden; }
.home::before { content: ""; position: absolute; inset: -40% -10% auto 30%; height: 600px; background: radial-gradient(50% 50% at 50% 50%, rgba(var(--cyan-rgb),.14), transparent 70%); pointer-events: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 26px 0 8px; }
.stats div { padding: 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.stats b { display: block; font: 600 26px/1 var(--f); color: var(--white); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--fog); }
.steps { counter-reset: s; display: grid; gap: 14px; margin: 18px 0; }
.steps div { counter-increment: s; position: relative; padding: 18px 18px 18px 58px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.steps div::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 600 13px/1 var(--m); color: #031018; background: var(--cyan); }
.steps b { color: var(--white); display: block; margin-bottom: 2px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.kinds code { color: var(--white); }
.hidden { display: none !important; }

/* light theme: paper and sky, navy text, deep teal accent; code panels stay dark terminals */
[data-theme="light"] code { color: #1d3350; background: rgba(11,26,48,.05); }
[data-theme="light"] .term code { color: #d8e3f5; background: rgba(255,255,255,.05); }
[data-theme="light"] header.top { background: rgba(255,255,255,.82); box-shadow: 0 8px 26px -20px rgba(11,26,48,.3); }
[data-theme="light"] .search input, [data-theme="light"] .navfind input, [data-theme="light"] .b { background: #fff; }
[data-theme="light"] .b:hover { background: #f7f9fc; }
[data-theme="light"] .b.p { color: #fff; background: linear-gradient(180deg, #0b7c9e, #0a6a88); box-shadow: 0 8px 22px -12px rgba(8,70,95,.55), inset 0 1px 0 rgba(255,255,255,.22); }
[data-theme="light"] .live i { box-shadow: none; }
[data-theme="light"] aside.nav a:hover { background: rgba(11,26,48,.04); }
[data-theme="light"] .mth, [data-theme="light"] .badge.new, [data-theme="light"] .badge.only, [data-theme="light"] .steps div::before { color: #fff; }
[data-theme="light"] .badge.soon { color: #fff; background: var(--amber); }
[data-theme="light"] .lead { color: var(--mist); }
[data-theme="light"] .ep-head { background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(11,26,48,.04); }
[data-theme="light"] .card { background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(11,26,48,.04); }
[data-theme="light"] .card:hover { box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb),.4), 0 18px 40px -26px rgba(11,26,48,.35); }
[data-theme="light"] .note { color: #0d4256; background: rgba(var(--cyan-rgb),.06); box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb),.25); }
[data-theme="light"] .note.warn { color: #5a3a00; background: rgba(214,140,20,.09); box-shadow: inset 0 0 0 1px rgba(154,91,0,.3); }
[data-theme="light"] .stats div, [data-theme="light"] .steps div { background: #fff; }
[data-theme="light"] .home::before { background: radial-gradient(50% 50% at 50% 50%, rgba(var(--cyan-rgb),.08), transparent 70%); }
[data-theme="light"] .panel { box-shadow: inset 0 0 0 1px rgba(160,190,255,.16), 0 24px 50px -30px rgba(11,26,48,.45); }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
.theming, .theming *, .theming *::before, .theming *::after { transition: none !important; }

@media (max-width: 1180px) { .doc { grid-template-columns: minmax(0, 1fr); } .side { position: static; min-width: 0; } }
@media (max-width: 720px) { .ep-head .cr { white-space: normal; flex: 1 1 100%; margin-left: 0; min-width: 0; } .ep-head > span { min-width: 0; overflow-wrap: anywhere; } }
@media (max-width: 560px) { header.top { gap: 10px; padding: 0 12px; } header.top img { height: 26px; } header.top .tag, .live { display: none; } header.top .r .b:not(.p) { display: none; } table.params td:first-child { white-space: normal; } .prose { overflow-wrap: anywhere; } .ep-head .cr { margin-left: 0; } }
@media (max-width: 560px) { .panel.res[data-run] pre { height: 300px; } }
/* the phone menu: the side menu and its search, opened from the top bar */
.navbtn { display: none; } .navfind, .navsite { display: none; }
.navfind input { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; border: 0; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line2); color: var(--white); font: 16px var(--f); outline: none; }
.navfind input:focus { box-shadow: inset 0 0 0 1px var(--cyan); }
.navbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.navsite a { display: inline-flex !important; }
@media (max-width: 860px) { .navbtn { display: grid; } aside.nav { display: none; position: fixed; inset: 64px 0 0; z-index: 39; height: auto; padding: 16px 20px 60px; border: 0; background: var(--space); overscroll-behavior: contain; } aside.nav.open { display: block; } aside.nav a { padding: 10px; font-size: 15px; } .navfind { display: block; margin-bottom: 8px; } body.menu-open { overflow: hidden; } }
@media (max-width: 560px) { .navsite { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 4px; } header.top .r .b.p { display: none; } }
/* the plans table: on a phone each plan is a small block of its own, nothing scrolls sideways */
@media (max-width: 720px) { table.plans, table.plans tbody, table.plans tr, table.plans td { display: block; } table.plans tr:first-child { display: none; } table.plans tr { padding: 12px 0; border-bottom: 1px solid var(--line); } table.plans td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border: 0; text-align: right; } table.plans td:first-child { color: var(--white); font-weight: 600; } table.plans td[data-l]:not(:first-child)::before { content: attr(data-l); color: var(--fog); text-align: left; flex: none; max-width: 55%; } }
@media (max-width: 860px) { .shell { grid-template-columns: minmax(0, 1fr); } .doc { padding: 0 20px; } .search { display: none; } .stats, .grid2 { grid-template-columns: 1fr 1fr; } }

/* endorsement: by Motto Marine International, beside the logo */
.brand { display: flex; align-items: center; gap: 14px; flex: none; min-width: 0; }
.brand > a:first-child { display: block; flex: none; }
.by { display: block; padding-left: 14px; border-left: 1px solid var(--line2); font: 500 9.5px/1.5 var(--m); letter-spacing: .15em; text-transform: uppercase; color: var(--fog); white-space: nowrap; transition: color .3s var(--ease); }
.by span { display: block; }
.by:hover { color: var(--mist); text-decoration: none; }
.by:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
@media (max-width: 1020px) {   /* phones in either hold and small tablets: the endorsement under the logo, so the bar keeps its buttons */
  .brand { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .by { padding-left: 0; border-left: 0; font: 500 9.5px/1.2 var(--f); letter-spacing: .02em; text-transform: none; }
  .by span { display: inline; }
}
.dfoot .mmt { flex-basis: 100%; }
@media (max-width: 720px) { table.params td:first-child { white-space: normal; } .prose { overflow-wrap: anywhere; } }
/* the way on, at the foot of a topic */
.steps { display: flex !important; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 36px; }
.steps a { display: block; padding: 12px 16px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--white); font-weight: 600; transition: background .2s; }
.steps a:hover { text-decoration: none; background: rgba(127,150,190,.08); }
.steps a.next { text-align: right; margin-left: auto; }
.steps small { display: block; font: 500 11px/1.4 var(--m); letter-spacing: .08em; text-transform: uppercase; color: var(--fog); }

/* touch screens: text fields at 16px, so iOS Safari does not zoom the page when one is tapped */
@media (pointer: coarse) { input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px !important; } }

/* iPhone held sideways: the page keeps clear of the notch and the rounded corners (the page asks for the whole screen, viewport-fit=cover). On a computer the insets are 0 and nothing moves */
html { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
header.top { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
@media (max-width: 560px) { header.top { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); } }
@media (max-width: 860px) { aside.nav { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); padding-bottom: calc(60px + env(safe-area-inset-bottom)); } }
