:root {
	--bg: #0a0908;
	--bg-soft: #0f0e0d;
	--panel: #141210;
	--panel-2: #211e1b;
	--elev: #2d2825;
	--line: #2d2825;
	--line-soft: #211e1b;
	--fg: #f4f1ed;
	--muted: #9b9189;
	--faint: #706861;
	--accent: #5ee6ae;
	--accent-soft: rgba(94, 230, 174, 0.14);
	--secondary: #9b9189;
	--primary: #176b48;
	--primary-fg: #f4f1ed;
	--primary-hover: #1d8057;
	--danger: #f43f5e;
	--danger-soft: rgba(244, 63, 94, 0.16);
	--ok: #22c55e;
	--ok-soft: rgba(34, 197, 94, 0.16);
	--warn: #f59e0b;
	--warn-soft: rgba(245, 158, 11, 0.16);
	--radius: 12px;
	--radius-sm: 10px;
	--clay: 0 16px 32px -16px rgba(0, 0, 0, 0.6), 0 4px 10px -6px rgba(0, 0, 0, 0.5);
	--clay-sm: 0 8px 18px -12px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.4);
	--clay-in: inset 0 2px 5px rgba(0, 0, 0, 0.5);
	--ring: 0 0 0 3px var(--accent-soft);
	--shadow: var(--clay-sm);
	--sidebar-w: 260px;
	color-scheme: dark;
}

:root[data-theme="light"] {
	--bg: #f8fafc;
	--bg-soft: #f1f5f9;
	--panel: #ffffff;
	--panel-2: #f1f5f9;
	--panel-3: #e2e8f0;
	--elev: #e2e8f0;
	--line: #e2e8f0;
	--line-soft: #f1f5f9;
	--fg: #111827;
	--muted: #6b7280;
	--faint: #9ca3af;
	--accent: #3b82f6;
	--accent-soft: rgba(59, 130, 246, 0.12);
	--secondary: #8b5cf6;
	--primary: #3b82f6;
	--primary-fg: #ffffff;
	--primary-hover: #2563eb;
	--danger: #dc2626;
	--danger-soft: rgba(220, 38, 38, 0.1);
	--ok: #16a34a;
	--ok-soft: rgba(22, 163, 74, 0.1);
	--warn: #d97706;
	--warn-soft: rgba(217, 119, 6, 0.1);
	--clay: 0 12px 32px -12px rgba(16, 24, 40, 0.16), 0 2px 6px -2px rgba(16, 24, 40, 0.08);
	--clay-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
	--clay-in: inset 0 1px 2px rgba(16, 24, 40, 0.06);
	--shadow: var(--clay-sm);
	color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--bg); }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Space Mono", ui-monospace, monospace;
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, .brand, .head h1 { font-family: "Space Mono", ui-monospace, monospace; font-weight: 600; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
code, pre, kbd, samp { font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: .88em; background: var(--panel-2); padding: .1em .4em; border-radius: 6px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.shell { display: flex; min-height: 100vh; }

.side {
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	width: var(--sidebar-w);
	flex: 0 0 var(--sidebar-w);
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 14px;
	background: var(--bg-soft);
	border-right: 1px solid var(--line);
}

.brand {
	font-weight: 700;
	font-size: 15px;
	padding: 6px 12px 14px;
	letter-spacing: -0.01em;
}

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-link {
	display: block;
	padding: 9px 12px;
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-weight: 500;
	transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--panel); color: var(--fg); text-decoration: none; }
.nav-link.is-on { background: var(--accent-soft); color: var(--fg); }

.nav-out { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.head {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 28px;
	background: color-mix(in srgb, var(--bg) 80%, transparent);
	backdrop-filter: blur(12px) saturate(140%);
	border-bottom: 1px solid var(--line);
}
.head h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.who { color: var(--muted); font-size: 13px; white-space: nowrap; }

.content { padding: 24px 28px 56px; max-width: 1080px; width: 100%; }

.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: var(--shadow);
}
.card-narrow { max-width: 440px; }
.card-title { margin: 0 0 16px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; }

.stat { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat-of { font-size: 16px; font-weight: 500; color: var(--faint); }
.stat-lbl { color: var(--muted); font-size: 13px; }
.stat-link { margin-top: 8px; font-size: 13px; font-weight: 500; }

.bullets { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.bullets b { color: var(--fg); }

[hidden] { display: none !important; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form { display: flex; flex-direction: column; gap: 6px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.field-grow { flex: 1 1 240px; }
.field-check { min-width: 0; }
.field-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.field-btn { justify-content: flex-end; flex-direction: row; gap: 8px; }

.field input:not([type]),
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.input {
	width: 100%;
	padding: 10px 12px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--fg);
	transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.label { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--panel-2);
	color: var(--fg);
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--elev); text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { color: var(--danger); border-color: transparent; background: var(--danger-soft); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

.inline { display: inline; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tbl tbody tr:hover { background: var(--bg-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.ta-r { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.tbl td .btn-sm, .tbl td form.inline { margin-left: 4px; }
.sort-form { display: inline-flex; align-items: center; gap: 4px; margin-left: 0 !important; }
.sort-input { width: 56px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--fg); font-size: 13px; }
.prov-groups { display: flex; flex-direction: column; gap: 10px; }
.prov-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.prov-summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; user-select: none; }
.prov-summary::-webkit-details-marker { display: none; }
.prov-summary:hover { background: var(--panel-3, rgba(255,255,255,.03)); }
.prov-chevron { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; flex: none; margin-right: 2px; }
.prov-group[open] > .prov-summary .prov-chevron { transform: rotate(45deg); }
.prov-name { font-weight: 600; color: var(--fg); }
.prov-count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--line); padding: 2px 9px; border-radius: 999px; }
.prov-group[open] > .prov-summary { border-bottom: 1px solid var(--line); }
.prov-group > .tbl { margin: 0; }

.pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}
.pill-on { background: var(--ok-soft); color: var(--ok); }
.pill-off { background: var(--panel-2); color: var(--faint); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-def { background: var(--accent-soft); color: var(--accent); margin-left: 6px; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(229, 181, 103, 0.3); }
.alert-err { background: var(--danger-soft); color: var(--danger); border-color: rgba(242, 105, 95, 0.3); }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(78, 201, 138, 0.3); }
.field-error { margin: 0; color: var(--danger); font-size: 12.5px; line-height: 1.4; }
.field-error[hidden] { display: none; }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.back-link { color: var(--muted); font-size: 14px; }

.is-login { display: flex; min-height: 100vh; }
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; margin: 0; }
.auth-brand { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.auth-title { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.auth-card .btn-block { margin-top: 16px; }
.hint { margin: 16px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.field .hint { margin: 2px 0 0; }
.field .hint code { font-size: 12px; padding: .05em .35em; }

:root { --line-strong: #3a3a42; --sidebar-w: 256px; }

body { font-size: 14.5px; }

.side {
	gap: 2px;
	padding: 14px 12px 12px;
	background: var(--bg);
	border-right: 1px solid var(--line-soft);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 6px 16px;
	font-weight: 600;
}
.brand-mark {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	flex: 0 0 30px;
	border-radius: 9px;
	background: var(--primary);
	color: var(--primary-fg);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 14px; }
.brand-text small { color: var(--faint); font-size: 11.5px; font-weight: 500; }

.nav-label {
	margin: 4px 0 6px;
	padding: 0 10px;
	color: var(--faint);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nav-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 9px;
	font-size: 13.5px;
	font-weight: 500;
}
.nav-ico { width: 17px; height: 17px; flex: 0 0 17px; color: var(--faint); transition: color .15s; }
.nav-link:hover { background: var(--panel); }
.nav-link:hover .nav-ico { color: var(--muted); }
	.nav-link.is-on { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
	.nav-link.is-on .nav-ico { color: var(--accent-fg); }
.nav-link.is-on::before {
	content: "";
	position: absolute;
	left: -12px;
	top: 50%;
	width: 2px;
	height: 18px;
	border-radius: 0 2px 2px 0;
	background: var(--accent);
	transform: translateY(-50%);
}

.nav-out { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.nav-out .btn { justify-content: flex-start; gap: 10px; color: var(--muted); font-size: 13.5px; }
.nav-out .btn:hover { color: var(--fg); }

.head {
	align-items: center;
	padding: 14px 28px;
	border-bottom: 1px solid var(--line-soft);
}
.head-title { min-width: 0; }
.crumb {
	margin: 0 0 2px;
	display: flex;
	gap: 6px;
	color: var(--faint);
	font-size: 12px;
	font-weight: 500;
}
.head h1 { font-size: 19px; font-weight: 600; }

.who { display: inline-flex; align-items: center; gap: 8px; }
.who-av {
	display: grid;
	place-items: center;
	width: 27px;
	height: 27px;
	border-radius: 999px;
	background: var(--panel-2);
	border: 1px solid var(--line);
	color: var(--fg);
	font-size: 12px;
	font-weight: 600;
}
.who-name { font-size: 13px; font-weight: 500; color: var(--fg); }

.content { padding: 22px 28px 64px; max-width: 1120px; }

.card {
	padding: 18px;
	margin-bottom: 16px;
	border-color: var(--line-soft);
	border-radius: 16px;
	box-shadow: none;
	transition: border-color .15s;
}
.card:hover { border-color: var(--line); }
.card-title {
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 13.5px;
	font-weight: 600;
}
.card .muted { font-size: 13.5px; }

.grid-3 { gap: 12px; margin-bottom: 16px; }
.stat { gap: 2px; padding: 18px; }
.stat:hover { border-color: var(--line-strong); }
.stat-num { font-size: 32px; font-weight: 650; letter-spacing: -0.035em; }
.stat-of { font-size: 15px; font-weight: 500; }
.stat-lbl {
	order: -1;
	margin-bottom: 6px;
	color: var(--faint);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.stat-link {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--line-soft);
	color: var(--muted);
	font-size: 12.5px;
}
.stat-link:hover { color: var(--accent); text-decoration: none; }

.bullets { gap: 10px; font-size: 13.8px; line-height: 1.65; }
.bullets li::marker { color: var(--faint); }

.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field input:not([type]),
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.input {
	padding: 9px 11px;
	border-color: var(--line);
	border-radius: 10px;
	background: var(--bg-soft);
	font-size: 13.8px;
}
.field input::placeholder, .input::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .input:focus {
	border-color: var(--line-strong);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.field select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 11px) 50%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }

.btn {
	padding: 8px 13px;
	border-radius: 10px;
	font-size: 13.5px;
	font-weight: 500;
	transition: background .14s, border-color .14s, color .14s;
}
.btn-primary { font-weight: 600; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-ghost { border-color: transparent; }
.tbl td .btn-sm { background: transparent; border-color: var(--line-soft); color: var(--muted); }
.tbl td .btn-sm:hover { background: var(--panel-2); color: var(--fg); border-color: var(--line); }
.tbl td .btn-danger { border-color: transparent; color: var(--danger); }

.card:has(.tbl) { padding: 18px 0 4px; }
.card:has(.tbl) .card-title { padding: 0 18px 12px; }
.card:has(.tbl) > .muted { padding: 0 18px 14px; }
.tbl { font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 18px; }
.tbl th { font-size: 11px; letter-spacing: .06em; color: var(--faint); border-bottom-color: var(--line-soft); }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl td strong { font-weight: 600; }
.mono { font-size: 12.5px; }

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 9px 2px 8px;
	border: 1px solid var(--line-soft);
	background: transparent;
	font-size: 11.5px;
	font-weight: 550;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
.pill-on { color: var(--ok); }
.pill-off { color: var(--faint); }
.pill-warn { color: var(--warn); }
.pill-def { color: var(--accent); }

.alert { border-radius: 12px; font-size: 13.5px; line-height: 1.55; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.back-link:hover { color: var(--fg); text-decoration: none; }

.auth-card { max-width: 372px; padding: 26px 24px; border-radius: 18px; box-shadow: var(--shadow); }
.auth-card:hover { border-color: var(--line-soft); }
.auth-brand { margin-bottom: 12px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.auth-title { font-size: 22px; font-weight: 650; }
.auth-sub { font-size: 13.5px; }
.auth-card .btn-block { margin-top: 18px; padding-block: 10px; }

.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.icon-btn {
	display: none;
	place-items: center;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	border: 1px solid var(--line-soft);
	border-radius: 10px;
	background: var(--panel);
	color: var(--fg);
	cursor: pointer;
}
	.icon-btn:active { background: var(--panel-2); }
	.notice-btn { position: relative; }
	.notice-count {
		position: absolute;
		top: -5px;
		right: -5px;
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 10px;
		font-weight: 700;
		line-height: 1;
		color: #fff;
		background: #e0483b;
		border: 2px solid var(--panel);
		border-radius: 999px;
	}
	.nav-scrim { display: none; }

.package-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.package-card{display:flex;flex-direction:column;gap:12px;padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-2)}.package-card h3,.package-card p{margin:0}.package-card>strong{font-size:1.2rem}.package-pay{display:flex;flex-wrap:wrap;align-items:center;gap:24px}.package-pay img{max-width:100%;height:auto;border-radius:12px}

@media (max-width: 900px) {
	.icon-btn { display: grid; }

	.side {
		position: fixed;
		z-index: 40;
		top: 0;
		left: 0;
		bottom: 0;
		height: 100dvh;
		width: min(80vw, 280px);
		flex-basis: auto;
		padding: 14px 12px calc(12px + env(safe-area-inset-bottom));
		border-right: 1px solid var(--line);
		background: var(--bg-soft);
		transform: translateX(-101%);
		transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
		overflow: hidden;
	}
	.side .brand { flex: 0 0 auto; }
	.side .nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }
	.side .nav-out { flex: 0 0 auto; margin-top: 0; background: var(--bg-soft); }
	.nav-toggle:checked ~ .shell .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }

	.nav-scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 30;
		background: rgba(0, 0, 0, 0.55);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s;
	}
	.nav-toggle:checked ~ .shell .nav-scrim { opacity: 1; pointer-events: auto; }

	.brand { justify-content: space-between; padding: 2px 2px 14px; }
	.side-close { margin-left: auto; }
	.nav-link { padding: 10px 10px; font-size: 14px; }

	.head { gap: 10px; padding: 10px 14px; align-items: center; }
	.head-title { flex: 1; }
	.crumb { display: none; }
	.head h1 { font-size: 17px; }
	.who-name { display: none; }

	.content { padding: 14px 14px calc(48px + env(safe-area-inset-bottom)); }
	.card { padding: 14px; border-radius: 14px; margin-bottom: 12px; }
	.card-title { margin-bottom: 12px; padding-bottom: 10px; }
	.field { min-width: 100%; }
	.form-row { gap: 12px; }
	.field-btn { justify-content: stretch; }
	.field-btn .btn { flex: 1; }

	.grid-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
	.stat { padding: 14px; }
	.stat-num { font-size: 26px; }
	.stat-lbl { font-size: 10.5px; }
	.stat-link { margin-top: 10px; padding-top: 10px; font-size: 12px; }

	.card:has(.tbl) { padding: 14px; overflow: visible; }
	.card:has(.tbl) .card-title, .card:has(.tbl) > .muted { padding-inline: 0; }
	.tbl { display: block; min-width: 0; }
	.tbl thead { display: none; }
	.tbl tbody, .tbl tr, .tbl td { display: block; }
	.tbl tr {
		border: 1px solid var(--line-soft);
		border-radius: 12px;
		padding: 10px 12px;
		margin-bottom: 8px;
		background: var(--bg-soft);
	}
	.tbl tbody tr:hover { background: var(--bg-soft); }
	.tbl tbody tr:last-child { margin-bottom: 0; }
	.tbl td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 14px;
		padding: 4px 0;
		border: 0;
		text-align: right;
		min-width: 0;
	}
	.tbl td::before {
		content: attr(data-l);
		flex: 0 0 auto;
		color: var(--faint);
		font-size: 11.5px;
		font-weight: 600;
		letter-spacing: 0.03em;
		text-transform: uppercase;
		text-align: left;
	}
	.tbl td.td-wrap { word-break: break-all; text-align: right; }
	.tbl td.td-main { padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
	.tbl td.td-main::before { display: none; }
	.tbl td.td-main { justify-content: flex-start; text-align: left; font-size: 14.5px; flex-wrap: wrap; gap: 8px; }
	.tbl td.td-id { display: none; }
	.tbl td.nowrap { white-space: normal; }

	.tbl td.td-quota {
		display: block;
		text-align: left;
		padding: 8px 0 2px;
	}
	.tbl td.td-quota::before { display: block; margin-bottom: 8px; }
	.tbl td.td-quota .pk-meter + .pk-meter { margin-top: 10px; }

	.tbl td.td-act {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
		gap: 6px;
		margin-top: 8px;
		padding-top: 10px;
		border-top: 1px solid var(--line-soft);
	}
	.tbl td.td-act::before { display: none; }
	.tbl td .btn-sm, .tbl td form.inline { margin: 0; }
	.tbl td.td-act .btn { width: 100%; min-height: 34px; }

	.prov-group[open] > .prov-summary { border-bottom: 1px solid var(--line); }
	.prov-group > .tbl { padding: 8px 12px 12px; }
}

@media (max-width: 380px) {
	.grid-3 { grid-template-columns: 1fr; }
	.tbl td.td-act { grid-template-columns: 1fr 1fr; }
}

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head .card-title { margin: 0; padding: 0; border: 0; }
.tbl tbody tr.is-sel, .tbl tbody tr.is-sel:hover { background: var(--accent-soft); }

.chatlog { display: flex; flex-direction: column; gap: 12px; }
.chatlog-msg { max-width: 82%; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); }
.chatlog-user { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.chatlog-ai { align-self: flex-start; }
.chatlog-role { display: block; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 4px; }
.chatlog-text { font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.chatlog-file { display: inline-block; font-size: 12.5px; color: var(--accent); margin-bottom: 4px; }

@media (max-width: 900px) {
	.chatlog-msg { max-width: 92%; }
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-hero { margin-bottom: 16px; }
.stat-cap { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.stat .stat-num { margin: 2px 0; }

.chart-card { margin-bottom: 16px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); font-size: 12.5px; }
.pill-k { color: var(--muted); }
.pill b { font-weight: 650; letter-spacing: -0.01em; }

.chart-wrap { margin-top: 4px; }
.spark { width: 100%; height: auto; display: block; overflow: visible; }
.grid-line { stroke: var(--line-soft); stroke-width: 1; }
.grid-lbl { fill: var(--faint); font-size: 11px; text-anchor: end; }
.spark-dot { fill: var(--accent); opacity: 0; transition: opacity .12s; cursor: pointer; }
.spark-dot:hover { opacity: 1; }
.chart-xaxis { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 4px; color: var(--faint); font-size: 11.5px; }

.split { margin-top: 18px; }
.split-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--panel-2); }
.split-seg { display: block; height: 100%; }
.split-in { background: var(--accent); }
.split-out { background: var(--ok); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend b { color: var(--fg); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot-in { background: var(--accent); }
.dot-out { background: var(--ok); }

.barlist { display: flex; flex-direction: column; gap: 16px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bar-name { font-size: 13.5px; font-weight: 550; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
a.bar-name:hover { color: var(--accent); text-decoration: none; }
.bar-val { font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em; flex: 0 0 auto; }
.bar-track { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar-fill-alt { background: var(--ok); }
.bar-sub { font-size: 12px; color: var(--faint); }

@media (max-width: 900px) {
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.grid-4 { grid-template-columns: 1fr; }
	.card-head .pills { width: 100%; }
}

.ep-list { display: flex; flex-direction: column; gap: 12px; }
.ep {
	border: 1px solid var(--line-soft);
	border-radius: 12px;
	background: var(--bg-soft);
	padding: 14px;
}
.ep-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ep-verb {
	flex: 0 0 auto;
	padding: 3px 9px;
	border-radius: 7px;
	background: var(--ok-soft);
	color: var(--ok);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ep-name { font-weight: 600; font-size: 14px; }
.ep-fmt { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
.ep-fmt code { font-size: 11.5px; }
.copy {
	display: flex;
	align-items: stretch;
	gap: 8px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 4px 4px 4px 12px;
}
.copy input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--fg);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12.5px;
	padding: 6px 0;
}
.copy input:focus { outline: none; }
.copy .btn { flex: 0 0 auto; }
.copy-ok { color: var(--ok); }

.pk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.pk-layout-main { min-width: 0; }
.pk-layout-side { min-width: 0; }
.pk-layout-side .card { margin-bottom: 16px; }

.card-sub { margin: 4px 0 0; color: var(--muted); font-size: 12.8px; line-height: 1.5; max-width: 60ch; }
.card-head { align-items: flex-start; }
.card-head .card-title + .card-sub { margin-top: 4px; }

.empty-note {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	border: 1px dashed var(--line);
	border-radius: 12px;
	background: var(--bg-soft);
	color: var(--muted);
}
.empty-note svg { flex: 0 0 auto; margin-top: 1px; color: var(--faint); }
.empty-note p { margin: 0; font-size: 13.5px; line-height: 1.55; }

.btn-lg { padding: 11px 18px; font-size: 14px; }

@media (min-width: 1000px) {
	.pk-docs { position: sticky; top: 82px; }
}
.ep-quick { margin-top: 14px; }
.ep-quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ep-quick-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.code-block {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--fg);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	line-height: 1.65;
	white-space: pre;
	overflow-x: auto;
}
.code-block code { background: none; padding: 0; font-size: inherit; color: inherit; }
.code-block::-webkit-scrollbar { height: 8px; }
.code-block::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.ep-notes { margin: 16px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ep-notes li::marker { color: var(--faint); }
.ep-notes code { font-size: 11.5px; }

.pk-form { gap: 18px; }
.form-stack .field-grow { flex: 0 0 auto; }
.pk-picker-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--panel-2);
	border: 1px solid var(--line-soft);
	color: var(--faint);
	transition: background .15s, color .15s, border-color .15s;
}
.pk-badge.is-active { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pk-picker { display: flex; flex-direction: column; gap: 8px; border-radius: 12px; transition: box-shadow .15s; }
.pk-picker-err { box-shadow: 0 0 0 2px var(--danger); }
.pk-picker .prov-group { background: var(--panel-2); border-color: var(--line); border-radius: 12px; }
.pk-picker .prov-summary { padding: 13px 14px; gap: 11px; min-height: 52px; }
.pk-picker .prov-name { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.pk-picker .prov-count { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pk-picker .prov-count.is-active { background: var(--accent-soft); color: var(--accent); }

.pk-search { position: relative; display: flex; align-items: center; }
.pk-search svg { position: absolute; left: 12px; color: var(--faint); pointer-events: none; }
.pk-search input {
	width: 100%;
	padding: 10px 12px 10px 36px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--fg);
	font-size: 13.5px;
	transition: border-color .15s, box-shadow .15s;
}
.pk-search input:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.pk-search input::placeholder { color: var(--faint); }
.prov-group[hidden], .pk-model[hidden] { display: none; }

.pk-provtoggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.pk-provtoggle input,
.pk-model input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; cursor: pointer; }
.pk-models { display: flex; flex-direction: column; padding: 6px; gap: 2px; }
.pk-model {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border-radius: 9px;
	transition: background .12s;
	min-width: 0;
}
.pk-model-pick { display: flex; align-items: center; gap: 11px; cursor: pointer; min-width: 0; }

.pk-alias { display: none; }
.pk-model:has(input[type="checkbox"]:checked) .pk-alias { display: block; }
.pk-alias input {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	color: var(--text);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
}
.pk-alias input:focus { outline: none; border-color: var(--accent); }
	.pk-alias input::placeholder { color: var(--faint); font-family: inherit; }

/* Dashboard API cards stay readable from narrow phones to wide screens. */
.ep-list { min-width: 0; }
.ep-name { min-width: 0; overflow-wrap: anywhere; }
.ep .copy { min-width: 0; }
.ep .copy input { min-width: 0; width: 100%; text-overflow: ellipsis; }
.kc-token { min-width: 0; max-width: 100%; }
.kc-token input { min-width: 0; width: 100%; text-overflow: ellipsis; }

@media (max-width: 700px) {
	.content { padding: 16px 12px 40px; }
	.card { padding: 16px; margin-bottom: 14px; }
	.pk-layout { grid-template-columns: 1fr; gap: 0; }
	.pk-layout-side { order: 2; }
	.head { padding: 15px 16px; }
	.head h1 { font-size: 18px; }
	.who { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
	.kc-head { align-items: flex-start; flex-direction: column; gap: 12px; }
	.kc-token { width: 100%; }
	.kc-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.ep { padding: 12px; }
	.ep .copy { align-items: stretch; }
	.ep .copy .btn { padding-inline: 9px; }
}

@media (max-width: 420px) {
	.content { padding-inline: 10px; }
	.card { padding: 13px; border-radius: 10px; }
	.card-head { gap: 10px; flex-wrap: wrap; }
	.card-title { font-size: 14px; }
	.card-sub, .ep-notes { font-size: 12px; }
	.kc-figs { grid-template-columns: 1fr 1fr; }
	.ep-top { align-items: flex-start; }
	.ep-name { font-size: 13px; }
	.copy { gap: 5px; padding-left: 9px; }
	.copy input { font-size: 11px; }
	.copy .btn { font-size: 11px; padding-inline: 8px; }
	.btn-lg { width: 100%; }
}

.pk-alias-note { display: block; margin-top: 4px; font-size: 10.5px; color: var(--faint); }
.pk-model:hover { background: var(--bg-soft); }
.pk-model:has(input:checked) { background: var(--accent-soft); }
.pk-model-name { font-weight: 500; font-size: 13.5px; overflow-wrap: anywhere; }
.pk-model-id {
	margin-left: auto;
	flex: none;
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--muted);
	font-size: 11.5px;
	background: var(--bg);
}
.pk-empty { padding: 18px 4px; text-align: center; color: var(--faint); font-size: 13px; }

.pk-meter { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.pk-meter + .pk-meter { margin-top: 9px; }
.pk-meter-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pk-meter-name { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.pk-meter-val { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-meter-val.is-full { color: var(--danger); font-weight: 600; }
.pk-bar { display: block; height: 4px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.pk-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--ok); transition: width .2s; }
.pk-bar-fill.is-warn { background: var(--warn); }
.pk-bar-fill.is-full { background: var(--danger); }

.pk-usage-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.pk-donut-wrap { position: relative; flex: 0 0 auto; width: 132px; height: 132px; }
.pk-donut { width: 100%; height: 100%; display: block; }
.pk-donut-mid {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}
.pk-donut-mid strong { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; }
.pk-donut-mid span { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.pk-usage-stats { flex: 1 1 240px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pk-usage-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pk-fig {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 14px;
	border: 1px solid var(--line-soft);
	border-radius: 12px;
	background: var(--panel-2);
	min-width: 0;
}
.pk-fig-cap { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.pk-fig-num { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pk-fig-sub { font-size: 11.5px; color: var(--muted); }
.pk-usage .pk-meter-val { white-space: normal; }

.pk-limits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field input[type="number"] { appearance: textfield; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pk-num { position: relative; display: flex; align-items: center; }
.field .pk-num input[type="number"] { padding-right: 58px; }
.pk-num-suffix {
	position: absolute;
	right: 12px;
	font-size: 11.5px;
	color: var(--faint);
	pointer-events: none;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.pk-meter-left { display: block; margin-top: 5px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pk-flags { display: flex; gap: 8px; flex-wrap: wrap; }

.kc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.kc {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
	padding: 16px;
	border: 1px solid var(--line-soft);
	border-radius: 14px;
	background: var(--bg-soft);
}
.kc.is-off { opacity: .72; }
.kc.is-drained { border-color: rgba(229, 181, 103, .35); }
.kc-head { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kc-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.kc-title h3 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kc-token { padding: 3px 3px 3px 10px; background: var(--bg); }
.kc-token input { font-size: 12px; }

.kc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-chip {
	font-size: 11.5px;
	padding: 3px 8px;
	border-radius: 7px;
	background: var(--panel-2);
	color: var(--muted);
	overflow-wrap: anywhere;
}
.kc-chip.is-alias { background: var(--accent-soft); color: var(--accent); }

.kc-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kc-fig {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 9px 10px;
	border-radius: 10px;
	background: var(--panel-2);
	min-width: 0;
}
.kc-fig span { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.kc-fig strong { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.kc-cap { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.kc-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.kc-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kc-legend .legend-item { gap: 5px; }
.kc-legend .dot { width: 7px; height: 7px; }
.kc-legend-calls { color: var(--faint); }

.kc-bars { display: flex; align-items: flex-end; gap: 3px; height: 84px; padding: 0 1px; }
.kc-col {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	border-radius: 4px;
	background: var(--panel-2);
	overflow: hidden;
}
.kc-col.is-empty { background: var(--panel-2); opacity: .55; }
:root[data-theme="light"] .kc-col { background: var(--panel-3); }
:root[data-theme="light"] .kc-col.is-empty { background: var(--panel-3); opacity: 1; }
.kc-seg { display: block; width: 100%; }
.kc-seg-in { background: var(--accent); }
.kc-seg-out { background: var(--ok); }
.kc-xaxis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--faint); }

.kc-models { display: flex; flex-direction: column; gap: 10px; }
.kc-mrow { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kc-mtop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.kc-mname {
	font-size: 11.5px;
	background: transparent;
	padding: 0;
	color: var(--fg);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kc-mval { flex: 0 0 auto; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

.kc-edit summary { cursor: pointer; font-size: 12.5px; color: var(--accent); }
.kc-edit-body { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.kc-form { display: flex; flex-direction: column; gap: 10px; }
.kc-form .field { gap: 6px; }
.kc-form .field > span { font-size: 11px; color: var(--muted); }
.kc-form .btn { align-self: flex-start; }

.kc-act { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.kc-act .btn { margin: 0; }
.kc-act form { display: contents; }

.key-new { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--panel); }
.key-new-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.key-new-head .card-title { margin: 0; padding: 0; border: 0; }
.key-new-badge {
	flex: 0 0 auto;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
}
.key-new .copy { margin-top: 12px; }

@media (max-width: 999px) {
	.pk-layout { grid-template-columns: 1fr; }
	.pk-docs { position: static; }
}

@media (max-width: 560px) {
	.pk-limits { grid-template-columns: 1fr; }
	.pk-model-id { display: none; }
	.pk-model { padding: 12px 10px; }
	.pk-picker .prov-summary { padding: 14px 12px; min-height: 56px; }
	.pk-picker .prov-count { font-size: 11px; padding: 2px 8px; }
	.btn-lg { width: 100%; }
	.code-block { font-size: 11.5px; }
	.pk-usage-grid { gap: 18px; }
	.pk-donut-wrap { width: 112px; height: 112px; margin-inline: auto; }
	.pk-donut-mid strong { font-size: 22px; }
	.pk-fig { padding: 10px 12px; }
	.pk-fig-num { font-size: 21px; }

	.kc { padding: 14px; gap: 13px; }
	.kc-figs { gap: 6px; }
	.kc-fig { padding: 8px 9px; }
	.kc-fig strong { font-size: 14px; }
	.kc-bars { height: 72px; gap: 2px; }
	.kc-act .btn { flex: 1 1 46%; }
}

.doc { display: flex; flex-direction: column; gap: 16px; }
.doc h2 { font-size: 20px; margin: 0 0 6px; }
.doc h3 { font-size: 15px; margin: 0 0 10px; }
.doc-intro p { max-width: 62ch; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-table th, .doc-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc-table th { color: var(--muted, #8b93a1); font-weight: 600; }
.doc-table tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.doc .code {
	margin: 10px 0 0;
	padding: 12px 14px;
	max-width: 100%;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--fg);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12.5px;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.doc .code code { background: none; padding: 0; font-size: inherit; color: inherit; }
.doc .code::-webkit-scrollbar { height: 8px; }
.doc .code::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.doc .card p code, .doc-table code { word-break: break-word; }

.doc-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc-table { min-width: 420px; }
.doc-table td.mono { word-break: break-all; }
.video-capability-table .doc-table { min-width: 560px; }
.video-capability-table th:first-child, .video-capability-table td:first-child { width: 30%; }
.video-capability-table th:nth-child(2), .video-capability-table td:nth-child(2) { width: 25%; }
.video-capability-table td { line-height: 1.5; }
@media (max-width: 600px) {
	.video-capability-table { margin-right: -2px; }
	.video-capability-table .doc-table { min-width: 520px; }
	.video-capability-table th, .video-capability-table td { padding: 8px; }
}

.md-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.md-tabs { display: flex; gap: 6px; margin-top: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.md-tab { flex: 1; padding: 9px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.md-tab.is-active { background: var(--primary); color: var(--primary-fg); }
.md-type-panel[hidden] { display: none; }
.md-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.md-filter { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.md-filter:hover { border-color: var(--primary); color: var(--fg); }
.md-filter.is-active { border-color: var(--primary); background: var(--primary); color: var(--primary-fg); }
.md-card[hidden] { display: none; }
.md-group .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.md-group .card-title { margin: 0; padding: 0; border: 0; }
.md-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.md-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	border-top: 1px solid var(--line-soft);
}
.md-item:first-child { border-top: 0; }
.md-item.is-off { opacity: .62; }
.md-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.md-name { font-size: 13.8px; font-weight: 550; color: var(--fg); }
.md-id { font-size: 12px; color: var(--faint); word-break: break-all; }
.md-tags { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

@media (max-width: 560px) {
	.md-item { flex-direction: column; align-items: flex-start; gap: 8px; }
	.md-tags { flex-wrap: wrap; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pg-shell { width: min(100%, 980px); margin: 0 auto; }
.pg-chat { min-width: 0; padding: 0; overflow: visible; }
.pg-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line-soft); }
.pg-chat-head .card-title { margin: 3px 0 0; border: 0; padding: 0; font-size: 22px; letter-spacing: -.025em; }
.pg-chat-head .card-sub { margin: 6px 0 0; }
.pg-kicker { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.pg-controls { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; padding: 18px 26px; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft); }
.pg-picker { position: relative; min-width: 0; }
.pg-picker-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.pg-picker-trigger { display: flex; width: 100%; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--clay-in); }
.pg-picker-trigger:hover { border-color: var(--line-strong); }
.pg-picker-trigger:focus-visible, .pg-picker-trigger[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: var(--clay-in), var(--ring); }
.pg-picker-trigger:disabled { cursor: not-allowed; opacity: .55; }
.pg-picker-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.pg-picker-copy strong { overflow: hidden; color: var(--fg); font-size: 13.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pg-picker-copy small { overflow: hidden; color: var(--faint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pg-chevron { width: 8px; height: 8px; flex: none; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.pg-picker-trigger[aria-expanded="true"] .pg-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.pg-picker-menu { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: 100%; max-height: min(320px, 48vh); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--clay); overscroll-behavior: contain; }
.pg-picker-menu[hidden] { display: none; }
.pg-picker-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.pg-picker-option:hover, .pg-picker-option:focus-visible { outline: none; background: var(--panel-2); }
.pg-picker-option[aria-selected="true"] { background: var(--primary); color: var(--primary-fg); }
.pg-picker-option[aria-selected="true"] small { color: var(--primary-fg); opacity: .8; }
.pg-picker-option[aria-selected="true"] .pg-option-check { color: var(--primary-fg); }
.pg-picker-option:disabled { cursor: not-allowed; opacity: .45; }
.pg-picker-option > span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.pg-picker-option strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pg-picker-option small { overflow: hidden; color: var(--faint); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.pg-option-check { visibility: hidden; flex: none; color: var(--accent); font-size: 14px; }
.pg-picker-option[aria-selected="true"] .pg-option-check { visibility: visible; }
.pg-messages { display: flex; min-height: 370px; max-height: 54vh; flex-direction: column; gap: 18px; padding: 26px; overflow-y: auto; overscroll-behavior: contain; }
.pg-welcome, .pg-empty { display: flex; min-height: 310px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; color: var(--muted); }
.pg-welcome strong, .pg-empty strong { color: var(--fg); font-size: 15px; }
.pg-welcome > span:last-child, .pg-empty > span { max-width: 360px; font-size: 12.5px; line-height: 1.55; }
.pg-welcome-mark { display: grid; width: 42px; height: 42px; margin-bottom: 7px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--accent); font-size: 12px; font-weight: 750; box-shadow: var(--clay-sm); }
.pg-empty .btn { margin-top: 8px; }
.pg-message { display: flex; max-width: min(84%, 680px); flex-direction: column; gap: 5px; }
.pg-message-user { align-self: flex-end; align-items: flex-end; }
.pg-message-assistant { align-self: flex-start; }
.pg-role { color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pg-bubble { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); overflow-wrap: anywhere; }
.pg-message-user .pg-bubble { border-color: var(--primary); background: var(--primary); color: var(--primary-fg); }
.pg-bubble p { margin: 0; white-space: pre-wrap; }
.pg-bubble img { display: block; width: auto; max-width: min(100%, 360px); max-height: 260px; margin-bottom: 10px; border-radius: 8px; object-fit: contain; }
.pg-compose { display: flex; flex-direction: column; gap: 10px; padding: 16px 26px 22px; border-top: 1px solid var(--line); background: var(--panel); border-radius: 0 0 var(--radius) var(--radius); }
.pg-input-wrap { padding: 6px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg-soft); box-shadow: var(--clay-in); }
.pg-input-wrap:focus-within { border-color: var(--line-strong, var(--line)); box-shadow: var(--clay-in); }
.pg-compose textarea { width: 100%; min-height: 68px; max-height: 220px; resize: vertical; padding: 10px 11px 6px; border: 0; background: transparent; color: var(--fg); font: inherit; line-height: 1.5; }
.pg-compose textarea:focus { outline: none; }
.pg-compose-actions { display: flex; align-items: center; gap: 9px; padding: 4px; }
.pg-attach-button { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.pg-attach-button:hover { border-color: var(--accent); color: var(--accent); }
.pg-attach-button[hidden] { display: none; }
.pg-hint { min-width: 0; flex: 1; color: var(--faint); font-size: 10.5px; }
.pg-send { min-width: 76px; }
.pg-attachment { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.pg-attachment[hidden] { display: none; }
.pg-attachment img { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; }
.pg-attachment span { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pg-attachment .icon-btn { display: grid; }
.pg-error { margin: 0; padding: 9px 11px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 12px; }
.pg-error[hidden] { display: none; }
.pg-typing { display: inline-flex; align-items: center; gap: 5px; padding: 14px 16px; }
.pg-typing span { width: 7px; height: 7px; border-radius: 999px; background: var(--muted); animation: pg-typing-bounce 1.2s infinite ease-in-out; }
.pg-typing span:nth-child(2) { animation-delay: .18s; }
.pg-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes pg-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pg-typing span { animation-duration: 2.4s; } }
.pg-send[disabled], .pg-compose .btn[disabled] { cursor: wait; opacity: .65; }

@media (max-width: 640px) {
	.pg-shell { width: 100%; }
	.pg-chat-head { align-items: center; padding: 18px 16px 16px; }
	.pg-chat-head .card-title { font-size: 19px; }
	.pg-chat-head .card-sub { font-size: 12px; }
	.pg-controls { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px 16px; }
	.pg-picker-trigger { min-height: 58px; }
	.pg-picker-menu { position: fixed; top: auto; right: 14px; bottom: 14px; left: 14px; width: auto; max-height: min(440px, 62vh); border-radius: 16px; box-shadow: var(--clay); }
	.pg-messages { min-height: 300px; max-height: 46vh; padding: 20px 16px; }
	.pg-welcome, .pg-empty { min-height: 260px; }
	.pg-message { max-width: 94%; }
	.pg-compose { padding: 12px 16px 16px; }
	.pg-hint { display: none; }
}

@media (max-width: 380px) {
	.pg-chat-head { gap: 10px; }
	.pg-chat-head .card-sub { display: none; }
	.pg-controls, .pg-compose { padding-inline: 12px; }
	.pg-messages { padding-inline: 12px; }
}

.md-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.md-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--card, var(--bg));
}
.md-card-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.md-card-name { font-size: 16px; font-weight: 650; color: var(--fg); line-height: 1.25; word-break: break-word; }
.md-card-id-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.md-card-id { min-width: 0; font-size: 12px; color: var(--faint); word-break: break-all; }
.md-copy {
	display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 5px 8px;
	border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted);
	font: inherit; font-size: 12px; cursor: pointer; flex: 0 0 auto;
}
.md-copy:hover { color: var(--fg); border-color: var(--faint); }
.md-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.md-io {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--bg);
}
.md-io-side { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md-io-out { justify-content: flex-end; }
.md-io-dir { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted, #8b93a1); }
.md-price { margin: 0; display: flex; flex-direction: column; }
.md-price-row {
	display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
	padding: 7px 0; border-top: 1px solid var(--line-soft);
}
.md-price-row:first-child { border-top: 0; }
.md-price dt { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #8b93a1); margin: 0; min-width: 0; line-height: 1.4; }
.md-price dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; text-align: right; }

.doc { padding: 0; }
.doc-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 232px;
	gap: 48px;
	align-items: start;
}
.doc-main { min-width: 0; max-width: 760px; }

.doc-hero { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc-eyebrow {
	display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em;
	text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.doc-h1 { margin: 0 0 12px; font-size: 34px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.doc-lead { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.doc-lead strong { color: var(--fg); font-weight: 600; }
.doc-base {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	margin-top: 20px; padding: 10px 12px;
	background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.doc-base-lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.doc-base-url { flex: 1; min-width: 160px; background: none; padding: 0; font-size: 14px; color: var(--fg); word-break: break-all; }

.doc-sec { padding: 26px 0; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 84px; }
.doc-sec:last-child { border-bottom: 0; }
.doc-h2 { margin: 0 0 12px; font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.doc-main p { margin: 0 0 14px; line-height: 1.7; color: var(--muted); }
.doc-main p:last-child { margin-bottom: 0; }
.doc-main p code, .doc-table code {
	background: var(--panel-2); border: 1px solid var(--line-soft);
	padding: .08em .4em; border-radius: 6px; font-size: .86em; color: var(--fg); word-break: break-word;
}
.doc-note { font-size: 13.5px; color: var(--faint); }
.doc-steps { margin: 0 0 16px; padding-left: 20px; }
.doc-steps li { margin: 0 0 8px; line-height: 1.7; color: var(--muted); }
.doc-steps li:last-child { margin-bottom: 0; }
.doc-steps li strong { color: var(--fg); }

.cb {
	margin: 4px 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	overflow: hidden; background: var(--bg-soft);
}
.cb-bar {
	display: flex; align-items: center; justify-content: space-between;
	padding: 8px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.cb-lang { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cb-copy {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px;
	background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.cb-copy:hover { background: var(--elev); color: var(--fg); }
.cb-copy.is-ok { color: var(--ok); border-color: var(--ok); }
.cb-copy-inline { flex: 0 0 auto; }
.cb-pre {
	margin: 0; padding: 14px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px; line-height: 1.65; color: var(--fg); white-space: pre; tab-size: 2;
}
.cb-pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.cb-pre::-webkit-scrollbar { height: 8px; }
.cb-pre::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

/* OpenCode Quickstart */
.qs-keyrow { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qs-keylbl { font-size: 13px; font-weight: 600; color: var(--fg); flex: 0 0 auto; }
.qs-keyinput { flex: 1 1 auto; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); color: var(--fg); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.qs-keyinput::placeholder { color: var(--faint); }
.qs-keyinput:focus { outline: none; border-color: var(--accent); }
.qs-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.qs-tab { flex: 1 1 auto; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.qs-tab:hover { color: var(--fg); }
.qs-tab.is-on { background: var(--panel); color: var(--accent); box-shadow: var(--clay, 0 1px 2px rgba(0,0,0,.12)); }
.qs-panel[hidden] { display: none; }
.qs-key { color: var(--accent); font-weight: 600; }
.qs-list { margin: 8px 0 0; padding-left: 20px; }
.qs-list li { margin: 0 0 6px; line-height: 1.6; color: var(--muted); }
.qs-list li:last-child { margin-bottom: 0; }

.verb {
	display: inline-block; padding: 3px 9px; border-radius: 7px;
	font-size: 11.5px; font-weight: 700; letter-spacing: .03em; font-family: ui-monospace, monospace;
}
.verb-post { background: var(--ok-soft); color: var(--ok); }
.verb-get  { background: var(--accent-soft); color: var(--accent); }
.verb-err  { background: var(--danger-soft); color: var(--danger); }

.doc-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px 0 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.doc-table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 13.5px; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc-table thead th { background: var(--panel-2); color: var(--faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table td.mono { word-break: break-all; color: var(--fg); }

.doc-toc { position: sticky; top: 84px; align-self: start; }
.doc-toc-title { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.doc-toc nav { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.doc-toc-link {
	padding: 5px 0 5px 14px; margin-left: -1px; font-size: 13px; color: var(--muted);
	border-left: 2px solid transparent; transition: color .15s, border-color .15s;
}
.doc-toc-link:hover { color: var(--fg); text-decoration: none; }
.doc-toc-link.is-on { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

@media (max-width: 980px) {
	.doc-grid { grid-template-columns: 1fr; gap: 0; }
	.doc-toc { display: none; }
}
@media (max-width: 640px) {
	.doc-h1 { font-size: 27px; }
	.doc-lead { font-size: 15px; }
	.doc-h2 { font-size: 18px; }
}

.card,
.prov-group,
.auth-card {
	box-shadow: var(--clay);
	border-radius: var(--radius);
}

.input,
.field input,
.field select,
.field textarea,
.sort-input {
	box-shadow: var(--clay-in);
	border-radius: var(--radius-sm);
}
.field input:focus,
.field select:focus,
.input:focus,
.sort-input:focus {
	box-shadow: var(--clay-in), var(--ring);
}

.btn {
	border-radius: var(--radius-sm);
	box-shadow: var(--clay-sm);
	transition: background 0.15s, color 0.15s, box-shadow 0.16s ease, transform 0.12s ease, border-color 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--clay); }
.btn:active { transform: translateY(1px); box-shadow: var(--clay-in); }
.btn-ghost { box-shadow: none; }
.btn-ghost:hover { box-shadow: var(--clay-sm); }

.pill { border-radius: 999px; box-shadow: var(--clay-in); }
.nav-link.is-on { box-shadow: var(--clay-in); }

@media (max-width: 640px) {
	body { font-size: 14px; }
	.head { min-height: 60px; padding: 10px 14px; align-items: center; }
	.head h1 { font-size: 16px; line-height: 1.3; }
	.content { padding: 20px 14px 44px; overflow-x: hidden; }
	.doc-h1 { font-size: 24px; }
	.doc-lead { font-size: 13.5px; line-height: 1.65; }
	.doc-h2 { font-size: 17px; }
	.doc-sec { padding: 22px 0; }
	.doc-main p { font-size: 13.5px; line-height: 1.7; }
	.doc-base { align-items: flex-start; padding: 10px; }
	.doc-base-url { min-width: 0; width: 100%; font-size: 12px; }
	.cb-pre { padding: 12px; font-size: 11.5px; line-height: 1.6; }
	.doc-table { min-width: 520px; font-size: 12px; }
	.doc-table th, .doc-table td { padding: 9px 10px; }
}

@media (max-width: 380px) {
	.head { padding-inline: 10px; }
	.content { padding-inline: 10px; }
	.doc-h1 { font-size: 22px; }
}

.package-hero {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	padding: 8px 2px 26px;
}
.package-hero h2, .payment-head h2, .package-empty h2 { margin: 4px 0 8px; font-size: 24px; line-height: 1.3; }
.package-hero p, .payment-head p, .package-empty p { max-width: 680px; margin: 0; color: var(--muted); }
.package-eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.package-secure { flex: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.package-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.package-card { gap: 14px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.package-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--clay); }
.package-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.package-card-head { display: flex; flex-direction: column; gap: 10px; }
.package-card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.package-tag { align-self: flex-start; padding: 5px 11px; border-radius: 999px; background: var(--primary); color: var(--primary-fg); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.package-price { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 0; }
.package-price-cur { color: var(--muted); font-size: 15px; font-weight: 600; }
.package-price-num { color: var(--fg); font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.package-quota { display: flex; align-items: baseline; gap: 7px; margin: 0; padding: 10px 0 0; }
.package-quota strong { font-size: 20px; line-height: 1; letter-spacing: -.03em; color: var(--accent); }
.package-quota span { color: var(--muted); font-size: 13px; }
.package-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 6px 0; padding: 14px 0 0; border-top: 1px solid var(--line-soft); }
.package-feats li { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.package-feats li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 999px; background-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 10px; background-repeat: no-repeat; background-position: center; }
.package-label { margin-top: auto; }
.package-card .hint { margin: 0; }
.package-cta { margin-top: 6px; padding-block: 11px; font-size: 14px; }
.package-empty { padding: 32px; text-align: center; }
.package-empty p { margin: 0 auto 20px; }
.payment-card { padding: 24px; }
.payment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.payment-body { display: grid; grid-template-columns: minmax(220px, 320px) minmax(240px, 1fr); gap: 28px; align-items: start; }
.payment-qr-col { display: flex; flex-direction: column; gap: 12px; }
.payment-qr { padding: 12px; border-radius: 16px; background: #fff; box-shadow: var(--clay-sm); }
.payment-qr img { display: block; width: 100%; height: auto; }
.payment-qr-dl { justify-content: center; }
.payment-summary { display: flex; flex-direction: column; gap: 4px; }
.payment-summary #check-payment { margin-top: 12px; }
.payment-summary small { margin-top: 8px; }
.payment-summary p { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.payment-summary span, .payment-summary small { color: var(--muted); }
.payment-summary strong { text-align: right; }
.payment-summary .payment-total { margin-top: 8px; padding: 16px; border: 0; border-radius: 12px; background: var(--panel-2); }
.payment-total strong { color: var(--accent); font-size: 18px; }

@media (max-width: 640px) {
	.package-hero { align-items: flex-start; flex-direction: column; gap: 14px; padding-bottom: 20px; }
	.package-hero h2, .payment-head h2, .package-empty h2 { font-size: 20px; }
	.package-grid { grid-template-columns: 1fr; }
	.package-card { padding: 18px; }
	.payment-card { padding: 16px; }
	.payment-head { margin-bottom: 18px; }
	.payment-body { grid-template-columns: 1fr; gap: 18px; }
	.payment-qr-col { width: min(100%, 320px); margin: 0 auto; }
	.payment-qr { width: 100%; }
	.payment-summary .payment-total { margin-top: 4px; }
}

/* Popup Informasi */
.info-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100vw;
	height: 100dvh;
	padding: 24px;
	box-sizing: border-box;
	background: rgba(6, 10, 8, 0.68);
	backdrop-filter: blur(3px);
	animation: info-fade 0.2s ease;
}

.info-modal[hidden] { display: none; }

.info-card {
	position: relative;
	width: 100%;
	max-width: 360px;
	margin-top: 38px;
	padding: 56px 28px 34px;
	background: #f4f1ea;
	color: #4a3f35;
	border-radius: 28px;
	text-align: center;
	box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
	animation: info-pop 0.24s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}

.info-bell {
	position: absolute;
	top: -38px;
	left: 50%;
	transform: translateX(-50%);
	width: 76px;
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #e0a92b;
	background: #f4f1ea;
	border: 4px solid #e6ddcb;
	border-radius: 50%;
}

.info-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: #e0483b;
	border-radius: 999px;
}

.info-title {
	margin: 0 0 14px;
	font-family: inherit;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #4b3c2d;
}

.info-body {
	margin: 0 0 26px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: #6a5e50;
}

.info-ok {
	width: min(100%, 280px);
	min-height: 52px;
	padding: 13px 28px 17px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: #078b68;
	border: 2px solid #3f3022;
	border-radius: 999px;
	box-shadow: 0 8px 0 #006b50;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.05s ease;
}

.info-ok:hover { filter: brightness(0.96); }
.info-ok:active { transform: translateY(5px); box-shadow: 0 3px 0 #006b50; }

@keyframes info-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes info-pop { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }

  .usd-note{font-weight:500;color:var(--muted);opacity:1;font-size:.82em;margin-left:.35em;white-space:nowrap}
  .hint-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:.25em .75em;margin-top:2px}
  .hint-row .hint{margin:0}
  .field .hint-row .usd-note{color:var(--fg);opacity:.85;margin-left:0}
.package-price-usd{display:block;margin-top:.25rem;font-size:.9rem;font-weight:600;opacity:.65}
.stat-usd{display:block;font-size:.85rem;font-weight:600;opacity:.62;margin-top:.15rem}

.topup-log { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.topup-log-item {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
	background: var(--panel-2); transition: border-color .15s ease, transform .05s ease;
}
.topup-log-item:hover { border-color: var(--line); }
.topup-log-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topup-log-amount { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; color: var(--fg); }
.topup-log-usd { font-size: 12px; color: var(--faint); }
.topup-log-usd .usd-note { margin-left: 0; opacity: 1; }
.topup-log-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; text-align: right; flex-shrink: 0; }
.topup-log-time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.topup-status {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
	font-size: 11px; font-weight: 700; letter-spacing: .05em; line-height: 1;
}
.topup-status::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.topup-status.is-paid { color: var(--ok); background: var(--ok-soft); }
.topup-status.is-pending { color: var(--warn); background: var(--warn-soft); }
.topup-status.is-failed { color: var(--faint); background: var(--line-soft); }
@media (max-width: 380px) {
	.topup-log-item { padding: 12px 13px; gap: 10px; }
	.topup-log-amount { font-size: 15px; }
	.topup-log-time { font-size: 12px; }
}

.pay-methods { border: 0; margin: 4px 0 0; padding: 0; min-width: 0; }
.pay-methods legend { padding: 0 0 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pay-opt { position: relative; display: block; cursor: pointer; }
.pay-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.pay-card {
	display: flex; flex-direction: column; gap: 8px; height: 100%;
	padding: 15px 16px; border: 1.5px solid var(--line-soft); border-radius: var(--radius-sm);
	background: var(--panel-2); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pay-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-name { font-size: 15.5px; font-weight: 650; color: var(--fg); letter-spacing: -0.01em; }
.pay-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.pay-tag { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.pay-check { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--line); position: relative; transition: border-color .15s ease; }
.pay-check::after { content: ""; position: absolute; inset: 3px; border-radius: 999px; background: var(--primary); transform: scale(0); transition: transform .15s ease; }
.pay-opt:hover .pay-card { border-color: var(--line); }
.pay-opt input:focus-visible + .pay-card { box-shadow: 0 0 0 3px var(--primary-soft, rgba(16,185,129,.25)); }
.pay-opt input:checked + .pay-card { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--panel-2)); }
.pay-opt input:checked + .pay-card .pay-check { border-color: var(--primary); }
.pay-opt input:checked + .pay-card .pay-check::after { transform: scale(1); }
.pay-note { margin: 4px 0 0; }
  .sb-net-warn { margin: 14px 0 4px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--danger); background: var(--danger-soft); color: var(--danger); font-size: 13.5px; line-height: 1.6; font-weight: 600; }
  .sb-net-warn b { font-weight: 800; }

.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.pay-actions .btn { flex: 1 1 200px; justify-content: center; text-align: center; min-height: 46px; }
.pay-actions-alt { background: var(--panel-2); border-color: var(--line); color: var(--fg); }
.pay-actions-alt:hover { background: var(--elev); border-color: var(--line); }
@media (max-width: 520px) {
	.pay-actions .btn { flex: 1 1 100%; }
}

/* Custom select + modal (progressive enhancement) */
.cs { position: relative; }
.cs-native { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.cs-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--fg); cursor: pointer; text-align: left; box-shadow: var(--clay-in); transition: border-color .15s ease, box-shadow .15s ease; }
.cs-trigger:hover { border-color: var(--elev); }
.cs-trigger[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-trigger:disabled { opacity: .55; cursor: not-allowed; }
.cs-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-value.is-placeholder { color: var(--faint); }
.cs-caret { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -3px; transition: transform .18s ease; }
.cs-trigger[aria-expanded="true"] .cs-caret { transform: rotate(-135deg); margin-top: 3px; }

.cs-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, #000 55%, transparent); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s ease; }
.cs-overlay.is-open { opacity: 1; visibility: visible; }
.cs-panel { display: flex; flex-direction: column; width: 100%; max-width: 460px; max-height: min(72vh, 580px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--clay); overflow: hidden; transform: translateY(10px) scale(.98); transition: transform .2s ease; }
.cs-overlay.is-open .cs-panel { transform: none; }
.cs-grab { display: none; }
.cs-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cs-title { font-weight: 600; font-size: 14px; }
.cs-close { margin-left: auto; display: flex; align-items: center; justify-content: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.cs-close:hover { color: var(--fg); background: var(--elev); }
.cs-search-wrap { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.cs-search { width: 100%; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--fg); }
.cs-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cs-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; color: var(--fg); font-size: 14px; }
.cs-opt:hover, .cs-opt.is-active { background: var(--panel-2); }
.cs-opt-label { flex: 1; min-width: 0; }
.cs-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); position: relative; }
.cs-opt[aria-selected="true"] .cs-dot { border-color: var(--accent); }
.cs-opt[aria-selected="true"] .cs-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.cs-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.cs-confirm .cs-panel { max-width: 400px; }
.cs-confirm-body { padding: 22px 22px 6px; }
.cs-confirm-title { font-weight: 600; font-size: 17px; margin: 0 0 8px; }
.cs-confirm-msg { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.cs-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 18px 22px 22px; }

@media (max-width: 640px) {
	.cs-overlay { align-items: flex-end; padding: 0; }
	.cs-panel { max-width: none; max-height: 82vh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
	.cs-overlay.is-open .cs-panel { transform: none; }
	.cs-grab { display: block; width: 40px; height: 4px; border-radius: 999px; background: var(--elev); margin: 10px auto 0; }
	.cs-confirm .cs-panel { border-radius: 18px 18px 0 0; }
	.cs-confirm-actions { flex-direction: column-reverse; }
	.cs-confirm-actions .btn { width: 100%; }
}