:root {
  color-scheme: dark;
  --bg: #14171b;
  --sidebar-bg: #171a1f;
  --panel: #1d2127;
  --panel-2: #232830;
  --line: #303641;
  --line-strong: #414957;
  --text: #f7f8fa;
  --body: #c8ced8;
  --muted: #8f98a7;
  --accent: #e7b43c;
  --accent-strong: #f4c65a;
  --accent-soft: #332b1c;
  --sidebar: 286px;
  --toc: 218px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
button, input { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--text);
  color: #111;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
}
.sidebar-header { padding: 24px 20px 18px; border-bottom: 1px solid var(--line); }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 20px;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { display: grid; gap: 3px; min-width: 0; }
.brand strong { font-family: "Manrope", sans-serif; font-size: 13px; line-height: 1.3; }
.brand small { color: var(--muted); font-size: 12px; }
.search-trigger {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #12151a;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.search-trigger:hover, .search-trigger:focus-visible { border-color: var(--line-strong); outline: none; color: var(--body); }
kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #b5bdc9;
  font-size: 10px;
}
.sidebar-scroll { overflow: auto; padding: 22px 14px 28px; }
.nav-group { margin: 0 0 24px; }
.nav-group-title {
  margin: 0 10px 8px;
  color: #727c8c;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.nav-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #aab2bf;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}
.nav-item:hover { background: #20242b; color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-icon {
  width: 18px;
  display: grid;
  place-items: center;
  color: #7f8998;
  font-size: 10px;
  font-weight: 700;
}
.nav-item.active .nav-icon { color: var(--accent-strong); }
.sidebar-footer { padding: 14px; border-top: 1px solid var(--line); }
.sidebar-footer > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.sidebar-footer > a:hover { background: var(--panel); }
.sidebar-footer span { display: grid; gap: 3px; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer small { color: var(--muted); font-size: 11px; }
.sidebar-footer .open-lms { margin-top: 6px; border: 1px solid #5f4b20; color: var(--accent-strong); font-size: 12px; font-weight: 700; }

.page { min-height: 100vh; margin-left: var(--sidebar); }
.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgb(20 23 27 / 94%);
  backdrop-filter: blur(12px);
}
.product-tabs { display: flex; align-items: stretch; gap: 24px; height: 100%; }
.product-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.product-tabs a:hover { color: var(--text); }
.product-tabs a.active { color: var(--text); }
.product-tabs a.active::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
}
.staging-label {
  padding: 5px 9px;
  border: 1px solid #5b4a25;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 700;
}
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--toc); }
.content {
  width: min(100%, 810px);
  margin: 0 auto;
  padding: 58px 54px 90px;
  outline: none;
}
.toc {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 58px 22px 0 0;
}
.toc-inner { padding-left: 18px; border-left: 1px solid var(--line); }
.eyebrow {
  margin: 0 0 12px;
  color: #778191;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-decoration: none;
}
.toc a:hover, .toc a.active { color: var(--accent-strong); }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs span:last-child { color: #cfd4dc; }
.article-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.article-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-label, .read-time {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b9c1cc;
  font-size: 10px;
  font-weight: 700;
}
.role-label { border-color: #5e4d27; background: #2b251a; color: var(--accent-strong); }
.copy-page {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.copy-page:hover { border-color: var(--line-strong); color: var(--text); }
h1, h2, h3 { font-family: "Manrope", sans-serif; letter-spacing: 0; text-wrap: balance; }
h1 { margin: 18px 0 14px; font-size: clamp(34px, 5vw, 44px); line-height: 1.12; }
.lead {
  max-width: 690px;
  margin: 0 0 38px;
  color: #aeb6c2;
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}
h2 {
  scroll-margin-top: 88px;
  margin: 50px 0 15px;
  padding-top: 2px;
  font-size: 23px;
  line-height: 1.3;
}
h3 { margin: 28px 0 10px; font-size: 17px; }
p, li {
  color: var(--body);
  font-size: 15px;
  line-height: 1.76;
  text-wrap: pretty;
}
ul, ol { padding-left: 22px; }
li + li { margin-top: 7px; }
strong { color: var(--text); }

.quick-path {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 8px;
}
.quick-link {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  text-decoration: none;
}
.quick-link:hover { border-color: var(--line-strong); background: var(--panel-2); }
.quick-link span { color: var(--accent-strong); font-size: 10px; font-weight: 700; }
.quick-link strong { display: block; margin: 9px 0 5px; font-size: 15px; }
.quick-link small { color: var(--muted); font-size: 12px; line-height: 1.55; }

.callout {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  margin: 26px 0;
  padding: 17px 18px;
  border: 1px solid #3c4657;
  border-radius: 7px;
  background: #1b2330;
}
.callout.warning { border-color: #655124; background: #2b261b; }
.callout.success { border-color: #245746; background: #192c27; }
.callout-icon { color: var(--accent-strong); font-size: 14px; font-weight: 700; }
.callout p { margin: 0; font-size: 13px; }

.steps {
  counter-reset: step;
  list-style: none;
  margin: 24px 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  min-height: 50px;
  margin: 0;
  padding: 1px 0 27px 52px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #6d5727;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 36px;
  bottom: 5px;
  width: 1px;
  background: var(--line);
}

.screenshot {
  position: relative;
  width: min(100%, 720px);
  margin: 30px 0 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101318;
  box-shadow: 0 18px 40px rgb(0 0 0 / 24%);
}
.screenshot.phone { width: min(100%, 560px); margin-inline: auto; }
.screenshot-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  max-height: 680px;
  overflow: hidden;
  border-radius: 5px;
  background: #0c0f13;
}
.screenshot-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: contain;
  cursor: zoom-in;
}
.screenshot::after {
  content: "Click image to enlarge";
  position: absolute;
  right: 20px;
  top: 20px;
  padding: 6px 9px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 5px;
  background: rgb(10 12 15 / 84%);
  color: #dce1e8;
  font-size: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
}
.screenshot:hover::after { opacity: 1; }
.screenshot figcaption {
  padding: 13px 6px 4px;
  color: #959eac;
  font-size: 12px;
  line-height: 1.55;
}
.marker, .screenshot-key { display: none; }

.next-article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 52px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  text-decoration: none;
}
.next-article:hover { border-color: var(--line-strong); }
.next-article small { display: block; margin-bottom: 5px; color: var(--muted); }
.next-article strong { font-size: 14px; }
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.article-footer strong { font-size: 13px; }
.article-footer p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.feedback-actions { display: flex; gap: 8px; }
.feedback-actions button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.feedback-actions button:hover { border-color: var(--accent); color: var(--accent-strong); }

.search-dialog, .image-dialog {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #1b1f25;
  color: var(--text);
  box-shadow: 0 24px 70px rgb(0 0 0 / 60%);
}
.search-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(700px, calc(100vh - 48px)); }
.search-dialog::backdrop, .image-dialog::backdrop { background: rgb(0 0 0 / 78%); }
.search-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.search-head input { width: 100%; border: 0; outline: none; background: transparent; color: var(--text); font-size: 15px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-button:hover { background: var(--panel-2); }
.search-results { max-height: 560px; padding: 10px; overflow: auto; }
.search-result { display: block; padding: 13px 14px; border-radius: 6px; text-decoration: none; }
.search-result:hover { background: var(--panel-2); }
.search-result strong { display: block; font-size: 13px; }
.search-result small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.search-empty { padding: 36px; color: var(--muted); text-align: center; }
.image-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
}
.image-dialog img { display: block; width: 100%; height: auto; border-radius: 5px; }
.image-dialog p { margin: 12px 42px 0 2px; color: var(--muted); font-size: 12px; }
.image-dialog-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #111419;
  color: var(--text);
  cursor: pointer;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  max-width: 340px;
  padding: 12px 15px;
  border: 1px solid #245746;
  border-radius: 6px;
  background: #17342b;
  color: #c8fae9;
  font-size: 12px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateY(0); transition: opacity 150ms ease-out, transform 150ms ease-out; }
.mobile-header { display: none; }
.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; }

@media (max-width: 1100px) {
  :root { --toc: 0px; }
  .docs-layout { display: block; }
  .toc { display: none; }
}

@media (max-width: 760px) {
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 28;
    height: 58px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    background: rgb(20 23 27 / 96%);
  }
  .mobile-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: "Manrope", sans-serif; font-size: 13px; font-weight: 700; }
  .mobile-brand img { width: 34px; height: 34px; object-fit: contain; }
  .sidebar {
    inset: 58px auto 0 0;
    width: min(320px, 88vw);
    transform: translateX(-105%);
    box-shadow: 20px 0 40px rgb(0 0 0 / 45%);
  }
  .sidebar.open { transform: translateX(0); transition: transform 180ms ease-out; }
  .page { margin-left: 0; }
  .docs-header { position: static; height: 54px; padding: 0 18px; overflow-x: auto; }
  .product-tabs { gap: 18px; min-width: max-content; }
  .staging-label { display: none; }
  .content { padding: 36px 20px 64px; }
  .article-topline { align-items: flex-start; }
  h1 { font-size: 33px; }
  .lead { font-size: 15px; }
  .quick-path { grid-template-columns: 1fr; }
  .screenshot, .screenshot.phone { width: 100%; margin-inline: 0; padding: 7px; }
  .screenshot-stage { min-height: 200px; }
  .screenshot::after { display: none; }
  .article-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
