/* Docs layout — dark theme matching the Shoppable Lookbook landing page */
body.docs-page {
  --docs-ink: var(--text-primary, #f5f5f7);
  --docs-ink-soft: var(--text-secondary, #9ba1a6);
  --docs-ink-faint: #6b7178;
  --docs-bg: var(--surface-deep, #121314);
  --docs-sidebar: var(--surface-container-low, #1a1c1e);
  --docs-content: var(--surface, #121416);
  --docs-line: rgba(255, 255, 255, 0.08);
  --docs-line-soft: rgba(255, 255, 255, 0.05);
  --docs-brand: var(--primary-container, #ffb800);
  --docs-brand-soft: rgba(255, 184, 0, 0.14);
  --docs-warn-bg: rgba(255, 180, 171, 0.08);
  --docs-warn-border: rgba(255, 180, 171, 0.35);
  --docs-info-bg: rgba(59, 89, 255, 0.1);
  --docs-info-border: rgba(59, 89, 255, 0.35);
  --docs-sidebar-w: 260px;
  color: var(--docs-ink);
  background: var(--docs-bg);
}

body.docs-page .site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 20, 22, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--docs-line);
}

.docs-shell {
  display: grid;
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  align-items: stretch;
}

.docs-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--docs-sidebar);
  border-right: 1px solid var(--docs-line);
  padding: 28px 18px 48px;
}

.docs-sidebar-head {
  padding: 0 10px 18px;
  border-bottom: 1px solid var(--docs-line);
  margin-bottom: 18px;
}

.docs-sidebar-kicker {
  display: block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--docs-ink-faint);
  margin-bottom: 6px;
}

.docs-sidebar-title {
  margin: 0;
  font-family: var(--font-display, Manrope, sans-serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--docs-ink);
}

.docs-sidebar-search {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--docs-line);
  border-radius: 8px;
  background: var(--surface-container, #1e2022);
  color: var(--docs-ink);
  font: inherit;
  font-size: 13px;
}

.docs-sidebar-search::placeholder { color: var(--docs-ink-faint); }
.docs-sidebar-search:focus {
  outline: none;
  border-color: var(--docs-brand);
  box-shadow: 0 0 0 3px var(--docs-brand-soft);
}

.docs-nav-group + .docs-nav-group { margin-top: 22px; }
.docs-nav-group-label {
  display: block;
  padding: 0 10px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--docs-ink-faint);
}

.docs-nav { display: flex; flex-direction: column; gap: 2px; }
.docs-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--docs-ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  transition: background .15s ease, color .15s ease;
}
.docs-nav a:hover { background: rgba(255,255,255,.04); color: var(--docs-ink); }
.docs-nav a.is-active {
  background: var(--docs-brand-soft);
  color: var(--docs-brand);
  font-weight: 600;
}

.docs-sidebar-mobile-toggle {
  display: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--docs-line);
  background: var(--docs-sidebar);
  color: var(--docs-ink);
  padding: 14px 18px;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.docs-main {
  background: var(--docs-content);
  min-width: 0;
}

.docs-main-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px 96px;
}

.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--docs-ink-faint);
  margin-bottom: 18px;
}
.docs-breadcrumb a { color: var(--docs-ink-soft); }
.docs-breadcrumb a:hover { color: var(--docs-brand); }
.docs-breadcrumb-sep { opacity: .5; }

.docs-intro h1 {
  margin: 0 0 12px;
  font-family: var(--font-display, Manrope, sans-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--docs-ink);
}

.docs-intro-lead {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--docs-ink-soft);
  max-width: 42rem;
}

.docs-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.docs-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--docs-line);
  background: var(--surface-container-low, #1a1c1e);
  font-size: 12px;
  font-weight: 600;
  color: var(--docs-ink-soft);
}

.docs-section {
  padding-top: 56px;
  margin-top: 8px;
  border-top: 1px solid var(--docs-line-soft);
}
.docs-section:first-of-type { border-top: 0; margin-top: 40px; padding-top: 0; }

.docs-section-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--docs-brand);
}

.docs-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-display, Manrope, sans-serif);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--docs-ink);
}

.docs-section h3 {
  margin: 28px 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--docs-ink);
}

.docs-section p,
.docs-section li {
  color: var(--docs-ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.docs-section p { margin: 0 0 14px; }
.docs-section ul,
.docs-section ol { margin: 0 0 16px; padding-left: 1.2em; }
.docs-section li + li { margin-top: 6px; }
.docs-section a { color: var(--docs-brand); text-decoration: underline; text-underline-offset: 2px; }
.docs-section a:hover { opacity: .9; }
.docs-section code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,.06);
  color: var(--primary, #ffdca1);
}

.docs-steps { list-style: none; padding: 0; margin: 0 0 18px; counter-reset: docs-step; }
.docs-steps > li {
  position: relative;
  padding: 16px 16px 16px 56px;
  border: 1px solid var(--docs-line);
  border-radius: 12px;
  background: var(--surface-container-low, #1a1c1e);
  counter-increment: docs-step;
}
.docs-steps > li + li { margin-top: 10px; }
.docs-steps > li::before {
  content: counter(docs-step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--docs-brand-soft);
  color: var(--docs-brand);
  font-weight: 800;
  font-size: 13px;
}
.docs-steps > li > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--docs-ink);
  font-size: 15px;
}
.docs-steps > li > p,
.docs-steps > li > ul { margin: 0; }

.docs-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--docs-info-border);
  background: var(--docs-info-bg);
  margin: 18px 0;
}
.docs-callout p { margin: 0; color: var(--docs-ink); }
.docs-callout-warn {
  border-color: var(--docs-warn-border);
  background: var(--docs-warn-bg);
}
.docs-callout-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,.08);
  color: var(--docs-ink);
}

.docs-table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.docs-table th,
.docs-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--docs-line);
  color: var(--docs-ink-soft);
}
.docs-table th {
  color: var(--docs-ink);
  font-weight: 700;
  background: var(--surface-container-low, #1a1c1e);
}

.docs-faq details {
  border: 1px solid var(--docs-line);
  border-radius: 12px;
  background: var(--surface-container-low, #1a1c1e);
  padding: 0 16px;
}
.docs-faq details + details { margin-top: 10px; }
.docs-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 700;
  color: var(--docs-ink);
}
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq details[open] summary { border-bottom: 1px solid var(--docs-line-soft); margin-bottom: 10px; }
.docs-faq details p { padding-bottom: 14px; }

.docs-cta-card {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--docs-line);
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(255,184,0,.12), transparent 60%),
    var(--surface-container-low, #1a1c1e);
}
.docs-cta-card h2 { margin-top: 0; }
.docs-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.docs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
}
.docs-btn-primary {
  background: var(--primary-container, #ffb800);
  color: var(--on-primary-container, #412d00) !important;
}
.docs-btn-secondary {
  border: 1px solid var(--docs-line);
  color: var(--docs-ink) !important;
  background: transparent;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--docs-brand);
  color: #111;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (max-width: 960px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar-mobile-toggle { display: block; }
  .docs-sidebar {
    display: none;
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--docs-line);
  }
  .docs-shell.docs-sidebar-open .docs-sidebar { display: block; }
  .docs-main-inner { padding: 32px 20px 72px; }
}
