/* ── Docs Layout ── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 0;
  gap: 40px;
  min-height: 100vh;
}

/* ── Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 16px 0;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 12px;
}

.sidebar-link {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: var(--transition);
  border-left: 2px solid transparent;
}

.sidebar-link:hover {
  color: var(--text);
  background: rgba(0,0,0,0.03);
}

.sidebar-link.active {
  color: var(--primary);
  background: var(--primary-light);
  border-left-color: var(--primary);
  font-weight: 500;
}

/* ── Docs Content ── */
.docs-content {
  max-width: 760px;
  padding-bottom: 80px;
}

.docs-section {
  scroll-margin-top: 80px;
}

.docs-section h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.docs-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
}

.docs-section h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.docs-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.docs-lead {
  font-size: 17px !important;
  color: var(--text-secondary);
  margin-bottom: 28px !important;
}

.docs-divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 40px 0;
}

/* ── Docs cards ── */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}

.docs-card { padding: 20px; }

.docs-card h3 { margin-bottom: 6px; }

.docs-card p {
  font-size: 13px;
  line-height: 1.5;
}

.docs-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.docs-card-icon.blue { background: rgba(59,130,246,0.08); color: var(--accent-blue); }
.docs-card-icon.purple { background: rgba(139,92,246,0.08); color: var(--accent-purple); }
.docs-card-icon.green { background: rgba(34,197,94,0.08); color: var(--accent-green); }

/* ── Docs Steps ── */
.docs-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.docs-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.docs-step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.docs-step h3 { margin-bottom: 4px; }
.docs-step p { margin-bottom: 0; }

/* ── Step list (setup) ── */
.docs-step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.docs-step-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}

.docs-step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.docs-step-item h3 { margin-bottom: 6px; }
.docs-step-item p { margin-bottom: 0; }

.docs-step-item code {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ── Lists ── */
.docs-list {
  list-style: none;
  margin: 12px 0;
}

.docs-list li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.docs-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.5;
}

.docs-list li strong { color: var(--text); }

.docs-list li code {
  background: var(--primary-light);
  color: var(--primary);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}

/* ── Feature list ── */
.docs-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
}

.docs-feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.docs-feature h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.docs-feature p {
  margin-bottom: 0;
  font-size: 14px;
}

/* ── Tables ── */
.docs-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.docs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.docs-table th,
.docs-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--card-border);
}

.docs-table th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg);
}

.docs-table td { color: var(--text-secondary); }
.docs-table td strong { color: var(--text); }

.docs-table tr:last-child td { border-bottom: none; }

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.type-badge.task { background: rgba(59,130,246,0.1); color: var(--accent-blue); }
.type-badge.decision { background: rgba(139,92,246,0.1); color: var(--accent-purple); }
.type-badge.reminder { background: rgba(249,115,22,0.1); color: var(--accent-orange); }

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.live { background: rgba(34,197,94,0.1); color: var(--accent-green); }
.status-badge.soon { background: rgba(59,130,246,0.1); color: var(--accent-blue); }
.status-badge.planned { background: rgba(0,0,0,0.06); color: var(--text-muted); }

/* ── Examples (QA) ── */
.docs-examples {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.docs-example {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.example-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.example-q::before {
  content: 'Q: ';
  color: var(--primary);
}

.example-a {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.example-a::before {
  content: 'A: ';
  color: var(--accent-green);
  font-weight: 600;
}


/* ── Nav active state for docs ── */
.nav-links a.active { color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    top: 64px;
    left: -280px;
    width: 260px;
    height: calc(100vh - 64px);
    background: var(--card);
    border-right: 1px solid var(--card-border);
    z-index: 90;
    padding: 16px;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }

  .docs-sidebar.open { left: 0; }
}

@media (max-width: 768px) {
  .docs-content { padding-bottom: 60px; }
  .docs-section h1 { font-size: 26px; }
  .docs-section h2 { font-size: 20px; }
  .pricing-cards { grid-template-columns: 1fr; }
  .docs-cards { grid-template-columns: 1fr; }
}
