/* ── MANUAL PAGE SPECIFIC STYLES ── */

.manual-layout {
    display: flex;
    gap: 48px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

/* ── SIDEBAR TOC ── */
.manual-sidebar {
    position: sticky;
    top: 100px;
    width: 250px;
    flex-shrink: 0;
    padding-right: 24px;
    border-right: 1px solid var(--border-subtle);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cool);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    text-decoration: none;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--nav-selected);
    font-weight: 600;
}

/* ── CONTENT AREA ── */
.manual-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 120px;
}

.manual-section {
    margin-bottom: 80px;
    padding-top: 40px;
}

.manual-section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-medium);
}

.manual-section h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 16px;
}

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

.manual-section ul,
.manual-section ol {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-left: 20px;
}

.manual-section li {
    margin-bottom: 8px;
}

/* ── SCREENSHOT FIGURE ── */
.screenshot-figure {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screenshot-phone-frame {
    position: relative;
    width: 280px;
    background: #111;
    border-radius: 24px;
    padding: 8px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 8px 32px rgba(0,0,0,0.5),
        0 2px 8px rgba(0,0,0,0.3);
}

.screenshot-phone-frame img {
    width: 100%;
    border-radius: 16px;
    display: block;
}

.screenshot-caption {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    max-width: 360px;
}

/* Side-by-side screenshots */
.screenshot-pair {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 32px 0;
}

.screenshot-pair .screenshot-figure {
    margin: 0;
    flex: 0 1 auto;
}

.screenshot-pair .screenshot-phone-frame {
    width: 240px;
}

/* ── STEP INDICATOR ── */
.manual-step {
    display: flex;
    gap: 20px;
    margin: 32px 0;
    padding: 20px;
    background: rgba(255,255,255,0.015);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-cool);
    color: #0A0A0A;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.step-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* ── FEATURE HIGHLIGHT ── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.feature-item {
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s ease;
}

.feature-item:hover {
    border-color: var(--border-medium);
}

.feature-item .feature-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-cool);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.feature-item .feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ── UI ELEMENT LABELS ── */
.ui-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(128, 203, 196, 0.1);
    color: var(--accent-cool);
    border: 1px solid rgba(128, 203, 196, 0.2);
    vertical-align: baseline;
}

.ui-label.red {
    background: rgba(255, 82, 82, 0.1);
    color: var(--accent-red);
    border-color: rgba(255, 82, 82, 0.2);
}

.ui-label.green {
    background: rgba(105, 240, 174, 0.1);
    color: var(--nav-selected);
    border-color: rgba(105, 240, 174, 0.2);
}

.ui-label.amber {
    background: rgba(255, 193, 7, 0.1);
    color: #FFD54F;
    border-color: rgba(255, 193, 7, 0.2);
}

/* ── STATUS PILL ── */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill.synced {
    background: rgba(105, 240, 174, 0.1);
    color: var(--nav-selected);
    border: 1px solid rgba(105, 240, 174, 0.2);
}

.status-pill.drifting {
    background: rgba(255, 193, 7, 0.1);
    color: #FFD54F;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ── INFO BOXES ── */
.manual-note, .manual-warning, .manual-tip {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
}

.manual-note {
    background: rgba(255,255,255,0.03);
    border-left: 4px solid var(--accent-cool);
}

.manual-warning {
    background: rgba(255, 82, 82, 0.05);
    border-left: 4px solid var(--accent-red);
}

.manual-tip {
    background: rgba(105, 240, 174, 0.05);
    border-left: 4px solid var(--nav-selected);
}

.box-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.manual-note .box-title {
    color: var(--accent-cool);
}

.manual-warning .box-title {
    color: var(--accent-red);
}

.manual-tip .box-title {
    color: var(--nav-selected);
}

.manual-note p,
.manual-warning p,
.manual-tip p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* ── NAV TABS TABLE ── */
.nav-tabs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.nav-tabs-table th {
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cool);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-medium);
}

.nav-tabs-table td {
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
}

.nav-tabs-table td:first-child {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

/* ── SECTION DIVIDER ── */
.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cool), transparent);
    margin: 48px 0 32px;
    border: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .manual-layout {
        flex-direction: column;
    }
    .manual-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding-right: 0;
        padding-bottom: 24px;
        margin-bottom: 40px;
    }
    .screenshot-pair {
        flex-direction: column;
        align-items: center;
    }
    .screenshot-phone-frame {
        width: 260px;
    }
    .screenshot-pair .screenshot-phone-frame {
        width: 240px;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .manual-step {
        flex-direction: column;
        gap: 12px;
    }
    .nav-tabs-table {
        font-size: 13px;
    }
    .nav-tabs-table td,
    .nav-tabs-table th {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .screenshot-phone-frame {
        width: 220px;
    }
    .screenshot-pair .screenshot-phone-frame {
        width: 200px;
    }
}
