/* ============================================================================
   nROLL Bots Beta Onboarding & Documentation Design System
   Self-contained, pure relative CSS (works via file://, COS subpath, or root)
   ============================================================================ */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --ink: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;

  --brand: #0f2c44;
  --brand-ink: #ffffff;
  --accent: #1c6ea4;
  --accent-tint: #f0f7fc;
  --accent-border: #bae0f7;

  --status-ok: #15803d;
  --status-ok-bg: #f0fdf4;
  --status-ok-border: #bbf7d0;
  --status-warn-bg: #fffbeb;
  --status-warn-border: #fde68a;
  --status-warn-ink: #92400e;

  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  /* Schematic SVG tokens */
  --svg-bg: #ffffff;
  --svg-chrome: #f8fafc;
  --svg-panel: #f8fafc;
  --svg-panel-2: #f0f7fc;
  --svg-ink: #0f172a;
  --svg-muted: #64748b;
  --svg-border: #cbd5e1;
  --svg-border-soft: #e2e8f0;
  --svg-accent: #1c6ea4;
  --svg-brand: #0f2c44;
  --svg-btn-ink: #ffffff;
  --svg-ok: #15803d;
  --svg-warn: #b45309;
  --svg-warn-bg: #fffbeb;
  --svg-warn-border: #fcd34d;
}

html[data-mode="dark"] {
  --bg: #0b0d11;
  --surface: #11141b;
  --surface-subtle: #161a23;
  --surface-muted: #1d222e;
  --border: #232936;
  --border-strong: #31394a;

  --ink: #f1f5f9;
  --ink-secondary: #94a3b8;
  --ink-muted: #64748b;

  --brand: #f8fafc;
  --brand-ink: #0b0d11;
  --accent: #60a5fa;
  --accent-tint: rgba(96, 165, 250, 0.10);
  --accent-border: rgba(96, 165, 250, 0.28);

  --status-ok: #4ade80;
  --status-ok-bg: rgba(74, 222, 128, 0.10);
  --status-ok-border: rgba(74, 222, 128, 0.28);
  --status-warn-bg: rgba(245, 158, 11, 0.08);
  --status-warn-border: rgba(245, 158, 11, 0.25);
  --status-warn-ink: #fcd34d;

  --svg-bg: #11141b;
  --svg-chrome: #161a23;
  --svg-panel: #161a23;
  --svg-panel-2: #1a2333;
  --svg-ink: #f1f5f9;
  --svg-muted: #94a3b8;
  --svg-border: #31394a;
  --svg-border-soft: #232936;
  --svg-accent: #60a5fa;
  --svg-brand: #f1f5f9;
  --svg-btn-ink: #0b0d11;
  --svg-ok: #4ade80;
  --svg-warn: #fbbf24;
  --svg-warn-bg: rgba(245, 158, 11, 0.10);
  --svg-warn-border: rgba(245, 158, 11, 0.32);
}

/* Layout & overflow discipline */
*, *::before, *::after { box-sizing: border-box; }
main > *, section > *, :where(.page-shell, .landing-shell, .topbar-inner, .topbar-left, .top-nav, .download-panel, .quickstrip, .scope-grid, .spec-strip, .prompt-window-footer, .trigger-pillars, .setup-step, .filter-bar, .card-spec-grid, .prompt-bar, .bp-grid, .next-banner) > * {
  min-width: 0;
  max-width: 100%;
}
:where(p, h1, h2, h3, h4, li, dd, figcaption, code) {
  overflow-wrap: anywhere;
}
:where(img, svg) {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  transition: background-color 0.15s ease, color 0.15s ease;
}

[id] {
  scroll-margin-top: 76px;
}

/* ============================================================================
   TOP HEADER (Shared across index.html, install.html, skills.html)
   ============================================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 56px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-name {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.beta-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.top-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 100%;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.top-nav a:hover {
  color: var(--ink);
}

.top-nav a.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.header-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface-subtle);
}

.header-btn.primary {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}

.header-btn.primary:hover {
  opacity: 0.92;
  background: var(--brand);
  color: var(--brand-ink);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  gap: 2px;
}

.lang-btn {
  height: 26px;
  padding: 0 9px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

html[data-mode="dark"] .lang-btn.active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ============================================================================
   LAYOUT SHELLS (Landing Single-Column & Guide Two-Column)
   ============================================================================ */
.landing-shell {
  max-width: 1020px;
  margin: 0 auto;
  padding: 52px 32px 88px;
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-bottom: 32px;
}

.nav-group { margin-bottom: 22px; }

.nav-group-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0 0 8px 12px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.nav-list a {
  display: block;
  padding: 5px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.nav-list a:hover { color: var(--ink); }

.nav-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 550;
}

.docs-main {
  max-width: 880px;
  padding: 44px 0 96px;
}

/* ============================================================================
   TYPOGRAPHY & SECTIONS
   ============================================================================ */
.doc-section {
  padding-top: 52px;
  margin-top: 52px;
  border-top: 1px solid var(--border);
}

.doc-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
}

h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.24;
  letter-spacing: -0.022em;
  font-weight: 650;
  margin: 0 0 8px;
  color: var(--ink);
}

h3 {
  font-size: 15.5px;
  line-height: 1.35;
  letter-spacing: -0.014em;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.section-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 72ch;
  margin: 0 0 24px;
}

.overview-prose {
  max-width: 72ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0 0 20px;
}

.overview-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.code-inline {
  font-family: var(--font-mono);
  font-size: 0.87em;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--ink);
}

.mention-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  border: 1px solid var(--brand);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn-secondary:hover { background: var(--surface-subtle); }

/* ============================================================================
   CALLOUTS & LANDING DOWNLOAD PANEL
   ============================================================================ */
.callout-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.callout-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.callout-note strong {
  color: var(--ink);
  font-weight: 600;
}

.callout-note.warn {
  background: var(--status-warn-bg);
  border-color: var(--status-warn-border);
  color: var(--status-warn-ink);
}

.callout-note.warn svg,
.callout-note.warn strong {
  color: var(--status-warn-ink);
}

.download-panel {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px;
  align-items: center;
  margin: 24px 0 18px;
}

.download-panel.compact {
  padding: 18px 20px;
  margin: 0 0 22px;
  background: var(--surface-subtle);
  border-color: var(--border);
}

.download-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 6px;
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.meta-sep { color: var(--border-strong); }

.download-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.macos-quiet-note {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}

.macos-quiet-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 550;
}

.macos-quiet-note a:hover { text-decoration: underline; }

/* ============================================================================
   LANDING 3-STEP QUICKSTRIP & 2x2 CAPABILITY SCOPE
   ============================================================================ */
.quickstrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.quickstrip-cell {
  background: var(--surface);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quickstrip-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

.quickstrip-cell p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.56;
  color: var(--ink-secondary);
}

.quickstrip-cell .text-link {
  margin-top: auto;
  padding-top: 4px;
}

.scope-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.scope-header .section-lead { margin-bottom: 0; }

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.scope-card {
  background: var(--surface);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.12s ease;
}

.scope-card:hover {
  background: var(--surface-subtle);
}

.scope-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.scope-card-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.scope-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.56;
  color: var(--ink-secondary);
}

.scope-card .scope-link {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 550;
  color: var(--accent);
}

/* ============================================================================
   INTERACTIVE CODEX PROMPT WINDOW
   ============================================================================ */
.prompt-window {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 16px;
}

.prompt-window-header {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.prompt-window-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.segmented {
  display: inline-flex;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.seg-btn:hover { color: var(--ink); }

.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.prompt-window-body { padding: 18px 20px; }

.composer-attachments {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 5px;
}

.composer-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}

.prompt-window-footer {
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-muted);
}

.composer-settings {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.composer-settings strong {
  color: var(--ink-secondary);
  font-weight: 600;
}

/* ============================================================================
   INSTALL TIMELINE & ARCHITECTURAL SVGs
   ============================================================================ */
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-head-row .section-lead { margin-bottom: 0; }

.prereq-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.prereq-list strong {
  color: var(--ink);
  font-weight: 600;
}

.setup-timeline {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.setup-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px 20px;
  padding-bottom: 44px;
  position: relative;
  align-items: start;
}

.setup-step:last-child { padding-bottom: 0; }

.step-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

.step-rail::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: -8px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--border);
}

.setup-step:last-child .step-rail::after { display: none; }

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 1px;
}

.step-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.step-bullets {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.8px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.step-bullets strong {
  color: var(--ink);
  font-weight: 600;
}

.step-ol {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: stepAction;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  line-height: 1.56;
  color: var(--ink-secondary);
}

.step-ol > li {
  counter-increment: stepAction;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.step-ol > li::before {
  content: counter(stepAction);
  width: 21px;
  height: 21px;
  margin-top: 1px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-ol strong {
  color: var(--ink);
  font-weight: 600;
}

.step-note-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

details.upgrade-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-secondary);
}

details.upgrade-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

details.upgrade-details ol {
  margin: 8px 0 2px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-figure {
  grid-column: 2 / -1;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
  padding: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.codex-shot {
  width: 100%;
  height: auto;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}

.codex-shot:hover {
  border-color: var(--accent);
}

.setup-figure figcaption {
  margin-top: 9px;
  padding: 0 2px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.setup-figure figcaption strong {
  color: var(--ink-secondary);
  font-weight: 600;
}

.shot-zoom-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.step-subbox {
  grid-column: 2 / -1;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.step-subbox > * {
  min-width: 0;
  max-width: 100%;
}

.step-subbox-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.step-subbox h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.step-subbox-lead {
  margin: 0;
  font-size: 13.4px;
  line-height: 1.52;
  color: var(--ink-secondary);
}

.step-ol.compact {
  gap: 7px;
  font-size: 13.4px;
  line-height: 1.5;
}

.step-subbox .setup-figure {
  grid-column: auto;
  background: var(--surface);
  padding: 8px;
  margin-top: 2px;
}

.shot-lightbox[hidden] { display: none; }
.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(11, 13, 17, 0.84);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 12px;
}

.shot-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.shot-lightbox img {
  max-width: min(1140px, 94vw);
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background: #ffffff;
}

.shot-lightbox-caption {
  color: #e2e8f0;
  font-size: 13px;
  text-align: center;
  max-width: 78ch;
}

[data-os-only] { display: none; }
.os-windows [data-os-only="macos"],
.os-macos [data-os-only="windows"] { display: none !important; }
.os-windows li[data-os-only="windows"] { display: list-item; }
.os-macos li[data-os-only="macos"] { display: list-item; }
.os-windows .step-ol > li[data-os-only="windows"],
.os-macos .step-ol > li[data-os-only="macos"] { display: grid; }
.os-windows span[data-os-only="windows"] { display: inline; }
.os-macos span[data-os-only="macos"] { display: inline; }

.next-banner {
  margin-top: 40px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.next-banner h3 { margin: 0 0 3px; }
.next-banner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* ============================================================================
   SKILLS GUIDE (15 SPECIFICATION CARDS, FILTER BAR, WORKFLOW, BEST PRACTICES)
   ============================================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.domain-group { margin-bottom: 36px; }
.domain-group:last-of-type { margin-bottom: 0; }
.domain-group[hidden] { display: none; }

.domain-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.domain-heading {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
}

.domain-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.skill-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color 0.15s ease;
}

.skill-card:last-child { margin-bottom: 0; }
.skill-card:hover { border-color: var(--border-strong); }
.skill-card[hidden] { display: none; }

.skill-head {
  padding: 16px 20px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.skill-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}

.skill-meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.trigger-label {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-right: 2px;
}

.trigger-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.output-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  padding-left: 6px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

.skill-desc {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
  color: var(--ink-secondary);
}

.skill-desc strong {
  color: var(--ink);
  font-weight: 600;
}

.card-spec-grid {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spec-cell {
  padding: 13px 20px;
  font-size: 13px;
  line-height: 1.54;
  color: var(--ink-secondary);
}

.spec-cell:first-child { border-right: 1px solid var(--border); }

.spec-cell strong {
  color: var(--ink);
  font-weight: 600;
}

.spec-cell-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.spec-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prompt-bar {
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 11px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.prompt-copy-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.prompt-key {
  font-weight: 600;
  color: var(--ink);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.copy-btn.copied {
  color: var(--status-ok);
  border-color: var(--status-ok-border);
  background: var(--status-ok-bg);
}

.workflow-frame {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
}

.workflow-frame figcaption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.workflow-frame figcaption strong {
  color: var(--ink-secondary);
  font-weight: 600;
}

.bp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bp-cell {
  background: var(--surface);
  padding: 20px 22px;
}

.bp-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.bp-cell h3 {
  font-size: 15px;
  margin-bottom: 5px;
}

.bp-cell p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.56;
  color: var(--ink-secondary);
}

/* Footer */
.doc-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.doc-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 550;
}

.doc-footer a:hover { text-decoration: underline; }

/* ============================================================================
   RESPONSIVE & PRINT
   ============================================================================ */
@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 24px;
    gap: 0;
  }
  .docs-nav { display: none; }
  .docs-main { max-width: 100%; padding: 32px 0 72px; }
  .setup-step { grid-template-columns: 32px minmax(0, 1fr); }
  .setup-figure { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
  .topbar { height: auto; }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 0;
    padding: 10px 16px 0;
  }
  .topbar-left { display: contents; }
  .brand-lockup { order: 1; }
  .topbar-right { order: 2; margin-left: auto; }
  .top-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    height: 40px;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { padding: 0 2px; font-size: 13px; }
  .landing-shell { padding: 28px 16px 64px; }
  .page-shell { padding: 0 16px; }
  .beta-tag, .header-btn.hide-mobile { display: none; }
  .topbar-right { gap: 6px; }
  .lang-btn { padding: 0 7px; font-size: 11.5px; }
  .header-btn { padding: 0 9px; }
  .download-panel { grid-template-columns: minmax(0, 1fr); }
  .download-actions { align-items: flex-start; }
  .quickstrip, .scope-grid, .card-spec-grid, .bp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .spec-cell:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .prompt-bar {
    flex-direction: column;
    gap: 10px;
  }
  .setup-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .step-rail { display: none; }
  .setup-figure { grid-column: auto; }
  .step-subbox { grid-column: auto; padding: 14px; }
}

@media print {
  html, body, html[data-mode="dark"] {
    --bg: #ffffff !important;
    --surface: #ffffff !important;
    --surface-subtle: #f8fafc !important;
    --surface-muted: #f1f5f9 !important;
    --border: #cbd5e1 !important;
    --border-strong: #94a3b8 !important;
    --ink: #0f172a !important;
    --ink-secondary: #334155 !important;
    --ink-muted: #475569 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .topbar, .docs-nav, .segmented, .filter-bar, .copy-btn, .next-banner, .lang-switch {
    display: none !important;
  }
  .page-shell, .landing-shell {
    display: block;
    max-width: 100%;
    padding: 0;
  }
  .docs-main { max-width: 100%; padding: 0; }
  .skill-card, .setup-step, .workflow-frame, .bp-grid {
    break-inside: avoid;
  }
  .skill-card[hidden], .domain-group[hidden] { display: block !important; }
}
