/* Page styles for templates/user_guide.html.
   Page-specific rules only; shared patterns belong in styles.css. */

.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 0; max-width: 1100px; margin: 0 auto; }
.guide-nav { position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; padding: var(--space-6) var(--space-4); border-right: 1px solid var(--border); }
.guide-nav a { display: block; padding: 5px var(--space-2); font-size: var(--text-md); color: var(--ink-soft); text-decoration: none; border-radius: 6px; line-height: 1.3; }
.guide-nav a:hover { color: var(--ink); background: var(--surface-soft); }
.guide-nav a.is-active { color: var(--ink); background: var(--surface-soft); font-weight: 600; }

.guide-content { padding: var(--space-8) var(--space-10) var(--space-12); min-width: 0; }
.guide-content h1 { font-size: var(--text-display); margin-bottom: var(--space-2); }
.guide-content h2 { font-size: var(--text-3xl); margin: var(--space-10) 0 var(--space-3); padding-top: var(--space-10); border-top: 1px solid var(--border-light); scroll-margin-top: 72px; }
.guide-content h3 { font-size: var(--text-lg); font-weight: 600; margin: var(--space-6) 0 var(--space-2); scroll-margin-top: 72px; }
.guide-content p { line-height: 1.6; }
.guide-content ul, .guide-content ol { line-height: 1.6; padding-left: 1.3em; }
.guide-content li + li { margin-top: 4px; }

.guide-lede {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 var(--space-2);
}
.guide-uploads-note { color: var(--ink-soft); font-size: var(--text-md); margin-top: var(--space-4); }

/* ---- Process stepper ---- */
.guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-2);
  padding: 0;
  list-style: none;
}
.guide-step {
  flex: 1 1 160px;
  position: relative;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.guide-step-title { font-weight: 600; font-size: var(--text-md); margin: 0 0 4px; }
.guide-step-desc { font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.45; margin: 0; }

/* ---- Tables ---- */
.guide-table { width: 100%; border-collapse: collapse; font-size: var(--text-md); margin: var(--space-3) 0 var(--space-5); }
.guide-table th { text-align: left; padding: var(--space-2) var(--space-3); background: var(--surface-soft); font-weight: 600; }
.guide-table td { padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border-light); vertical-align: top; }
.guide-table code { background: var(--surface-soft); padding: 1px 5px; border-radius: 4px; }

/* ---- Family / kind badges ---- */
.guide-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.guide-badge--typed { background: #dbeafe; color: #1d4ed8; }
.guide-badge--general { background: var(--surface-soft); color: var(--ink-soft); border: 1px solid var(--border); }

/* ---- Confidence legend ---- */
.guide-confidence-list { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-5); display: grid; gap: var(--space-2); }
.guide-confidence-list li { display: flex; align-items: baseline; gap: var(--space-3); }
.guide-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 999px; display: inline-block; margin-top: 5px; }
.guide-dot--high { background: var(--success); }
.guide-dot--medium { background: #d97706; }
.guide-dot--low { background: var(--danger); }
.guide-dot--unknown { background: #c2410c; }
.guide-confidence-label { font-weight: 600; min-width: 130px; }
.guide-confidence-desc { color: var(--ink-soft); }

/* ---- Callouts ---- */
.guide-callout {
  border-left: 3px solid var(--border);
  background: var(--surface-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  font-size: var(--text-md);
  line-height: 1.55;
}
.guide-callout strong { color: var(--ink); }
.guide-callout--warn { border-left-color: #d97706; }

/* ---- Type detail accordions (reuses base details/summary look) ---- */
.guide-type-details { margin-top: var(--space-2); }
.guide-type-details summary { display: flex; align-items: center; gap: var(--space-2); }
.guide-type-body { padding: 0 var(--space-3) var(--space-3); }
.guide-type-body p { margin: 6px 0; }

/* ---- FAQ ---- */
.guide-faq { margin-top: var(--space-2); }

@media (max-width: 768px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-nav { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .guide-content { padding: var(--space-6) var(--space-4); }
  .guide-step { flex: 1 1 100%; }
}
