/* ============================================
   DOCS — HERO
   ============================================ */
.docs-hero {
  background: var(--navy);
  padding: calc(80px + 2.5rem) 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.docs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 70%);
}

.docs-hero-inner {
  position: relative;
  z-index: 1;
}

.docs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.docs-hero p {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.5);
}

/* ============================================
   DOCS — LAYOUT
   ============================================ */
.docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - 200px);
}

/* Sidebar */
.docs-sidebar {
  background: var(--off-white);
  border-bottom: 1px solid var(--grey-100);
  padding: 1.5rem;
}

.docs-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.docs-sidebar-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.2s;
}

.docs-sidebar-toggle.open svg { transform: rotate(180deg); }

.docs-sidebar-nav {
  display: none;
  margin-top: 0.75rem;
}

.docs-sidebar-nav.open { display: block; }

.docs-nav-section {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 0 0.5rem;
}

.docs-nav-link {
  display: block;
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--body-text);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.docs-nav-link:hover {
  background: var(--white);
  color: var(--navy);
}

.docs-nav-link.active {
  background: var(--blue-glow);
  color: var(--blue);
  font-weight: 600;
}

/* Article content */
.docs-content {
  padding: 2rem clamp(1.25rem, 4vw, 2rem) 4rem;
  max-width: 780px;
}

/* ============================================
   DOCS — BREADCRUMBS
   ============================================ */
.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.docs-breadcrumbs a {
  color: var(--muted);
  transition: color 0.15s;
}

.docs-breadcrumbs a:hover { color: var(--blue); }

.docs-breadcrumbs svg { width: 12px; height: 12px; }

/* ============================================
   DOCS — ARTICLE TYPOGRAPHY
   ============================================ */
.docs-content h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.docs-content .docs-subtitle {
  font-size: var(--text-base);
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.docs-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--navy);
  line-height: 1.25;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-100);
}

.docs-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.docs-content h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.docs-content p {
  font-size: var(--text-base);
  color: var(--body-text);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.docs-content ul, .docs-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.docs-content li {
  font-size: var(--text-base);
  color: var(--body-text);
  line-height: 1.75;
  margin-bottom: 0.35rem;
}

.docs-content strong { color: var(--navy); }

.docs-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: var(--grey-50);
  border: 1px solid var(--grey-100);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--blue);
}

/* ============================================
   DOCS — CALLOUT BOXES
   ============================================ */
.docs-callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: var(--text-sm);
  line-height: 1.65;
}

.docs-callout-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.docs-callout-info {
  background: var(--blue-glow);
  border-left: 3px solid var(--blue);
  color: #003D99;
}

.docs-callout-tip {
  background: var(--green-light);
  border-left: 3px solid var(--green);
  color: #065F46;
}

.docs-callout-warning {
  background: var(--amber-light);
  border-left: 3px solid var(--amber);
  color: #92400E;
}

/* ============================================
   DOCS — STEP LIST
   ============================================ */
.docs-steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.docs-step {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.docs-step::before {
  content: counter(step);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-top: 2px;
}

.docs-step-content h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: var(--text-base);
}

.docs-step-content p {
  margin-bottom: 0.5rem;
}

/* ============================================
   DOCS — NEXT ARTICLES
   ============================================ */
.docs-next {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grey-100);
}

.docs-next h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  margin-top: 0;
}

.docs-next-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.docs-next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  transition: all 0.15s;
}

.docs-next-link:hover {
  border-color: var(--blue);
  background: var(--blue-glow);
  color: var(--blue);
}

.docs-next-link svg { width: 16px; height: 16px; flex-shrink: 0; }

@media (min-width: 640px) {
  .docs-next-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   DESKTOP LAYOUT (sidebar always visible)
   ============================================ */
@media (min-width: 768px) {
  .docs-layout {
    grid-template-columns: 260px 1fr;
  }

  .docs-sidebar {
    border-bottom: none;
    border-right: 1px solid var(--grey-100);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 80px;
    height: calc(100vh - 72px);
    overflow-y: auto;
  }

  .docs-sidebar-toggle { display: none; }
  .docs-sidebar-nav { display: block !important; }

  .docs-content {
    padding: 2.5rem clamp(2rem, 4vw, 3rem) 4rem;
  }
}
