/* Offmarket — content pages (docs, terms, privacy, 404). Same identity as the site. */
@font-face { font-family: "Inter Variable"; src: url(assets/fonts/inter-latin.woff2) format("woff2-variations"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono Variable"; src: url(assets/fonts/jetbrains-mono-latin.woff2) format("woff2-variations"); font-weight: 100 800; font-display: swap; }
:root { color-scheme: dark; --bg: #070708; --panel: rgba(255, 255, 255, 0.03); --border: rgba(255, 255, 255, 0.1); --text: #f6f6f7; --muted: #8e8f96; --accent: #f6f6f7; --accent-2: #f6f6f7; --serif: "Inter Variable", ui-sans-serif, system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16.5px/1.7 "Inter Variable", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; z-index: -1; left: -25vmax; top: -40vmax; width: 80vmax; height: 80vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.09), transparent 65%); filter: blur(90px); animation: drift 28s ease-in-out infinite alternate; }
body::after { content: ""; position: fixed; z-index: -1; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 10%, transparent 75%); }
@keyframes drift { to { transform: translate3d(10vmax, 8vmax, 0) scale(1.15); } }
::selection { background: #f6f6f7; color: #070708; }
.page-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(24px, calc((100% - 1100px) / 2)); background: rgba(10, 10, 13, 0.94); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font: 600 16px/1 var(--serif); letter-spacing: 0.02em; text-transform: uppercase; }
.brand img { height: 18px; width: auto; }
.brand:hover { color: var(--text); }
.page-nav { display: flex; flex-wrap: wrap; gap: 2px; font-size: 14.5px; }
.page-nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; transition: 0.2s; }
.page-nav a:hover { color: var(--text); background: var(--panel); }
.page-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px #f6f6f7; border-radius: 10px 10px 0 0; }
main { max-width: 780px; margin: 0 auto; padding: clamp(48px, 9vh, 96px) 24px 110px; animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
h1 { margin: 0 0 14px; font: 600 clamp(38px, 5.6vw, 60px)/1.02 var(--serif); letter-spacing: -0.04em; text-wrap: balance; }
h2 { margin: 64px 0 14px; font: 600 clamp(22px, 2.6vw, 28px)/1.15 var(--serif); letter-spacing: -0.025em; scroll-margin-top: 90px; }
h2::before { content: ""; display: block; width: 40px; height: 2px; margin-bottom: 18px; background: linear-gradient(90deg, #f6f6f7, transparent); }
h3 { margin: 30px 0 8px; font-size: 18px; font-weight: 600; }
p, li { color: #cfcdd6; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 60ch; }
.note, .draft { position: relative; margin: 26px 0; padding: 16px 18px 16px 20px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-left: 3px solid #f6f6f7; background: rgba(255, 255, 255, 0.04); font-size: 15px; }
.toc { margin: 28px 0 0; padding: 20px 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); backdrop-filter: blur(10px); }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.toc a:hover { text-decoration: underline; }
code { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 0.88em; padding: 2px 7px; border-radius: 7px; background: var(--panel); border: 1px solid var(--border); }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0; font-size: 15px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--panel); }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 255, 255, 0.03); }
th { color: var(--muted); font: 500 11.5px/1.4 "JetBrains Mono Variable", monospace; text-transform: uppercase; letter-spacing: 0.08em; background: rgba(0, 0, 0, 0.25); }
ol, ul { padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--muted); }
.page-footer { border-top: 1px solid var(--border); padding: 28px 24px 40px; text-align: center; font-size: 14px; color: var(--muted); }
.page-footer a { color: var(--muted); margin: 0 12px; text-decoration: none; }
.page-footer a:hover { color: var(--text); }
.center { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.center h1 { font-size: clamp(110px, 22vw, 220px); letter-spacing: -0.06em; color: #f6f6f7; margin: 0; }
.btn { display: inline-block; margin-top: 18px; padding: 13px 22px; border-radius: 10px; background: #f6f6f7; color: #070708; font-weight: 600; text-decoration: none; transition: transform 0.25s; }
.btn:hover { transform: translateY(-2px); }
/* Three-column tables need tighter cells on a phone, or their min-content
   width pushes the whole page into a sideways scroll. */
@media (max-width: 640px) { .toc ol { columns: 1; } .page-nav a { padding: 8px; } table { font-size: 13.5px; } th, td { padding: 10px; overflow-wrap: break-word; hyphens: auto; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── docs: header actions and a sidebar that follows the page ── */
.page-actions { display: flex; gap: 10px; }
.pbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; background: #f6f6f7; color: #070708; font: 600 14.5px var(--serif); text-decoration: none; white-space: nowrap; transition: transform 0.2s, background 0.2s; }
.pbtn:hover { transform: translateY(-1px); }
.pbtn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.pbtn--ghost:hover { background: var(--panel); }
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.docs > main { max-width: 780px; margin: 0; padding: clamp(40px, 7vh, 80px) 0 110px; }
.docs-side { position: sticky; top: 69px; align-self: start; height: calc(100vh - 69px); overflow-y: auto; scrollbar-width: thin; }
.docs-side__in { display: flex; flex-direction: column; min-height: 100%; padding: 44px 0 28px; }
.docs-side__k { margin: 0 0 12px 14px; font: 600 11px "JetBrains Mono Variable", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
#docnav { display: flex; flex-direction: column; gap: 2px; }
#docnav a { display: block; padding: 7px 12px; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; color: var(--muted); font-size: 14.5px; line-height: 1.4; text-decoration: none; transition: color 0.15s, background 0.15s, border-color 0.15s; }
#docnav a:hover { color: var(--text); background: var(--panel); }
#docnav a.on { color: var(--text); border-left-color: #f6f6f7; background: rgba(255, 255, 255, 0.045); }
#docnav .subs { display: none; margin: 2px 0 6px; }
#docnav .grp.open .subs { display: block; }
#docnav a.sub { padding: 5px 12px 5px 26px; font-size: 13.5px; }
#docnav a.sub.on { background: none; }
.docs-side__foot { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding: 24px 14px 0; border-top: 1px solid var(--border); font-size: 13px; }
.docs-side__foot a { color: var(--muted); text-decoration: none; }
.docs-side__foot a:hover { color: var(--text); }
/* phones and small tablets: the sections become a sticky row of chips under the header */
@media (max-width: 900px) {
	.docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
	.docs > * { min-width: 0; } /* or the chip row's full width stretches the page */
	.docs > main { padding: 28px 20px 90px; }
	.docs-side { top: 69px; z-index: 9; height: auto; overflow: visible; background: rgba(10, 10, 13, 0.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
	.docs-side__in { padding: 10px 0; min-height: 0; }
	.docs-side__k, .docs-side__foot, #docnav .subs { display: none !important; }
	#docnav { flex-direction: row; gap: 6px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
	#docnav::-webkit-scrollbar { display: none; }
	#docnav .grp { flex: 0 0 auto; }
	#docnav a { white-space: nowrap; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: 13.5px; }
	#docnav a.on { border-color: #f6f6f7; }
	.page-actions .pbtn--ghost { display: none; }
}
.docs h3 { scroll-margin-top: 90px; }
@media (max-width: 900px) { .docs h2, .docs h3 { scroll-margin-top: 136px; } }
.pbtn__short { display: none; }
@media (max-width: 420px) { .pbtn__long { display: none; } .pbtn__short { display: inline; } }
