:root {
  color-scheme: dark;
  --bg: #101012;
  --panel: #18181b;
  --panel-hover: #202024;
  --border: #2a2a30;
  --muted: #95959f;
  --text: #eeeef1;
  --accent: #f05252;
  --accent-soft: #f0525213;
  --green: #70c8a0;
  --blue: #70a0c8;
  --amber: #c8a070;
  --font: Inter, system-ui, sans-serif;
  --display: 'Space Grotesk', Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, .brand { font-family: var(--display); }
h1 { font-size: 28px; letter-spacing: -1px; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
::selection { background: #f052524d; }
::placeholder { color: #85858f; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; vertical-align: middle; flex-shrink: 0; }

/* Sidebar */
.sidebar {
  width: 248px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--border);
  background: #141416;
  display: flex;
  flex-direction: column;
  z-index: 60;
  overflow-y: auto;
}
.brand {
  height: 88px;
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 22px;
  letter-spacing: 3px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}
.brand img {
  width: 36px;
  height: 40px;
  object-fit: cover;
  border-radius: 7px;
}
.brand-labs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 5px;
  margin-top: 4px;
  color: #bcbcc4;
}
.brand-square {
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-right: 2px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 14px 14px;
  padding: 11px 10px;
  background: #1b1b1f;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.workspace small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.workspace-icon { color: var(--accent); font-size: 14px; }
.tiny-label {
  font-size: 7px;
  letter-spacing: .6px;
  border: 1px solid #44444c;
  color: #a9a9b3;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: auto;
  line-height: 1.4;
  white-space: nowrap;
}
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 10px;
  padding: 9px 11px;
  background: #1a1a1e;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}
.sidebar-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 12px;
  min-width: 0;
}
.sidebar nav { padding: 0 12px; flex: 1; }
.nav-label {
  font-size: 9px;
  font-weight: 650;
  color: #797981;
  letter-spacing: 1.5px;
  padding: 14px 10px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  margin: 2px 0;
  font-size: 12px;
  color: #a5a5af;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: #202024; color: white; }
.nav-item.active {
  background: var(--accent-soft);
  color: #ff7472;
  box-shadow: inset 2px 0 var(--accent);
}
.nav-ico { width: 18px; text-align: center; font-size: 12px; opacity: .85; }
.nav-count {
  margin-left: auto;
  font-size: 10px;
  background: #2a2a30;
  color: #a8a8b1;
  padding: 2px 7px;
  border-radius: 5px;
}
.nav-item.active .nav-count {
  background: #f0525230;
  color: #ff9492;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 16px 16px 20px;
  border-top: 1px solid var(--border);
}
.back-panel {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.back-panel:hover { background: var(--panel-hover); color: white; }
.sidebar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  padding: 0 10px;
}
.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px #70c8a080;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Shell */
.shell {
  margin-left: 248px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  background: #141416cc;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}
.icon-button:hover { background: var(--panel-hover); color: white; }
.mobile-menu { display: none; }
.search-bar {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
}
.search-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 13px;
  min-width: 0;
}
.search-bar kbd {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #797981;
}
.top-actions { display: flex; gap: 8px; margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--panel-hover); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: white;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 7px 12px; font-size: 11px; }

main {
  flex: 1;
  padding: 28px 28px 48px;
  max-width: 1100px;
}

.page-heading { margin-bottom: 24px; }
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.8px;
  color: #797981;
  margin-bottom: 8px;
}
.page-heading h1 { margin-bottom: 6px; }
.page-heading p { color: var(--muted); font-size: 14px; max-width: 560px; }

/* Status cards — Zero Two style */
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .5;
}
.stat-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.2px;
  color: #797981;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat-value.mono { font-size: 18px; letter-spacing: -.3px; }
.stat-sub {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #232327;
  color: #a8a8b1;
  border: 1px solid #35353c;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: .3px;
}
.pill.green { background: #183329; color: #84d4b1; border-color: #305445; }
.pill.amber { background: #352d1e; color: #debf7e; border-color: #50442c; }
.pill.method-get { background: #1a3a2a; color: #70c8a0; border-color: #2a5a40; }
.pill.method-post { background: #1a2a3a; color: #70a0c8; border-color: #2a4a6a; }
.pill.method-put, .pill.method-patch { background: #3a2a1a; color: #c8a070; border-color: #5a4a2a; }
.pill.method-delete { background: #3a1a1a; color: #c87070; border-color: #5a2a2a; }

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #1a1a1e;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.notice code {
  color: #f18b85;
  font-size: 11px;
  background: #121214;
  padding: 1px 5px;
  border-radius: 3px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--panel-hover); color: var(--text); }
.chip.active {
  background: var(--accent-soft);
  color: #ff7472;
  border-color: #f0525244;
}
.chip span {
  font-size: 10px;
  background: #2a2a30;
  padding: 2px 6px;
  border-radius: 4px;
  color: #a8a8b1;
}
.chip.active span { background: #f0525230; color: #ff9492; }

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.endpoint-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color .15s;
}
.endpoint-card:hover { border-color: #3a3a42; }
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.endpoint-path {
  font-size: 14px;
  font-weight: 600;
  color: #f18b85;
  letter-spacing: -.2px;
  flex: 1;
  min-width: 0;
  word-break: break-all;
}
.endpoint-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.55;
}
.endpoint-example {
  background: #121214;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.endpoint-example-label {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.2px;
  color: #797981;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.endpoint-example pre {
  margin: 0;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
  color: #c8c8d0;
  white-space: pre-wrap;
  word-break: break-all;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}
.copy-btn:hover { color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty-state h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }
.loading { color: var(--muted); padding: 24px; text-align: center; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.site-footer a:hover { color: var(--accent); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e1e22;
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  box-shadow: 0 8px 32px #0006;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: #000a;
  z-index: 55;
}

@media (max-width: 980px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .shell { margin-left: 0; }
  .mobile-menu { display: grid; }
  main { padding: 20px 16px 40px; }
  .status-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Downloads playground */
.dl-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.dl-tab{padding:8px 14px;border-radius:8px;background:var(--panel);border:1px solid var(--border);color:var(--muted);font-size:12px;font-weight:500}
.dl-tab:hover{background:var(--panel-hover);color:var(--text)}
.dl-tab.active{background:var(--accent-soft);color:#ff7472;border-color:#f0525244}
.card-block{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:18px 20px;margin-bottom:16px}
.playground-header{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:550}
.field span{color:#c8c8d0}
.field small{font-weight:400;color:var(--muted);font-size:11px}
.field input{background:#121214;border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-size:13px;outline:none;color:var(--text)}
.field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f0525214}
.playground-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.built-url pre,.response-body{margin:0;background:#121214;border:1px solid var(--border);border-radius:8px;padding:12px 14px;font-size:12px;line-height:1.5;color:#c8c8d0;overflow-x:auto;white-space:pre-wrap;word-break:break-all;max-height:420px}
.endpoint-example-label{font-size:9px;font-weight:650;letter-spacing:1.2px;color:#797981;text-transform:uppercase;display:block;margin-bottom:8px}
.response-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.usage-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
@media(max-width:700px){.field-grid{grid-template-columns:1fr}}

/* Collapsible nav groups */
.nav-group{margin:4px 0}
.nav-group-toggle{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:10px 12px;border-radius:7px;margin:2px 0;
  font-size:12px;font-weight:600;color:#c8c8d0;text-align:left;
  transition:background .15s,color .15s;
}
.nav-group-toggle:hover{background:#202024;color:white}
.nav-group.open .nav-group-toggle{
  background:var(--accent-soft);color:#ff7472;
  box-shadow:inset 2px 0 var(--accent);
}
.nav-group-title{flex:1}
.nav-chevron{
  margin-left:auto;font-size:14px;line-height:1;
  transition:transform .2s ease;color:#797981;
  display:inline-block;
}
.nav-group.open .nav-chevron{transform:rotate(90deg);color:#ff7472}
.nav-group-items{
  padding:2px 0 6px 8px;
  border-left:1px solid #2a2a30;
  margin:0 0 4px 16px;
}
.nav-item.nav-sub{padding:8px 10px;font-size:11.5px;margin:1px 0}
.nav-item.nav-sub .nav-ico{font-size:11px;opacity:.9}


/* ARKON LABS — API docs responsive hardening */
html, body { max-width: 100%; overflow-x: clip; }
main, .shell, .topbar, .endpoint-card, .card-block, .api-card,
.status-grid, .field-grid { min-width: 0; }
pre, code, .endpoint-path { max-width: 100%; overflow-wrap: anywhere; }
input, textarea, select, button { max-width: 100%; }

@media (max-width: 768px) {
  .topbar { padding: 0 10px; gap: 8px; }
  .search-bar { min-width: 0; width: auto; flex: 1 1 auto; }
  .search-bar input { min-width: 0; }
  .top-actions { flex-shrink: 0; gap: 5px; }
  .top-actions .btn { padding-left: 8px; padding-right: 8px; }
  main { width: 100%; max-width: 100%; }
  .endpoint-card, .card-block { width: 100%; overflow: hidden; }
  .endpoint-header { min-width: 0; }
  .endpoint-example pre, .built-url pre, .response-body { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 420px) {
  .topbar { padding-left: 7px; padding-right: 7px; }
  .top-actions .btn:first-child { display: none; }
  main { padding-left: 12px; padding-right: 12px; }
  .endpoint-card, .card-block { padding-left: 14px; padding-right: 14px; }
}
