:root {
  --ink: #1c2024;
  --muted: #60646c;
  --border: #eaeaea;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --link: #2781f6;
  --accent: #1f6b45;
  --accent-soft: #eef7f1;
  --callout-border: #c5e0d1;
  --sidebar-w: 260px;
  --toc-w: 220px;
  --measure: 42rem;
  --font: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.nm-docs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nm-docs-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nm-docs-topbar-brand img {
  width: 28px;
  height: 28px;
}

.nm-docs-topbar-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.nm-docs-topbar-nav a {
  color: var(--muted);
}

.nm-docs-topbar-nav a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.nm-docs-topbar-cta {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.88rem;
}

.nm-docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 0;
  min-height: calc(100vh - 52px);
  max-width: 1280px;
  margin: 0 auto;
}

.nm-docs-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 20px 14px 40px;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow: auto;
}

.nm-docs-sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 8px 8px;
}

.nm-docs-sidebar-label:first-child {
  margin-top: 0;
}

.nm-docs-nav-section > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 650;
  font-size: 0.92rem;
  padding: 8px;
  border-radius: 8px;
  color: var(--ink);
}

.nm-docs-nav-section > summary::-webkit-details-marker {
  display: none;
}

.nm-docs-nav-section > summary::after {
  content: "";
  float: right;
  margin-top: 7px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  padding: 3px;
  transform: rotate(45deg);
}

.nm-docs-nav-section[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 9px;
}

.nm-docs-nav-section ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0 0 0 6px;
}

.nm-docs-nav-section a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.nm-docs-nav-section a:hover {
  background: #fff;
  color: var(--ink);
}

.nm-docs-nav-section a.is-active {
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px var(--border);
}

.nm-docs-sidebar-foot {
  margin-top: 24px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.nm-docs-sidebar-foot a {
  color: var(--muted);
}

.nm-docs-main {
  padding: 28px 36px 72px;
  min-width: 0;
}

.nm-docs-article {
  max-width: var(--measure);
}

.nm-docs-article h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 2.4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.nm-docs-updated {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nm-docs-lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.05rem;
}

.nm-docs-article h2 {
  margin: 32px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  scroll-margin-top: 72px;
}

.nm-docs-article h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  scroll-margin-top: 72px;
}

.nm-docs-article p {
  margin: 0 0 14px;
}

.nm-docs-article ul,
.nm-docs-article ol {
  margin: 0 0 14px;
  padding-left: 1.25rem;
}

.nm-docs-article li {
  margin: 0 0 8px;
}

.nm-docs-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #eef2f0;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.nm-docs-article pre {
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.nm-docs-article pre code {
  background: none;
  padding: 0;
}

.nm-docs-callout {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--callout-border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
}

.nm-docs-callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.nm-docs-callout p:last-child {
  margin-bottom: 0;
}

.nm-docs-related {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.nm-docs-related h2 {
  margin-top: 0;
}

.nm-docs-related ul {
  list-style: none;
  padding: 0;
}

.nm-docs-hub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nm-docs-hub-list li {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.nm-docs-hub-list a {
  font-weight: 650;
  color: var(--ink);
}

.nm-docs-hub-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nm-docs-toc {
  border-left: 1px solid var(--border);
  padding: 28px 16px 40px;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow: auto;
}

.nm-docs-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.nm-docs-toc nav a {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
}

.nm-docs-toc nav a:hover {
  color: var(--ink);
}

.nm-docs-toc nav a.is-active {
  color: var(--ink);
  background: var(--bg-soft);
  border-left-color: var(--accent);
}

.nm-docs-toc nav a.depth-3 {
  padding-left: 18px;
  font-size: 0.82rem;
}

.nm-docs-mobile-toc {
  display: none;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}

.nm-docs-mobile-toc summary {
  cursor: pointer;
  font-weight: 650;
}

.nm-docs-mobile-toc nav {
  margin-top: 10px;
}

.nm-docs-mobile-nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .nm-docs-layout {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .nm-docs-toc {
    display: none;
  }
  .nm-docs-mobile-toc {
    display: block;
  }
}

@media (max-width: 860px) {
  .nm-docs-layout {
    grid-template-columns: 1fr;
  }
  .nm-docs-sidebar {
    display: none;
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .nm-docs-sidebar.is-open {
    display: block;
  }
  .nm-docs-mobile-nav-toggle {
    display: inline-flex;
    margin-bottom: 16px;
  }
  .nm-docs-main {
    padding: 20px 16px 56px;
  }
  .nm-docs-topbar-nav .nm-docs-hide-sm {
    display: none;
  }
}
