/* Threll Developer Docs — shared layout & components
   Built on the Threll Design System (colors_and_type.css) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --docs-sidebar-w: 268px;
  --docs-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --code-bg: hsl(224 71.4% 4.1%);
  --code-panel: hsl(222 47% 8.5%);
  --code-border: hsl(217 33% 16%);
  --code-fg: hsl(214 32% 91%);
  --code-muted: hsl(218 11% 55%);
  --code-string: #bef264;   /* lime-300 */
  --code-key: #c4b5fd;      /* violet-300 */
  --code-keyword: #93c5fd;  /* blue-300 */
  --code-number: #fcd34d;   /* amber-300 */
  --code-comment: hsl(218 11% 50%);
}

html { scroll-padding-top: 24px; }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--docs-sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
  margin-bottom: 24px;
  text-decoration: none;
  color: var(--foreground);
}
.sidebar-brand img { height: 26px; display: block; }
.sidebar-brand .brand-divider {
  width: 1px; height: 18px; background: var(--border);
}
.sidebar-brand .brand-suffix {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.01em;
}

.sidebar-search { position: relative; }
.sidebar-search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground);
}
.sidebar-search input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sidebar-search input:focus {
  border-color: var(--brand-purple-500);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}
.sidebar-search input::placeholder { color: var(--muted-foreground); }

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

.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0 8px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 450;
  color: hsl(220 9% 36%);
  text-decoration: none;
  padding: 7px 8px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--accent); color: var(--foreground); }
.nav-link[aria-current="page"] {
  background: hsl(270 95% 97%);
  color: var(--brand-purple-600);
  font-weight: 600;
}
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
.nav-sub .nav-link {
  font-size: 13px;
  padding: 5px 8px 5px 18px;
  color: var(--muted-foreground);
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-left: 12px;
}
.nav-sub .nav-link:hover { color: var(--foreground); border-left-color: hsl(220 9% 70%); }

.nav-hidden { display: none; }

/* ── Global search results ───────────────────────────────── */
.search-results { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.search-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.12s;
}
.search-result:hover { background: var(--accent); }
.search-result .sr-text { display: flex; flex-direction: column; min-width: 0; }
.search-result .sr-title {
  font-size: 13px;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result .sr-parent {
  font-size: 10.5px;
  color: var(--muted-foreground);
  letter-spacing: 0.02em;
}
.search-empty { font-size: 13px; color: var(--muted-foreground); padding: 8px; }

/* ── Sidebar as explorer master list ─────────────────────── */
.sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius);
  margin-bottom: 2px;
  transition: background 0.12s, color 0.12s;
}
.sidebar-back:hover { background: var(--accent); color: var(--foreground); }
.sidebar-back svg { transition: transform 0.12s; }
.sidebar-back:hover svg { transform: translateX(-2px); }
.sidebar-section-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  padding: 4px 8px 2px;
}
.nav-link--head {
  font-weight: 600;
  color: var(--foreground);
  cursor: default;
}
.nav-explorer { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
.nav-exp-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 12px 8px 4px 12px;
}
.nav-exp-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 5px 8px 5px 12px;
  margin-left: 12px;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.nav-exp-link:hover { color: var(--foreground); border-left-color: hsl(220 9% 70%); }
.nav-exp-link[aria-current="page"] {
  background: hsl(270 95% 97%);
  color: var(--brand-purple-600);
  font-weight: 600;
  border-left-color: var(--brand-purple-500);
}
.nav-exp-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-method {
  flex-shrink: 0;
  font-family: var(--docs-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 4px;
  padding: 2px 4px;
  line-height: 1;
}
.navmethod--get { background: var(--brand-green-100); color: var(--brand-green-600); }
.navmethod--post { background: var(--brand-blue-100); color: var(--brand-blue-600); }

/* ── Main / content ──────────────────────────────────────── */
.main { flex: 1; min-width: 0; }

.content {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 48px 120px;
}
.content--wide { max-width: 1280px; }

/* Prose */
.overline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-purple-600);
  margin-bottom: 10px;
}
.content h1 {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  text-wrap: pretty;
}
.content h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 56px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 40px; }
.content h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 10px;
}
.content h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.content p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: hsl(220 15% 22%);
  text-wrap: pretty;
}
.content ul, .content ol {
  margin: 0 0 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.content li { font-size: 15px; line-height: 1.65; color: hsl(220 15% 22%); }
.content a { color: var(--brand-violet-500); text-decoration: none; }
.content a:hover { color: #6d28d9; text-decoration: underline; }

code.inline {
  font-family: var(--docs-mono);
  font-size: 0.86em;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.5px 5px;
  color: hsl(224 50% 20%);
  white-space: nowrap;
}

/* ── Badges & pills ──────────────────────────────────────── */
.method {
  display: inline-flex;
  align-items: center;
  font-family: var(--docs-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 3px 10px;
}
.method--get  { background: var(--brand-green-100); color: var(--brand-green-600); }
.method--post { background: var(--brand-blue-100); color: var(--brand-blue-600); }

.delivery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 9999px;
  padding: 3px 10px;
}
.delivery--sync  { background: var(--brand-blue-50); color: var(--brand-blue-600); border: 1px solid var(--brand-blue-100); }
.delivery--async { background: var(--brand-green-50); color: var(--brand-green-600); border: 1px solid var(--brand-green-100); }
.delivery .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-required {
  font-size: 10.5px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border-radius: 9999px;
  padding: 1.5px 8px;
}
.badge-optional {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 9999px;
  padding: 1.5px 8px;
}

/* ── Endpoint header row ─────────────────────────────────── */
.endpoint-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 9px 14px;
  margin: 14px 0 18px;
}
.endpoint-line .path {
  font-family: var(--docs-mono);
  font-size: 13.5px;
  color: var(--foreground);
  word-break: break-all;
}
.endpoint-line .path em {
  font-style: normal;
  color: var(--brand-purple-600);
}

/* ── Field list (params / payload) ───────────────────────── */
.field-list {
  border-top: 1px solid var(--border);
  margin: 10px 0 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border);
}
.field-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.field-name {
  font-family: var(--docs-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
}
.field-type {
  font-family: var(--docs-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}
.field-desc { font-size: 13.5px; line-height: 1.6; color: hsl(220 9% 36%); }
.field-desc p { font-size: 13.5px; margin-bottom: 4px; }

/* ── Tables ──────────────────────────────────────────────── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 13.5px;
}
.docs-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.docs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
  color: hsl(220 15% 22%);
}
.docs-table td:first-child { white-space: nowrap; }
.docs-table tr:nth-child(even) td { background: hsl(220 14% 98%); }
.docs-table code, td > code {
  font-family: var(--docs-mono);
  font-size: 12.5px;
  background: var(--muted);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ── Callouts ────────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 12px;
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  margin: 18px 0 22px;
  font-size: 14px;
  line-height: 1.6;
}
.callout svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.callout p { font-size: 14px; margin: 0; }
.callout--info { background: var(--brand-blue-50); border: 1px solid var(--brand-blue-100); }
.callout--info svg { color: var(--brand-blue-600); }
.callout--warn { background: #fffbeb; border: 1px solid #fde68a; }
.callout--warn svg { color: #b45309; }
.callout--tip { background: var(--brand-lime-50); border: 1px solid #d9f99d; }
.callout--tip svg { color: #4d7c0f; }

/* ── Code blocks ─────────────────────────────────────────── */
.code-block {
  background: var(--code-bg);
  border-radius: var(--radius-2xl);
  margin: 16px 0 24px;
  overflow: hidden;
  border: 1px solid var(--code-border);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--code-border);
  background: var(--code-panel);
}
.code-title {
  font-family: var(--docs-mono);
  font-size: 12px;
  color: var(--code-muted);
  margin-right: auto;
}
.code-tab {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--code-muted);
  background: transparent;
  border: none;
  border-radius: 9999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.code-tab:hover { color: var(--code-fg); }
.code-tab[aria-selected="true"] {
  background: hsl(217 33% 18%);
  color: white;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--code-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  padding: 4px 9px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.copy-btn:hover { color: white; background: hsl(217 33% 18%); }

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--docs-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--code-fg);
  tab-size: 2;
}
.code-block pre::-webkit-scrollbar { height: 6px; }
.code-block pre::-webkit-scrollbar-thumb { background: var(--code-border); border-radius: 4px; }
.code-panel-body[hidden] { display: none; }

.tok-str { color: var(--code-string); }
.tok-key { color: var(--code-key); }
.tok-kw  { color: var(--code-keyword); }
.tok-num { color: var(--code-number); }
.tok-com { color: var(--code-comment); font-style: italic; }
.tok-flag { color: #7dd3fc; }

/* ── Two-column reference layout ─────────────────────────── */
.ref-group-head {
  padding: 44px 0 4px;
  border-top: 2px solid var(--foreground);
  margin-top: 40px;
}
.ref-group-head h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-top: none;
  padding-top: 0;
  margin: 0 0 6px;
}
.ref-group-head p { color: var(--muted-foreground); max-width: 620px; }


.ref-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.ref-section:first-of-type { border-top: none; }
.ref-prose { min-width: 0; }
.ref-prose h2 { border-top: none; padding-top: 0; margin-top: 0; }
.ref-prose h3 { margin-top: 0; }
.ref-code { min-width: 0; }
.ref-code-sticky { position: sticky; top: 24px; }
.ref-code .code-block:first-child { margin-top: 0; }

@media (max-width: 1080px) {
  .ref-section { grid-template-columns: 1fr; gap: 8px; }
  .ref-code-sticky { position: static; }
}

/* ── Cards (home page) ───────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}
.docs-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  padding: 24px;
  text-decoration: none;
  color: var(--foreground);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.docs-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-color: hsl(214 32% 88%);
}
.docs-card .card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.docs-card .card-icon svg {
  width: 18px;
  height: 18px;
}
.docs-card h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 600; margin: 0; }
.docs-card p { font-size: 13.5px; line-height: 1.55; color: var(--muted-foreground); margin: 0; }
.docs-card .card-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-purple-600);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Step list for guides */
.steps { counter-reset: step; margin: 20px 0; }
.step {
  display: flex;
  gap: 16px;
  padding-bottom: 4px;
}
.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--foreground);
  color: white;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.step-body { flex: 1; min-width: 0; padding-bottom: 18px; }
.step:not(:last-child) .step-body { border-bottom: 1px dashed var(--border); margin-bottom: 18px; }
.step-body h3 { margin-top: 2px; }

/* Event timeline (end-to-end guide) */
.timeline { margin: 20px 0 28px; border-left: 2px solid var(--border); padding-left: 20px; display: flex; flex-direction: column; gap: 18px; }
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -25.5px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--brand-purple-500);
  outline: 3px solid white;
}
.tl-item.tl-sync::before { background: var(--brand-blue-600); }
.tl-item.tl-async::before { background: var(--brand-green-600); }
.tl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.tl-head code { font-family: var(--docs-mono); font-size: 13px; font-weight: 600; }
.tl-item p { font-size: 13.5px; margin: 0; color: var(--muted-foreground); }

/* Next-steps footer links */
.next-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
}
@media (max-width: 720px) { .next-steps { grid-template-columns: 1fr; } }

/* Page footer nav */
.page-end { margin-top: 64px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 13px; color: var(--muted-foreground); }

/* ── Reference explorer (single-detail pane) ─────────────── */
.explorer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 52px 56px 120px;
}
.doc-item[hidden] { display: none; }
.doc-item > .overline { margin-bottom: 10px; }
.doc-item > h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin-bottom: 12px;
}
.doc-item .item-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 4px;
  text-wrap: pretty;
}
.doc-item h2 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 38px 0 10px;
}
.doc-item h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin: 26px 0 8px;
}
.doc-item p { font-size: 15px; line-height: 1.7; margin-bottom: 14px; color: hsl(220 15% 22%); text-wrap: pretty; }
.doc-item ul, .doc-item ol { margin: 0 0 16px 22px; display: flex; flex-direction: column; gap: 7px; }
.doc-item li { font-size: 15px; line-height: 1.65; color: hsl(220 15% 22%); }
.doc-item a { color: var(--brand-violet-500); text-decoration: none; }
.doc-item a:hover { color: #6d28d9; text-decoration: underline; }

/* Scope/meta line under an item title */
.item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.item-meta .scope {
  font-family: var(--docs-mono);
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.hint {
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 9999px;
  padding: 2px 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.hint--read { color: var(--brand-green-600); background: var(--brand-green-50); border-color: var(--brand-green-100); }
.hint--destructive { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.hint--idempotent { color: var(--muted-foreground); background: var(--muted); border-color: var(--border); }
.hint--open { color: var(--brand-blue-600); background: var(--brand-blue-50); border-color: var(--brand-blue-100); }

/* Prev/next within the explorer detail */
.item-end {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.item-end a { color: var(--brand-violet-500); text-decoration: none; }

@media (max-width: 640px) {
  .explorer { padding: 40px 22px 96px; }
}

.mobile-navbar { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  body {
    flex-direction: column;
  }
  .mobile-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .mobile-navbar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  .mobile-navbar-brand img {
    height: 24px;
    display: block;
  }
  .mobile-nav-toggle {
    appearance: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground);
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-nav-toggle:hover {
    background: var(--accent);
  }
  .mobile-nav-toggle svg {
    width: 22px;
    height: 22px;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(320px, 86vw);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 60;
    box-shadow: 0 0 0 1px var(--border);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 50;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar-backdrop[hidden] {
    display: block;
  }
  .main {
    width: 100%;
  }
  .content {
    padding: 32px 20px 96px;
  }
  .explorer {
    padding: 32px 20px 96px;
  }
}
