/* User guide layout — works with shared site header/footer */
.guide-page {
  background: var(--surface-light, #f8fafc);
}

.guide-page-wrap {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  gap: 2rem;
  align-items: flex-start;
}

.guide-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  background: white;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 1.25rem 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.guide-nav-title {
  margin: 0 1.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.guide-chapter-nav {
  display: flex;
  flex-direction: column;
}

.guide-chapter-nav a {
  display: block;
  padding: 0.45rem 1.25rem;
  color: var(--text, #0f172a);
  text-decoration: none;
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.guide-chapter-nav a:hover {
  background: #f1f5f9;
  text-decoration: none;
}

.guide-chapter-nav a.active {
  background: #eef2ff;
  color: var(--primary, #4f46e5);
  border-left-color: var(--primary, #4f46e5);
  font-weight: 600;
}

.guide-article {
  flex: 1;
  min-width: 0;
  background: white;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 2rem 2.25rem 2.5rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.guide-article h1 {
  font-size: 1.85rem;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.guide-lead {
  color: var(--muted, #64748b);
  font-size: 1.05rem;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.guide-article h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.guide-article h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.guide-article h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.guide-article p,
.guide-article li {
  font-size: 0.95rem;
  line-height: 1.75;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.guide-card {
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1.15rem;
}

.guide-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.guide-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}

.guide-callout {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  border-left: 4px solid;
}

.guide-callout-tip { background: #eff6ff; border-color: #3b82f6; color: #1e3a5f; }
.guide-callout-note { background: #fffbeb; border-color: #d97706; color: #78350f; }
.guide-callout-success { background: #ecfdf5; border-color: #059669; color: #064e3b; }

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  counter-reset: step;
}

.guide-steps li {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  counter-increment: step;
}

.guide-steps li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.guide-table th,
.guide-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.guide-table th {
  background: #eef2ff;
  font-weight: 600;
  color: #4338ca;
}

.guide-table tr:last-child td { border-bottom: none; }

.guide-kbd {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
}

.guide-checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.guide-checklist li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
}

.guide-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 700;
}

.guide-next-prev {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.guide-next-prev a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.guide-next-prev a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .guide-page-wrap {
    flex-direction: column;
    padding: 0 1rem 2rem;
  }

  .guide-sidebar {
    width: 100%;
    position: static;
  }

  .guide-chapter-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .guide-article {
    padding: 1.5rem 1.25rem;
  }
}

@media print {
  .site-header,
  .guide-sidebar,
  .site-footer { display: none !important; }

  .guide-page-wrap { display: block; padding: 0; }

  .guide-article { border: none; box-shadow: none; }
}
