/* ── Guide header ────────────────────────────────────────────────────────── */
.guide-header {
  background: linear-gradient(135deg, #0f1729 0%, #1a2d5a 60%, #0f2445 100%);
  color: #fff;
  padding: 60px 0 56px;
  position: relative;
  overflow: hidden;
}

.guide-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 20% 50%, rgba(0,115,234,.3) 0%, transparent 70%);
}

.guide-header .container { position: relative; }

.guide-header-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 10px;
}

.guide-header-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.guide-header-sub {
  font-size: 17px;
  color: rgba(255,255,255,.7);
  max-width: 560px;
  line-height: 1.65;
}

/* ── Guide layout ────────────────────────────────────────────────────────── */
.guide-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 80px;
}

/* ── Sidebar TOC ─────────────────────────────────────────────────────────── */
.guide-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 32px;
}

.toc-sticky {
  position: sticky;
  top: 88px;               /* nav height (64px) + breathing room */
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list li a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--subtle);
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  text-decoration: none;
  line-height: 1.4;
}
.toc-list li a:hover {
  color: var(--text);
  background: var(--bg-light);
}
.toc-list li a.toc-active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.toc-list li.toc-sub a {
  padding-left: 20px;
  font-size: 12px;
}

/* ── Guide content ───────────────────────────────────────────────────────── */
.guide-content {
  padding-left: 52px;
  min-width: 0;
  color: var(--text);
}

.guide-content h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.2;
}

.guide-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin: 48px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 88px;
}

/* Don't show border on first h2 */
.guide-content h2:first-child { border-top: none; margin-top: 0; }

.guide-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin: 32px 0 10px;
  scroll-margin-top: 88px;
}

.guide-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin: 24px 0 8px;
}

.guide-content p {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
  color: var(--text);
}

.guide-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-content ul,
.guide-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.guide-content li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.guide-content strong { font-weight: 700; color: var(--dark); }

.guide-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--dark);
}

.guide-content pre {
  background: #0f1729;
  border-radius: var(--radius);
  padding: 18px 22px;
  overflow-x: auto;
  margin: 16px 0 20px;
}

.guide-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.7;
}

/* Callout blockquotes */
.guide-content blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  color: var(--text);
}
.guide-content blockquote p { margin-bottom: 0; }

/* Tables */
.guide-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px 0;
}

.guide-content th {
  background: var(--bg-light);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.guide-content td {
  padding: 9px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}

.guide-content tr:nth-child(even) td { background: var(--bg-light); }

/* Horizontal rules as section separators */
.guide-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ── Screenshots ─────────────────────────────────────────────────────────── */
.guide-content figure {
  margin: 24px 0;
}

.guide-content figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.guide-content figcaption {
  font-size: 13px;
  color: var(--subtle);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* Placeholder boxes (shown when the screenshot file doesn't exist yet) */
.screenshot-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-light);
  margin: 24px 0;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 32px;
  color: var(--subtle);
}

.placeholder-inner svg {
  opacity: .4;
}

.placeholder-caption {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  text-align: center;
}

.placeholder-filename {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  color: var(--subtle);
  margin: 0;
  background: rgba(0,0,0,.05);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Active nav link ─────────────────────────────────────────────────────── */
.nav-active {
  color: var(--primary) !important;
  font-weight: 600 !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .guide-sidebar {
    display: none;    /* collapsed on tablet/mobile */
  }

  .guide-content {
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .guide-header { padding: 40px 0 36px; }
  .guide-content h2 { font-size: 19px; }
  .guide-content h3 { font-size: 16px; }
}
