/* =====================
   GUIDE LAYOUT
===================== */
.guide-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.guide-sidebar {
  border-right: .5px solid var(--border);
  padding: 32px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.guide-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.guide-nav-item {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all .15s;
  cursor: pointer;
}
.guide-nav-item:hover { color: var(--indigo-600); background: var(--indigo-50); }
.guide-nav-item.active { color: var(--indigo-600); background: var(--indigo-50); font-weight: 600; }

/* ── Content ─────────────────────────────────────────────── */
.guide-content {
  padding: 40px 48px 100px;
  min-width: 0;
}

.guide-section { display: none; }
.guide-section.active { display: block; }

/* ── Section header ──────────────────────────────────────── */
.guide-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: .5px solid var(--border);
}
.guide-section-icon {
  font-size: 28px;
  line-height: 1;
  margin-top: 2px;
}
.guide-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.guide-section-header p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}

/* ── Field list ─────────────────────────────────────────── */
.guide-field-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: .5px solid var(--border-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.guide-field {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: .5px solid var(--border);
  align-items: center;
  transition: background .18s, padding .18s, transform .18s;
  cursor: default;
}
.guide-field:last-child { border-bottom: none; }
.guide-field:hover {
  background: var(--indigo-50);
  padding: 16px 22px;
  border-radius: var(--radius-md);
}
[data-theme="dark"] .guide-field:hover {
  background: rgba(79,70,229,0.08);
}
.guide-field-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  font-family: "SFMono-Regular", Consolas, monospace;
  transition: color .18s, font-size .18s;
}
.guide-field:hover .guide-field-name {
  color: var(--indigo-600);
  font-size: 14px;
}
.guide-field-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  transition: color .18s, font-size .18s;
}
.guide-field:hover .guide-field-desc {
  color: var(--text-1);
  font-size: 14px;
}
.field-req {
  color: #dc2626;
  font-family: inherit;
  font-weight: 700;
}

/* ── Subsection ─────────────────────────────────────────── */
.guide-subsection {
  margin-bottom: 32px;
}
.guide-subsection h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 14px;
}

/* ── Override step-item for guide ───────────────────────── */
.guide-content .step-list {
  margin-bottom: 24px;
}
.guide-content .step-content code {
  font-family: monospace;
  font-size: 12px;
  background: var(--bg-alt);
  border: .5px solid var(--border-md);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--indigo-600);
}

/* ── Responsive ─────────────────────────────────────────── */
@media(max-width:900px){
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { display: none; }
  .guide-content { padding: 28px 20px 60px; }
}

/* =====================
   GUIDE CHOOSER
===================== */
.guide-chooser {
  padding: 48px 24px 60px;
  border-bottom: .5px solid var(--border);
}
.guide-chooser-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.guide-chooser-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo-600);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 24px;
}
.guide-chooser-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media(max-width:540px){ .guide-chooser-cards { grid-template-columns: 1fr; } }

.guide-chooser-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.guide-chooser-card:hover {
  border-color: var(--indigo-400);
  background: var(--indigo-50);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(79,70,229,.12);
}
.guide-chooser-icon {
  font-size: 40px;
  margin-bottom: 14px;
  line-height: 1;
}
.guide-chooser-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}
.guide-chooser-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.guide-chooser-card:hover h3 { color: var(--indigo-600); }

/* ── Chooser / Layout visibility ──────────────────────────── */
#guide-layout         { display: none; }
#guide-chooser        { display: block; }
#guide-layout.hidden  { display: none !important; }
#guide-chooser.hidden { display: none !important; }
#guide-layout:not(.hidden) { display: grid; }