/*
 * /customer/api — Vanilla Pag API documentation
 *
 * Direct port of the vikod3/documentation design language. Pure black
 * background, Satoshi-style sans, three-column layout: ApiSidebar |
 * ApiPageContent | DocTableOfContents. No video, no glass, no gradient
 * sweep on cards — the docs surface is deliberately quiet so the
 * code+content reads cleanly.
 *
 * Tokens copied from the reference repo (src/index.css and
 * tailwind.config.ts):
 *   background    220 7% 0%
 *   card          220 7% 10%
 *   secondary     220 7% 15%
 *   muted-fg      228 8% 85%
 *   border        210 6% 13%
 *   sidebar-bg    220 7% 6%
 *   sidebar-primary  224.3 76.3% 48%   (active rail color)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');

:root {
	--background:     hsl(0 0% 0%);
	--foreground:     hsl(210 40% 98%);
	--card:           hsl(220 7% 10%);
	--card-fg:        hsl(210 40% 98%);
	--secondary:      hsl(220 7% 15%);
	--muted:          hsl(220 7% 15%);
	--muted-fg:       hsl(228 8% 85%);
	--border:         hsl(210 6% 13%);
	--border-strong:  hsl(210 6% 18%);
	--input:          hsl(220 7% 20%);
	--ring:           hsl(212.7 26.8% 83.9%);

	--sidebar-bg:        hsl(220 7% 6%);
	--sidebar-fg:        hsl(210 40% 98%);
	--sidebar-primary:   hsl(224.3 76.3% 48%);
	--sidebar-accent:    hsl(220 7% 12%);
	--sidebar-border:    hsl(220 7% 15%);

	--m-get:    hsl(150 65% 55%);
	--m-post:   hsl(214 95% 65%);
	--m-put:    hsl(265 85% 70%);
	--m-patch:  hsl(30 95% 60%);
	--m-delete: hsl(2 84% 64%);

	--radius:    0.75rem;
	--radius-lg: 0.875rem;

	--ease:        cubic-bezier(0.25, 0.1, 0.25, 1);
	--font-sans:   "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono:   "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--nav-h:        4rem;
	--maxw:         90rem;
	--sidebar-w:    16rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scrollbar-color: hsl(0 0% 22%) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(0 0% 22%); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: hsl(0 0% 32%); }

body {
	font-family: var(--font-sans);
	background: var(--background);
	color: var(--foreground);
	font-feature-settings: "ss01", "ss02";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: transparent; border: none; color: inherit; }
::selection { background: var(--sidebar-primary); color: white; }

.scrollbar-none { scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

/* ─────────────────────────────────────────────────────────────────
   Top navbar — sticky, blurs on scroll, 90rem max-width
   ───────────────────────────────────────────────────────────────── */
.docs-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	width: 100%;
	transition: background-color 280ms var(--ease), border-color 280ms var(--ease);
	background: transparent;
	border-bottom: 1px solid hsl(0 0% 100% / 0.06);
}
.docs-nav.is-scrolled {
	background: hsl(0 0% 0% / 0.85);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	backdrop-filter: blur(20px) saturate(160%);
	border-bottom-color: var(--border);
}
.docs-nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0.95rem 1rem;
	height: var(--nav-h);
	gap: 1.25rem;
}
@media (min-width: 768px) {
	.docs-nav-inner { padding: 0.95rem 2rem; }
}

.docs-nav-left {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-width: 0;
	flex: 1;
}
.docs-logo {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex-shrink: 0;
}
.docs-logo-mark {
	width: 32px;
	height: 32px;
	border-radius: 12px;
	background: linear-gradient(135deg, hsl(0 0% 88%) 0%, hsl(0 0% 100%) 100%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: hsl(220 7% 8%);
}
.docs-logo-mark svg { width: 18px; height: 18px; stroke-width: 2.4; }
.docs-logo-name {
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--foreground);
	letter-spacing: -0.015em;
}

/* Search bar with gradient border (port of search-bar-gradient-border) */
.docs-search {
	position: relative;
	flex: 1;
	max-width: 360px;
	min-width: 0;
}
.docs-search input {
	width: 100%;
	background: linear-gradient(
		182.51deg,
		hsl(0 0% 100% / 0.02) 27.09%,
		hsl(0 0% 35% / 0.02) 58.59%,
		hsl(0 0% 0% / 0.02) 92.75%
	);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: none;
	border-radius: 0.75rem;
	padding: 0.55rem 0.85rem 0.55rem 2.4rem;
	color: var(--foreground);
	font-size: 0.88rem;
	font-family: inherit;
	outline: none;
	position: relative;
	z-index: 1;
}
.docs-search input::placeholder { color: hsl(0 0% 55%); }
.docs-search::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 0.75rem;
	padding: 1px;
	background: linear-gradient(
		178.8deg,
		hsl(0 0% 100% / 0.25) 10.85%,
		hsl(0 0% 8% / 0.46) 24.36%,
		hsl(0 0% 20% / 0.46) 73.67%,
		hsl(0 0% 100% / 0.46) 90.68%
	);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
	z-index: 2;
}
.docs-search::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	width: 14px;
	height: 14px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	z-index: 3;
}

.docs-nav-right {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}
.docs-nav-link {
	padding: 0.55rem 0.85rem;
	color: hsl(0 0% 60%);
	font-size: 0.88rem;
	font-weight: 500;
	border-radius: 0.75rem;
	transition: color 200ms var(--ease), background 200ms var(--ease);
}
.docs-nav-link:hover { color: var(--foreground); }
.docs-nav-link.is-active { color: var(--foreground); }
.docs-nav-cta {
	margin-left: 0.5rem;
	padding: 0.55rem 1rem;
	background: var(--foreground);
	color: hsl(0 0% 0%);
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 0.75rem;
	transition: background 200ms var(--ease);
}
.docs-nav-cta:hover { background: hsl(0 0% 88%); }

@media (max-width: 900px) {
	.docs-search { display: none; }
}

/* ─────────────────────────────────────────────────────────────────
   3-column layout
   ───────────────────────────────────────────────────────────────── */
.docs-shell {
	display: flex;
	max-width: var(--maxw);
	margin: 0 auto;
	padding-top: var(--nav-h);
	width: 100%;
	min-width: 0;
	overflow-x: hidden;
}

/* Left sidebar — ApiSidebar */
.api-sidebar {
	width: var(--sidebar-w);
	flex-shrink: 0;
	position: sticky;
	top: var(--nav-h);
	height: calc(100vh - var(--nav-h));
	overflow-y: auto;
	border-right: 1px solid var(--sidebar-border);
	background: var(--sidebar-bg);
	padding: 1.5rem 0;
	scrollbar-width: thin;
}
.api-sidebar::-webkit-scrollbar { width: 4px; }
.api-sidebar-group { padding: 0 1rem; margin-bottom: 1.5rem; }
.api-sidebar-group + .api-sidebar-group { margin-top: 0; }
.api-sidebar-group h3 {
	font-size: 0.75rem;
	font-weight: 600;
	color: hsl(0 0% 53%);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-left: 1rem;
	margin-bottom: 0.5rem;
}
.api-sidebar-items {
	position: relative;
}
.api-sidebar-items::before {
	content: "";
	position: absolute;
	left: 0.75rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--sidebar-border);
}
.api-sidebar-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem 0.5rem 1.5rem;
	font-size: 0.875rem;
	color: hsl(0 0% 60%);
	transition: color 200ms var(--ease);
	min-width: 0;
}
.api-sidebar-item:hover { color: var(--foreground); }
.api-sidebar-item.is-active { color: var(--foreground); font-weight: 500; }
.api-sidebar-item.is-active::before {
	content: "";
	position: absolute;
	left: 0.75rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--sidebar-primary);
}
.api-sidebar-item .title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Key panel inside the sidebar */
.api-sidebar-key {
	padding: 0 1rem;
	margin-top: 1rem;
	margin-bottom: 1rem;
}
.api-sidebar-key-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
}
.api-sidebar-key-card h4 {
	font-size: 0.75rem;
	font-weight: 600;
	color: hsl(0 0% 60%);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.45rem;
}
.api-sidebar-key-card .key-meta {
	font-size: 0.78rem;
	color: var(--muted-fg);
	margin-bottom: 0.55rem;
	line-height: 1.5;
}
.api-sidebar-key-card code {
	display: block;
	background: var(--secondary);
	border: 1px solid var(--border);
	border-radius: 0.5rem;
	padding: 0.5rem 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--foreground);
	word-break: break-all;
	margin-bottom: 0.55rem;
}
.api-sidebar-key-card .key-copy {
	width: 100%;
	padding: 0.45rem 0.85rem;
	background: var(--secondary);
	border: 1px solid var(--border-strong);
	border-radius: 0.5rem;
	color: var(--foreground);
	font-size: 0.78rem;
	font-weight: 600;
	transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.api-sidebar-key-card .key-copy:hover {
	background: hsl(220 7% 18%);
	border-color: var(--sidebar-primary);
}
.api-sidebar-key-card .key-copy[data-copied="1"] {
	color: hsl(150 65% 60%);
	border-color: hsl(150 65% 50% / 0.4);
}

/* Main column — ApiPageContent */
.api-main {
	flex: 1;
	min-width: 0;
	padding: 2.5rem 1rem 2.5rem;
	overflow: hidden;
}
@media (min-width: 768px) {
	.api-main { padding: 2.5rem 1.5rem 2.5rem; }
}
@media (min-width: 1024px) {
	.api-main { padding: 2.5rem 3rem 2.5rem; }
}
.api-main-inner {
	max-width: 48rem;
	width: 100%;
}
.api-breadcrumb {
	font-size: 0.88rem;
	color: hsl(0 0% 60%);
	margin-bottom: 0.5rem;
}
.api-title {
	font-size: clamp(1.875rem, 4vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--foreground);
	margin-bottom: 1rem;
	line-height: 1.1;
}
.api-desc {
	color: hsl(0 0% 60%);
	font-size: 1rem;
	margin-bottom: 0.5rem;
}
.api-long {
	color: hsl(0 0% 60%);
	font-size: 0.95rem;
	margin-bottom: 2.5rem;
	line-height: 1.65;
	max-width: 42rem;
}

.api-section {
	margin-bottom: 2.5rem;
	scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.api-section > h2 {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--foreground);
	margin-bottom: 1rem;
	letter-spacing: -0.012em;
}
.api-section > h3 {
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(0 0% 60%);
	margin-bottom: 0.5rem;
}

/* Endpoint block */
.api-endpoint-block {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: hsl(220 7% 15% / 0.5);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 0.875rem;
	color: var(--foreground);
	overflow-x: auto;
}
.api-endpoint-block code { background: transparent; }

.http-method {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-mono);
	font-weight: 600;
	text-transform: uppercase;
	border-radius: 0.25rem;
	font-size: 0.625rem;
	padding: 0.15rem 0.4rem;
	min-width: 42px;
	flex-shrink: 0;
	letter-spacing: 0.04em;
}
.http-method.md {
	font-size: 0.75rem;
	padding: 0.25rem 0.5rem;
	min-width: 56px;
	border-radius: 0.375rem;
}
.http-method-GET    { background: hsl(150 65% 55% / 0.2); color: var(--m-get);    }
.http-method-POST   { background: hsl(214 95% 65% / 0.2); color: var(--m-post);   }
.http-method-PUT    { background: hsl(265 85% 70% / 0.2); color: var(--m-put);    }
.http-method-PATCH  { background: hsl(30 95% 60% / 0.2);  color: var(--m-patch);  }
.http-method-DELETE { background: hsl(2 84% 64% / 0.2);   color: var(--m-delete); }

/* API table */
.api-table-wrap {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
.api-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 400px;
}
.api-table th {
	text-align: left;
	font-size: 0.6875rem;
	font-weight: 600;
	color: hsl(0 0% 60%);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.55rem 1rem;
	background: hsl(220 7% 15% / 0.3);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
.api-table td {
	padding: 0.7rem 1rem;
	font-size: 0.875rem;
	color: var(--muted-fg);
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}
.api-table tr:last-child td { border-bottom: none; }
.api-table tbody tr:hover td { background: hsl(220 7% 15% / 0.2); }
.api-table td.is-mono {
	font-family: var(--font-mono);
	color: var(--foreground);
	font-size: 0.84rem;
}
.api-table .req-yes { color: hsl(150 65% 65%); font-weight: 500; }
.api-table .req-no  { color: hsl(0 0% 53%); }

/* Code block */
.api-code {
	background: hsl(220 7% 15% / 0.5);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 0.84rem;
	line-height: 1.7;
	color: var(--foreground);
	white-space: pre;
	position: relative;
}
.api-code .copy-btn {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	padding: 0.32rem 0.7rem;
	background: hsl(0 0% 100% / 0.05);
	color: hsl(0 0% 70%);
	border: 1px solid var(--border-strong);
	border-radius: 0.5rem;
	font-family: var(--font-sans);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0;
	transition: opacity 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}
.api-code:hover .copy-btn { opacity: 1; }
.api-code .copy-btn:hover { background: hsl(0 0% 100% / 0.1); color: var(--foreground); }
.api-code .copy-btn[data-copied="1"] {
	color: hsl(150 65% 60%);
	border-color: hsl(150 65% 50% / 0.4);
	background: hsl(150 65% 50% / 0.1);
	opacity: 1;
}

/* Right TOC */
.api-toc {
	width: 12rem;
	flex-shrink: 0;
	position: sticky;
	top: calc(var(--nav-h) + 1.5rem);
	height: calc(100vh - var(--nav-h) - 1.5rem);
	overflow-y: auto;
	padding: 2.5rem 1.5rem 2.5rem 0;
	font-size: 0.8rem;
	scrollbar-width: thin;
}
.api-toc h4 {
	font-size: 0.7rem;
	font-weight: 600;
	color: hsl(0 0% 60%);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 0.6rem;
	padding-left: 0.75rem;
}
.api-toc ul {
	list-style: none;
	position: relative;
}
.api-toc ul::before {
	content: "";
	position: absolute;
	left: 0.05rem;
	top: 0.25rem;
	bottom: 0.25rem;
	width: 1px;
	background: var(--border);
}
.api-toc a {
	display: block;
	padding: 0.32rem 0.75rem;
	color: hsl(0 0% 60%);
	transition: color 200ms var(--ease), border-color 200ms var(--ease);
	border-left: 2px solid transparent;
	margin-left: -1px;
}
.api-toc a:hover { color: var(--foreground); }
.api-toc a.is-active {
	color: var(--foreground);
	font-weight: 500;
	border-left-color: var(--sidebar-primary);
}

@media (max-width: 1100px) {
	.api-toc { display: none; }
}
@media (max-width: 768px) {
	.api-sidebar { display: none; }
	.api-main { padding: 1.5rem 1rem 2.5rem; }
}

/* ─────────────────────────────────────────────────────────────────
   Wave / blur-in entrance — used on the page title and section bodies
   ───────────────────────────────────────────────────────────────── */
.wave-letter {
	display: inline-block;
	opacity: 0;
	transform: translateY(20px);
	animation: docs-wave-rise 0.7s var(--ease) forwards;
	will-change: transform, opacity;
}
@keyframes docs-wave-rise {
	0%   { opacity: 0; transform: translateY(20px); filter: blur(8px); }
	60%  { opacity: 1; filter: blur(0); }
	100% { opacity: 1; transform: translateY(0); }
}
.blur-in {
	opacity: 0;
	transform: translateY(10px);
	filter: blur(4px);
	animation: docs-blur-in 0.5s var(--ease) forwards;
	animation-delay: 0.1s;
}
@keyframes docs-blur-in {
	to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ─────────────────────────────────────────────────────────────────
   Mobile sidebar trigger (matches the docs repo Sheet pattern)
   ───────────────────────────────────────────────────────────────── */
.docs-mobile-trigger {
	display: none;
	position: fixed;
	top: calc(var(--nav-h) + 0.5rem);
	left: 1rem;
	z-index: 40;
	padding: 0.5rem;
	background: var(--background);
	color: var(--foreground);
	border: 1px solid var(--border);
	border-radius: 0.5rem;
}
@media (max-width: 768px) {
	.docs-mobile-trigger { display: inline-flex; }
}

/* Flash (used by the controller if redirected after an action) */
.flash {
	padding: 0.85rem 1.1rem;
	margin: 1rem auto;
	max-width: 48rem;
	border-radius: 0.5rem;
	font-size: 0.88rem;
	border: 1px solid var(--border);
	background: var(--card);
}

/* ─────────────────────────────────────────────────────────────────
   Landing — hero with bg-wave video + gradient + wave-text headline
   ───────────────────────────────────────────────────────────────── */
.docs-landing {
	max-width: var(--maxw);
	margin: 0 auto;
	padding-top: var(--nav-h);
	width: 100%;
}

.docs-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8rem 1rem 3rem;
	overflow: hidden;
	min-height: 540px;
	text-align: center;
}
@media (min-width: 768px) {
	.docs-hero { padding: 10rem 2rem 4rem; }
}
.docs-hero video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0);
	z-index: 0;
	opacity: 0;
	transition: opacity 1200ms var(--ease);
}
.docs-hero video.is-loaded { opacity: 1; }
.docs-hero-fade {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 12rem;
	background: linear-gradient(to top, var(--background), transparent);
	z-index: 1;
	pointer-events: none;
}
.docs-hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 48rem;
}

.docs-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.55rem 0.5rem 1rem;
	background: hsl(220 7% 8%);
	border-radius: 999px;
	margin-bottom: 2rem;
	font-size: 0.85rem;
	color: hsl(0 0% 60%);
	transition: background 200ms var(--ease);
}
.docs-hero-badge:hover { background: hsl(220 7% 12%); }
.docs-hero-badge .chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: hsl(220 7% 11%);
}
.docs-hero-badge .chevron svg { width: 14px; height: 14px; stroke-width: 2.2; }

.docs-hero-title {
	font-size: clamp(2.25rem, 6vw, 4rem);
	font-weight: 700;
	color: var(--foreground);
	letter-spacing: -0.035em;
	line-height: 1.05;
	margin-bottom: 1.5rem;
}
.docs-hero-sub {
	font-size: 1rem;
	color: hsl(0 0% 60%);
	max-width: 36rem;
	margin-bottom: 2.5rem;
	line-height: 1.55;
}
@media (min-width: 768px) {
	.docs-hero-sub { font-size: 1.125rem; }
}

.docs-hero-search {
	width: 100%;
	max-width: 600px;
	margin-bottom: 2rem;
	position: relative;
}
.docs-hero-search input {
	width: 100%;
	background: linear-gradient(
		182.51deg,
		hsl(0 0% 100% / 0.02) 27.09%,
		hsl(0 0% 35% / 0.02) 58.59%,
		hsl(0 0% 0% / 0.02) 92.75%
	);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: none;
	border-radius: 0.85rem;
	padding: 0.95rem 1.1rem 0.95rem 3rem;
	color: var(--foreground);
	font-size: 1rem;
	font-family: inherit;
	outline: none;
	position: relative;
	z-index: 1;
}
.docs-hero-search input::placeholder { color: hsl(0 0% 55%); }
.docs-hero-search::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 0.85rem;
	padding: 1px;
	background: linear-gradient(
		178.8deg,
		hsl(0 0% 100% / 0.25) 10.85%,
		hsl(0 0% 8% / 0.46) 24.36%,
		hsl(0 0% 20% / 0.46) 73.67%,
		hsl(0 0% 100% / 0.46) 90.68%
	);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
	z-index: 2;
}
.docs-hero-search::after {
	content: "";
	position: absolute;
	left: 1.1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	z-index: 3;
}

.docs-hero-shortcuts {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	color: hsl(0 0% 60%);
	font-size: 0.88rem;
}
@media (min-width: 768px) {
	.docs-hero-shortcuts { flex-direction: row; }
}
.docs-hero-shortcut {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	color: hsl(0 0% 60%);
	border: 1px solid var(--border);
	border-radius: 0.85rem;
	transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.docs-hero-shortcut:hover {
	color: var(--foreground);
	border-color: hsl(0 0% 35%);
}

/* ─────────────────────────────────────────────────────────────────
   Categories — 3D glass card grid (PNGs as background art)
   ───────────────────────────────────────────────────────────────── */
.docs-section {
	padding: 2.5rem 1rem;
	max-width: 72rem;
	margin: 0 auto;
}
@media (min-width: 768px) {
	.docs-section { padding: 3.5rem 2rem; }
}
.docs-section-title {
	font-size: clamp(1.5rem, 3vw, 1.875rem);
	font-weight: 700;
	color: var(--foreground);
	letter-spacing: -0.02em;
	margin-bottom: 2.5rem;
}

.docs-categories {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
@media (min-width: 768px) { .docs-categories { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .docs-categories { grid-template-columns: 1fr 1fr 1fr; } }

.docs-cat-card {
	display: flex;
	flex-direction: column;
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 2rem;
	overflow: hidden;
	transition: border-color 240ms var(--ease), transform 280ms var(--ease);
	color: var(--foreground);
}
.docs-cat-card:hover {
	border-color: hsl(0 0% 35%);
	transform: translateY(-2px);
}
.docs-cat-image {
	padding: 1rem 1rem 0;
}
.docs-cat-image-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 1.5rem;
}
.docs-cat-image-frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.docs-cat-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.docs-cat-body h3 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--foreground);
}
.docs-cat-body p {
	font-size: 0.875rem;
	color: hsl(0 0% 60%);
	line-height: 1.55;
}
.docs-cat-body .cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--foreground);
	transition: color 200ms var(--ease);
}
.docs-cat-body .cta svg {
	width: 16px;
	height: 16px;
	stroke-width: 2;
	transition: transform 200ms var(--ease);
}
.docs-cat-card:hover .cta svg { transform: translateX(4px); }

/* ─────────────────────────────────────────────────────────────────
   Quick-start key card on landing
   ───────────────────────────────────────────────────────────────── */
.docs-key-card {
	max-width: 48rem;
	margin: 0 auto;
	padding: 1.5rem 1.75rem 1.75rem;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 1.5rem;
	box-shadow:
		0px 3px 6px 0px rgba(0, 0, 0, 0.1),
		inset 0px -3px 2px 0px rgba(255, 255, 255, 0.03),
		inset 0px 0.6px 0.36px -1.17px rgba(255, 255, 255, 0.10),
		inset 0px 2.29px 1.37px -2.33px rgba(255, 255, 255, 0.09),
		inset 0px 10px 6px -3.5px rgba(255, 255, 255, 0.045);
}
.docs-key-card h4 {
	font-size: 0.7rem;
	font-weight: 700;
	color: hsl(0 0% 60%);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	margin-bottom: 0.85rem;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}
.docs-key-card h4 .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: hsl(150 65% 55%);
	box-shadow: 0 0 8px hsl(150 65% 55%);
}
.docs-key-card .key-row {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
	flex-wrap: wrap;
}
.docs-key-card code {
	flex: 1;
	min-width: 0;
	padding: 0.85rem 1rem;
	background: var(--secondary);
	border: 1px solid var(--border-strong);
	border-radius: 0.85rem;
	font-family: var(--font-mono);
	font-size: 0.88rem;
	color: var(--foreground);
	word-break: break-all;
}
.docs-key-card .copy {
	padding: 0.85rem 1.25rem;
	background: var(--foreground);
	color: hsl(0 0% 0%);
	border-radius: 0.85rem;
	font-size: 0.85rem;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: background 200ms var(--ease);
}
.docs-key-card .copy:hover { background: hsl(0 0% 88%); }
.docs-key-card .copy[data-copied="1"] { background: hsl(150 65% 55%); color: hsl(0 0% 5%); }
.docs-key-card p {
	font-size: 0.85rem;
	color: hsl(0 0% 60%);
	margin-top: 0.85rem;
	line-height: 1.55;
}

/* ─────────────────────────────────────────────────────────────────
   Support section with bg-image (support-bg.png)
   ───────────────────────────────────────────────────────────────── */
.docs-support {
	position: relative;
	border-radius: 2rem;
	border: 1px solid var(--border);
	overflow: hidden;
	padding: 1.75rem;
	background-image: url("/docs-assets/support-bg.png");
	background-size: cover;
	background-position: center;
}
@media (min-width: 768px) {
	.docs-support { padding: 2.75rem; }
}
.docs-support-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
@media (min-width: 768px) { .docs-support-grid { grid-template-columns: 1fr 1fr; } }

.docs-support-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem;
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 2rem;
	transition: border-color 240ms var(--ease);
	box-shadow:
		0px 3px 6px 0px rgba(0, 0, 0, 0.1),
		inset 0px -3px 2px 0px rgba(255, 255, 255, 0.03),
		inset 0px 0.6px 0.36px -1.17px rgba(255, 255, 255, 0.10),
		inset 0px 2.29px 1.37px -2.33px rgba(255, 255, 255, 0.09),
		inset 0px 10px 6px -3.5px rgba(255, 255, 255, 0.045);
	color: var(--foreground);
}
@media (min-width: 1024px) {
	.docs-support-card { flex-direction: row; align-items: center; }
}
.docs-support-card:hover { border-color: hsl(0 0% 35%); }
.docs-support-card .icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 1px solid var(--border-strong);
	color: hsl(0 0% 60%);
}
.docs-support-card .icon svg { width: 20px; height: 20px; stroke-width: 2; }
.docs-support-card .meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	flex: 1;
	min-width: 0;
}
.docs-support-card .meta h3 {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--foreground);
}
.docs-support-card .meta p {
	font-size: 0.86rem;
	color: hsl(0 0% 60%);
}
.docs-support-card .cta {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
	color: hsl(0 0% 60%);
	transition: color 200ms var(--ease);
	flex-shrink: 0;
}
.docs-support-card:hover .cta { color: var(--foreground); }
.docs-support-card .cta svg { width: 14px; height: 14px; stroke-width: 2; }

/* ─────────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────────── */
.docs-footer {
	border-top: 1px solid var(--border);
	padding: 1.6rem 1rem;
	margin-top: 3rem;
}
@media (min-width: 768px) { .docs-footer { padding: 1.6rem 2rem; } }
.docs-footer-inner {
	max-width: 72rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
@media (min-width: 768px) { .docs-footer-inner { flex-direction: row; } }
.docs-footer p {
	font-size: 0.85rem;
	color: hsl(0 0% 60%);
}
.docs-footer-right {
	display: inline-flex;
	align-items: center;
	gap: 1.5rem;
}
.docs-footer-social {
	display: inline-flex;
	gap: 1rem;
}
.docs-footer-social a {
	color: hsl(0 0% 60%);
	transition: color 200ms var(--ease);
}
.docs-footer-social a:hover { color: var(--foreground); }
.docs-footer-social svg { width: 16px; height: 16px; stroke-width: 2; }

/* ─────────────────────────────────────────────────────────────────
   Required / Optional field pills (used in the API tables)
   ───────────────────────────────────────────────────────────────── */
.req-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.18rem 0.55rem;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 0.4rem;
	border: 1px solid transparent;
	white-space: nowrap;
}
.req-pill::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
}
.req-pill.req-yes {
	color: hsl(150 65% 65%);
	background: hsl(150 65% 55% / 0.12);
	border-color: hsl(150 65% 55% / 0.32);
}
.req-pill.req-no {
	color: hsl(0 0% 60%);
	background: hsl(0 0% 100% / 0.04);
	border-color: hsl(0 0% 100% / 0.08);
}
.api-table .field-name {
	display: inline-flex;
	align-items: baseline;
	gap: 0.25rem;
	font-family: var(--font-mono);
	color: var(--foreground);
}
.api-table .field-name .star {
	color: hsl(2 84% 64%);
	font-weight: 700;
}
.api-type {
	display: inline-flex;
	align-items: center;
	padding: 0.15rem 0.5rem;
	border-radius: 0.35rem;
	background: hsl(220 7% 18%);
	color: hsl(228 8% 85%);
	font-family: var(--font-mono);
	font-size: 0.72rem;
}

@media (prefers-reduced-motion: reduce) {
	.wave-letter, .blur-in { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
	.docs-nav { transition: none !important; }
	.docs-hero video { transition: none !important; opacity: 1 !important; }
}
