/* ==========================================================================
   Nova documentation site — design system
   Self-contained, dependency-free, works over file:// (no web fonts, no CDN).
   Theme: indigo accent on a calm neutral canvas, automatic + manual dark mode.
   ========================================================================== */

:root {
  /* Brand */
  --nv-accent: #5b50e8;
  --nv-accent-strong: #4a40d6;
  --nv-accent-soft: rgba(91, 80, 232, 0.12);
  --nv-accent-ring: rgba(91, 80, 232, 0.28);

  /* Light canvas */
  --nv-bg: #ffffff;
  --nv-bg-subtle: #f7f8fb;
  --nv-bg-sunken: #eef0f6;
  --nv-surface: #ffffff;
  --nv-border: #e4e7ef;
  --nv-border-strong: #d3d8e4;
  --nv-text: #1d2333;
  --nv-text-soft: #4a5167;
  --nv-text-faint: #767d92;
  --nv-link: var(--nv-accent);

  /* Code */
  --nv-code-bg: #0f1424;
  --nv-code-text: #e6e9f5;
  --nv-code-faint: #8a90a8;
  --nv-code-inline-bg: #eef0f6;
  --nv-code-inline-text: #41386f;

  /* Admonitions */
  --nv-note: #2563eb;
  --nv-tip: #0f766e;
  --nv-warn: #b45309;
  --nv-danger: #be123c;

  /* Severity (audit tables) */
  --nv-sev-critical: #be123c;
  --nv-sev-high: #d9480f;
  --nv-sev-medium: #b45309;
  --nv-sev-low: #0f766e;
  --nv-sev-info: #4a5167;

  --nv-radius: 12px;
  --nv-radius-sm: 8px;
  --nv-shadow: 0 1px 2px rgba(16, 22, 41, 0.06), 0 8px 24px rgba(16, 22, 41, 0.06);
  --nv-shadow-lg: 0 12px 40px rgba(16, 22, 41, 0.16);
  --nv-sidebar-w: 280px;
  --nv-toc-w: 220px;
  --nv-content-max: 860px;
  --nv-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --nv-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --nv-bg: #0b0e18;
  --nv-bg-subtle: #11141f;
  --nv-bg-sunken: #161a28;
  --nv-surface: #141826;
  --nv-border: #232838;
  --nv-border-strong: #313752;
  --nv-text: #e7e9f3;
  --nv-text-soft: #aab1c7;
  --nv-text-faint: #7b84a0;
  --nv-link: #9d95f5;
  --nv-accent-soft: rgba(125, 116, 240, 0.16);
  --nv-code-bg: #0a0d17;
  --nv-code-inline-bg: #1c2133;
  --nv-code-inline-text: #c7c2f7;
  --nv-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.36);
  --nv-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--nv-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--nv-text);
  background: var(--nv-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Top bar ---------------------------------------------------- */
.nv-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--nv-bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--nv-border);
}
.nv-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--nv-text); letter-spacing: -0.01em; }
.nv-brand:hover { text-decoration: none; }
.nv-brand .nv-logo {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: none; box-shadow: none;
}
.nv-brand .nv-logo img { width: 24px; height: 24px; display: block; }
.nv-brand small { font-weight: 500; color: var(--nv-text-faint); font-size: 12px; }
.nv-ver {
  font-family: var(--nv-mono); font-size: 11.5px; color: var(--nv-text-soft);
  background: var(--nv-bg-sunken); border: 1px solid var(--nv-border);
  padding: 2px 8px; border-radius: 20px;
}
.nv-topbar-spacer { flex: 1; }
.nv-topbar-links { display: flex; align-items: center; gap: 6px; }
.nv-topbar-links a {
  color: var(--nv-text-soft); font-size: 14px; font-weight: 500;
  padding: 7px 11px; border-radius: 8px;
}
.nv-topbar-links a:hover { background: var(--nv-bg-sunken); text-decoration: none; color: var(--nv-text); }
.nv-icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--nv-border); background: var(--nv-surface);
  border-radius: 9px; cursor: pointer; color: var(--nv-text-soft); font-size: 16px;
}
.nv-icon-btn:hover { background: var(--nv-bg-sunken); color: var(--nv-text); }
.nv-menu-btn { display: none; }

/* ---------- Layout ----------------------------------------------------- */
.nv-shell { display: flex; align-items: flex-start; max-width: 1480px; margin: 0 auto; }

.nv-sidebar {
  position: sticky; top: 60px; align-self: flex-start;
  width: var(--nv-sidebar-w); flex: none;
  height: calc(100vh - 60px); overflow-y: auto;
  padding: 26px 18px 60px;
  border-right: 1px solid var(--nv-border);
}
.nv-nav-group { margin-bottom: 22px; }
.nv-nav-group > h4 {
  margin: 0 0 8px; padding: 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nv-text-faint);
}
.nv-nav-group a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--nv-text-soft); font-size: 14.5px; font-weight: 500; line-height: 1.3;
}
.nv-nav-group a:hover { background: var(--nv-bg-sunken); color: var(--nv-text); text-decoration: none; }
.nv-nav-group a.active { background: var(--nv-accent-soft); color: var(--nv-accent); font-weight: 600; }
html[data-theme="dark"] .nv-nav-group a.active { color: var(--nv-link); }
.nv-nav-group a .nv-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.45; flex: none; }

.nv-main { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 40px; padding: 44px 48px 120px; }
.nv-content { width: 100%; max-width: var(--nv-content-max); }

/* On-page table of contents */
.nv-toc {
  position: sticky; top: 84px; align-self: flex-start;
  width: var(--nv-toc-w); flex: none;
  max-height: calc(100vh - 120px); overflow-y: auto;
  font-size: 13px;
}
.nv-toc h5 { margin: 0 0 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nv-text-faint); }
.nv-toc a { display: block; padding: 4px 0 4px 12px; color: var(--nv-text-faint); border-left: 2px solid var(--nv-border); }
.nv-toc a:hover { color: var(--nv-text); text-decoration: none; }
.nv-toc a.active { color: var(--nv-accent); border-left-color: var(--nv-accent); font-weight: 600; }
.nv-toc a.lvl-3 { padding-left: 24px; font-size: 12.5px; }

/* ---------- Typography ------------------------------------------------- */
.nv-content h1 { font-size: 34px; line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 800; }
.nv-content h2 {
  font-size: 23px; letter-spacing: -0.01em; margin: 52px 0 14px; padding-top: 10px; font-weight: 700;
  border-top: 1px solid var(--nv-border);
}
.nv-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 36px; }
.nv-content h3 { font-size: 18px; margin: 32px 0 10px; font-weight: 700; }
.nv-content h4 { font-size: 15px; margin: 24px 0 8px; font-weight: 700; color: var(--nv-text-soft); }
.nv-content p { margin: 12px 0; color: var(--nv-text); }
.nv-content ul, .nv-content ol { margin: 12px 0; padding-left: 24px; }
.nv-content li { margin: 6px 0; }
.nv-content li::marker { color: var(--nv-text-faint); }
.nv-lead { font-size: 18.5px; line-height: 1.6; color: var(--nv-text-soft); margin: 0 0 8px; }
.nv-eyebrow {
  display: inline-block; font-family: var(--nv-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--nv-accent); margin-bottom: 10px;
}
.nv-content strong { font-weight: 700; color: var(--nv-text); }
.nv-content hr { border: none; border-top: 1px solid var(--nv-border); margin: 40px 0; }
.anchor { scroll-margin-top: 80px; }

/* ---------- Inline + block code --------------------------------------- */
code {
  font-family: var(--nv-mono); font-size: 0.86em;
  background: var(--nv-code-inline-bg); color: var(--nv-code-inline-text);
  padding: 0.12em 0.4em; border-radius: 5px;
}
.nv-codeblock { position: relative; margin: 18px 0; border-radius: var(--nv-radius); overflow: hidden; box-shadow: var(--nv-shadow); border: 1px solid var(--nv-border); }
.nv-codeblock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: #181d2e; border-bottom: 1px solid #232a40;
}
.nv-codeblock-head .nv-file { font-family: var(--nv-mono); font-size: 12px; color: #aeb4cc; }
.nv-codeblock-head .nv-lang { font-family: var(--nv-mono); font-size: 11px; color: #6d7491; text-transform: uppercase; letter-spacing: 0.05em; }
.nv-copy {
  border: 1px solid #2c3350; background: #1f2638; color: #c7ccde;
  font-size: 12px; padding: 3px 9px; border-radius: 6px; cursor: pointer; font-family: var(--nv-sans);
}
.nv-copy:hover { background: #283050; }
.nv-copy.copied { color: #7ee2b8; border-color: #2c5a47; }
.nv-codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; background: var(--nv-code-bg); }
.nv-codeblock pre code { background: none; color: var(--nv-code-text); padding: 0; font-size: 13.2px; line-height: 1.7; }
/* minimal token tints (applied by nova-docs.js) */
.tok-key { color: #c08cf0; }
.tok-str { color: #8fdf9c; }
.tok-com { color: var(--nv-code-faint); font-style: italic; }
.tok-num { color: #f0a868; }
.tok-fn  { color: #6cb6ff; }
.tok-attr{ color: #6cb6ff; }
.tok-tag { color: #f08c8c; }

/* ---------- Admonitions ------------------------------------------------ */
.nv-callout {
  display: flex; gap: 12px; margin: 20px 0; padding: 14px 16px;
  border-radius: var(--nv-radius); border: 1px solid var(--nv-border);
  background: var(--nv-bg-subtle); border-left: 4px solid var(--nv-text-faint);
}
.nv-callout .nv-callout-ico { font-size: 17px; line-height: 1.5; flex: none; }
.nv-callout .nv-callout-body { min-width: 0; }
.nv-callout .nv-callout-body > :first-child { margin-top: 0; }
.nv-callout .nv-callout-body > :last-child { margin-bottom: 0; }
.nv-callout .nv-callout-title { font-weight: 700; margin-bottom: 2px; }
.nv-callout.note { border-left-color: var(--nv-note); }
.nv-callout.note .nv-callout-ico, .nv-callout.note .nv-callout-title { color: var(--nv-note); }
.nv-callout.tip { border-left-color: var(--nv-tip); }
.nv-callout.tip .nv-callout-ico, .nv-callout.tip .nv-callout-title { color: var(--nv-tip); }
.nv-callout.warn { border-left-color: var(--nv-warn); }
.nv-callout.warn .nv-callout-ico, .nv-callout.warn .nv-callout-title { color: var(--nv-warn); }
.nv-callout.danger { border-left-color: var(--nv-danger); }
.nv-callout.danger .nv-callout-ico, .nv-callout.danger .nv-callout-title { color: var(--nv-danger); }

/* ---------- Tables ----------------------------------------------------- */
.nv-table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--nv-border); border-radius: var(--nv-radius); }
table.nv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.nv-table th, table.nv-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--nv-border); vertical-align: top; }
table.nv-table th { background: var(--nv-bg-subtle); font-weight: 700; font-size: 12.5px; letter-spacing: 0.02em; color: var(--nv-text-soft); }
table.nv-table tr:last-child td { border-bottom: none; }
table.nv-table code { white-space: nowrap; }
table.nv-table td.wrap code { white-space: normal; }

/* ---------- Badges / pills -------------------------------------------- */
.nv-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; font-family: var(--nv-mono);
  padding: 2px 8px; border-radius: 20px; border: 1px solid var(--nv-border); color: var(--nv-text-soft);
  background: var(--nv-bg-subtle); vertical-align: middle;
}
.nv-badge.ok { color: #0f766e; border-color: #9fd6cd; background: rgba(15,118,110,0.08); }
.nv-badge.warn { color: var(--nv-warn); border-color: #e3c08a; background: rgba(180,83,9,0.08); }
.nv-badge.accent { color: var(--nv-accent); border-color: var(--nv-accent-ring); background: var(--nv-accent-soft); }
.sev { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.sev.critical { color: var(--nv-sev-critical); }
.sev.high { color: var(--nv-sev-high); }
.sev.medium { color: var(--nv-sev-medium); }
.sev.low { color: var(--nv-sev-low); }
.sev.info { color: var(--nv-sev-info); }

/* ---------- Cards / grids --------------------------------------------- */
.nv-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 24px 0; }
.nv-card {
  display: block; padding: 18px; border: 1px solid var(--nv-border); border-radius: var(--nv-radius);
  background: var(--nv-surface); box-shadow: var(--nv-shadow); transition: transform .12s ease, border-color .12s ease;
}
.nv-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--nv-accent-ring); }
.nv-card .nv-card-ico { font-size: 22px; margin-bottom: 8px; }
.nv-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--nv-text); }
.nv-card p { margin: 0; font-size: 13.5px; color: var(--nv-text-faint); }

/* Hero (landing) */
.nv-hero { padding: 18px 0 8px; }
.nv-hero h1 { font-size: 44px; line-height: 1.08; }
.nv-hero .nv-gradient {
  background: linear-gradient(100deg, var(--nv-accent), #9b7bff 55%, #5ec5e8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.nv-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }
.nv-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14.5px; cursor: pointer; border: 1px solid transparent;
}
.nv-btn.primary { background: var(--nv-accent); color: #fff; box-shadow: 0 6px 16px var(--nv-accent-ring); }
.nv-btn.primary:hover { background: var(--nv-accent-strong); text-decoration: none; }
.nv-btn.ghost { background: var(--nv-surface); border-color: var(--nv-border-strong); color: var(--nv-text); }
.nv-btn.ghost:hover { background: var(--nv-bg-sunken); text-decoration: none; }

/* Loop / step diagram */
.nv-loop { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 22px 0; }
.nv-loop .step { flex: 1; min-width: 150px; padding: 16px; border: 1px solid var(--nv-border); border-radius: var(--nv-radius); background: var(--nv-bg-subtle); }
.nv-loop .step .n { font-family: var(--nv-mono); font-size: 12px; color: var(--nv-accent); font-weight: 700; }
.nv-loop .step h4 { margin: 4px 0 4px; color: var(--nv-text); }
.nv-loop .step p { margin: 0; font-size: 13px; color: var(--nv-text-faint); }
.nv-loop .arrow { align-self: center; color: var(--nv-text-faint); font-size: 20px; }

/* Definition list for API */
.nv-api { margin: 16px 0; border: 1px solid var(--nv-border); border-radius: var(--nv-radius); overflow: hidden; }
.nv-api .row { padding: 14px 16px; border-bottom: 1px solid var(--nv-border); }
.nv-api .row:last-child { border-bottom: none; }
.nv-api .sig { font-family: var(--nv-mono); font-size: 13.5px; color: var(--nv-text); }
.nv-api .sig .nm { color: var(--nv-accent); font-weight: 600; }
.nv-api .desc { margin: 6px 0 0; font-size: 13.5px; color: var(--nv-text-faint); }

/* Footer */
.nv-footer { border-top: 1px solid var(--nv-border); margin-top: 60px; padding-top: 24px; color: var(--nv-text-faint); font-size: 13.5px; }
.nv-footer a { color: var(--nv-text-soft); }

.nv-pagenav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; }
.nv-pagenav a {
  flex: 1; padding: 14px 16px; border: 1px solid var(--nv-border); border-radius: var(--nv-radius);
  background: var(--nv-surface); color: var(--nv-text);
}
.nv-pagenav a:hover { border-color: var(--nv-accent-ring); text-decoration: none; }
.nv-pagenav a.next { text-align: right; }
.nv-pagenav small { display: block; color: var(--nv-text-faint); font-size: 12px; }
.nv-pagenav strong { font-weight: 600; }

/* ---------- Setup wizard ---------------------------------------------- */
.nv-wizard-form { margin: 22px 0 8px; padding: 20px; border: 1px solid var(--nv-border); border-radius: var(--nv-radius); background: var(--nv-bg-subtle); }
.nv-wizard-field { margin-bottom: 18px; }
.nv-wizard-field:last-child { margin-bottom: 0; }
.nv-wizard-field > label.nv-q { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 8px; color: var(--nv-text); }
.nv-optrow { display: flex; flex-wrap: wrap; gap: 8px; }
.nv-opt { position: relative; }
.nv-opt input { position: absolute; opacity: 0; pointer-events: none; }
.nv-opt span {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 14px; border: 1px solid var(--nv-border-strong); border-radius: 9px;
  background: var(--nv-surface); font-size: 14px; font-weight: 500; color: var(--nv-text-soft);
  transition: border-color .12s, background .12s, color .12s;
}
.nv-opt span:hover { border-color: var(--nv-accent-ring); }
.nv-opt input:checked + span { border-color: var(--nv-accent); background: var(--nv-accent-soft); color: var(--nv-accent); font-weight: 600; }
html[data-theme="dark"] .nv-opt input:checked + span { color: var(--nv-link); }
.nv-opt input:focus-visible + span { outline: 2px solid var(--nv-accent-ring); outline-offset: 2px; }
.nv-wizard-field textarea {
  width: 100%; min-height: 92px; resize: vertical;
  font-family: var(--nv-mono); font-size: 13px; line-height: 1.6;
  padding: 11px 13px; border: 1px solid var(--nv-border-strong); border-radius: 9px;
  background: var(--nv-surface); color: var(--nv-text);
}
.nv-wizard-field textarea:focus { outline: none; border-color: var(--nv-accent); box-shadow: 0 0 0 3px var(--nv-accent-soft); }
.nv-wizard-field .nv-hint { font-size: 12.5px; color: var(--nv-text-faint); margin: 6px 0 0; }
.nv-step-n {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: var(--nv-accent); color: #fff; font-size: 13px; font-weight: 700; vertical-align: middle;
  margin-right: 6px; box-shadow: 0 3px 8px var(--nv-accent-ring);
}
#nv-wizard-out { margin-top: 24px; }
#nv-wizard-out h3 { display: flex; align-items: center; }

/* ---------- Curation Studio ------------------------------------------- */
.nv-cur-toolbar { display: none; gap: 10px; align-items: center; margin: 16px 0; position: sticky; top: 64px; z-index: 10; background: var(--nv-bg); padding: 8px 0; }
.nv-cur-card { border: 1px solid var(--nv-border); border-radius: var(--nv-radius); padding: 16px 18px; margin: 16px 0; background: var(--nv-surface); }
.nv-cur-card > h3 { margin: 0 0 12px; font-size: 16px; }
.nv-cur-card > h3 small { font-weight: 500; color: var(--nv-text-faint); font-size: 12.5px; margin-left: 6px; }
.nv-cur-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.nv-cur-grid3 { display: grid; grid-template-columns: 0.8fr 1fr 1.4fr; gap: 8px; flex: 1; }
.nv-cur-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--nv-text-soft); margin-bottom: 8px; }
.nv-cur-field > span { font-weight: 600; }
.nv-cur-inp, .nv-cur-sel, .nv-cur-ta {
  width: 100%; font-family: var(--nv-mono); font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--nv-border-strong); border-radius: 7px; background: var(--nv-bg); color: var(--nv-text);
}
.nv-cur-inp:focus, .nv-cur-sel:focus, .nv-cur-ta:focus { outline: none; border-color: var(--nv-accent); box-shadow: 0 0 0 3px var(--nv-accent-soft); }
.nv-cur-ta { resize: vertical; line-height: 1.6; }
.nv-cur-sub { font-size: 12.5px; color: var(--nv-text-faint); margin: 12px 0 6px; }
.nv-cur-rules { margin: 0; padding-left: 18px; font-size: 13px; color: var(--nv-text-soft); max-height: 160px; overflow-y: auto; }
.nv-cur-rules li { margin: 2px 0; }
.nv-cur-more { color: var(--nv-text-faint); font-style: italic; }
.nv-cur-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 8px 0; border-top: 1px solid var(--nv-border); }
.nv-cur-row:first-of-type { border-top: none; }
.nv-cur-chips { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.nv-cur-chips span { font-family: var(--nv-mono); font-size: 11px; background: var(--nv-bg-sunken); border: 1px solid var(--nv-border); padding: 1px 6px; border-radius: 5px; color: var(--nv-text-faint); }
.nv-cur-x { border: 1px solid var(--nv-border); background: var(--nv-surface); color: var(--nv-sev-critical); width: 28px; height: 28px; border-radius: 7px; cursor: pointer; flex: none; }
.nv-cur-x:hover { background: rgba(190,18,60,0.08); }
.nv-cur-flow { border: 1px solid var(--nv-border); border-radius: var(--nv-radius); padding: 12px 14px; margin: 10px 0; background: var(--nv-bg-subtle); }
.nv-cur-flowhead { display: flex; gap: 8px; margin-bottom: 8px; }
.nv-cur-flowhead .nv-cur-inp:first-child { max-width: 200px; }
.nv-cur-steps { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.nv-cur-step { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nv-cur-step .nv-cur-sel { width: 130px; flex: none; }
.nv-cur-step .nv-cur-inp { flex: 1; min-width: 100px; }
.nv-cur-commit { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--nv-text-soft); white-space: nowrap; }
.nv-cur-stepbtns { display: flex; gap: 2px; }
.nv-cur-stepbtns button { width: 26px; height: 28px; border: 1px solid var(--nv-border); background: var(--nv-surface); border-radius: 6px; cursor: pointer; color: var(--nv-text-soft); font-size: 12px; }
.nv-cur-stepbtns button:hover { background: var(--nv-bg-sunken); color: var(--nv-text); }
.nv-cur-add { margin-top: 6px; border: 1px dashed var(--nv-border-strong); background: transparent; color: var(--nv-accent); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; }
.nv-cur-add:hover { background: var(--nv-accent-soft); }
#nv-cur-preview-wrap { position: sticky; bottom: 0; }

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 1180px) {
  .nv-toc { display: none; }
}
@media (max-width: 900px) {
  .nv-menu-btn { display: grid; }
  .nv-sidebar {
    position: fixed; left: 0; top: 60px; z-index: 45;
    width: 86vw; max-width: 320px; height: calc(100vh - 60px);
    background: var(--nv-bg); transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: var(--nv-shadow-lg);
  }
  body.nv-nav-open .nv-sidebar { transform: translateX(0); }
  .nv-scrim { display: none; position: fixed; inset: 60px 0 0; z-index: 44; background: rgba(8,11,20,0.45); }
  body.nv-nav-open .nv-scrim { display: block; }
  .nv-main { padding: 28px 20px 100px; }
  .nv-content h1, .nv-hero h1 { font-size: 30px; }
  .nv-topbar-links a span.long { display: none; }
}
