/* ─── Guide Page Layout ──────────────────────────────────────────── */

.guide-wrap {
    display: flex;
    /* stretch (default): both columns same height — required for sticky sidebar */
    gap: 0;
    padding: 104px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ─── Sidebar ────────────────────────────────────────────────────── */

.guide-sidebar {
    width: 220px;
    flex-shrink: 0;
    /* plain flex column — no sticky here */
}

.sidebar-sticky {
    position: sticky;
    top: 96px;
    /* align-self keeps just the sticky inner at natural height */
    align-self: flex-start;
    background: var(--bg-color);
    padding-right: 24px;
    padding-top: 8px;
    z-index: 2;
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 12px;
    padding-left: 12px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.sidebar-link i {
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    color: var(--text-dark);
    background: var(--accent);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(0, 85, 255, 0.06);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* ─── Main Content ───────────────────────────────────────────────── */

.guide-content {
    flex: 1;
    min-width: 0;
    padding-left: 48px;
    border-left: 1px solid var(--border);
}

/* ─── Section ────────────────────────────────────────────────────── */

.guide-section {
    margin-bottom: 72px;
    scroll-margin-top: 104px;
}

.guide-section:last-child { margin-bottom: 0; }

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 12px;
}

.guide-section h2 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-dark);
    line-height: 1.25;
}

.guide-section > p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 640px;
}

/* ─── Step Cards ─────────────────────────────────────────────────── */

.steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: box-shadow 0.2s ease;
}

.step-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.step-num {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
    font-family: 'Fira Code', monospace;
}

.step-body { flex: 1; }

.step-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.step-body p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

.step-body p + p { margin-top: 8px; }

/* ─── Platform Tabs (inside guide) ──────────────────────────────── */

.guide-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}

.guide-tabs::-webkit-scrollbar { display: none; }

.guide-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    margin-bottom: -1px;
}

.guide-tab-btn:hover { color: var(--text-dark); }

.guide-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.guide-tab-panel { display: none; }
.guide-tab-panel.active { display: block; }

/* ─── Tip / Warning / Info Boxes ─────────────────────────────────── */

.tip-box {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 20px 0;
}

.tip-box i { flex-shrink: 0; margin-top: 2px; font-size: 0.9rem; }

.tip-box.info {
    background: rgba(0, 85, 255, 0.05);
    border: 1px solid rgba(0, 85, 255, 0.15);
    color: #1e3a8a;
}

.tip-box.info i { color: var(--primary); }

.tip-box.warn {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #92400e;
}

.tip-box.warn i { color: #f59e0b; }

.tip-box.success {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #14532d;
}

.tip-box.success i { color: #22c55e; }

/* ─── Code Block ─────────────────────────────────────────────────── */

.code-block {
    background: #1e2130;
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.code-block-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    font-family: 'Fira Code', monospace;
}

.code-copy-btn {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    font-family: 'Inter', sans-serif;
    padding: 2px 6px;
}

.code-copy-btn:hover { color: rgba(255,255,255,0.75); }

.code-block pre {
    margin: 0;
    padding: 16px 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: pre;
}

/* ─── Feature Grid ───────────────────────────────────────────────── */

.feature-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.feat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.feat-card-icon {
    width: 38px;
    height: 38px;
    background: rgba(0, 85, 255, 0.08);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.feat-card h4 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.feat-card p {
    font-size: 0.83rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* ─── Divider ────────────────────────────────────────────────────── */

.guide-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 64px 0;
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .guide-sidebar { width: 190px; }
}

@media (max-width: 860px) {
    .guide-wrap { flex-direction: column; padding-top: 96px; }
    .guide-sidebar { width: 100%; }
    .sidebar-sticky {
        position: static;
        width: 100%;
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 28px;
        border-bottom: 1px solid var(--border);
    }
    .guide-content {
        padding-left: 0;
        border-left: none;
    }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .sidebar-link { border-left: none; border-bottom: 2px solid transparent; border-radius: 6px; }
    .sidebar-link.active { border-bottom-color: var(--primary); border-left-color: transparent; background: rgba(0,85,255,0.06); }
    .feature-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .step-card { flex-direction: column; gap: 12px; }
    .guide-section h2 { font-size: 1.5rem; }
}


/* ─── Page title ─────────────────────────────────────────────────── */
.guide-title-block { margin-bottom: 36px; }
.guide-title-block h1 {
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 0 0 10px;
}
.guide-lead {
    font-size: 1.02rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    max-width: 720px;
}
