/* ============================================
   HELP CENTER (v13.32.24)
   ============================================ */

/* Layout */
.help-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.help-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--surface, white);
    border-right: 1px solid var(--border, #e5e7eb);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-main {
    flex: 1;
    overflow-y: auto;
    background: var(--bg, #f8f9fb);
}

.help-main-inner {
    max-width: 680px;
    padding: 32px 40px 64px;
}

/* Search */
.help-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 14px 8px;
    padding: 9px 12px;
    background: var(--gray-50, #f1f5f9);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 8px;
}

.help-search-wrap svg {
    width: 15px;
    height: 15px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.help-search-wrap input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    width: 100%;
}

/* Nav List */
.help-nav-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px 16px;
}

.help-nav-item {
    margin-bottom: 2px;
}

.help-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    background: transparent;
    color: var(--gray-500, #64748b);
    transition: background 0.12s, color 0.12s;
}

.help-nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--gray-400, #94a3b8);
}

.help-nav-btn:hover {
    background: var(--gray-50, #f9fafb);
}

.help-nav-btn.active {
    background: #FFF7ED;
    color: var(--accent, #2563eb);
}

.help-nav-btn.active svg {
    color: var(--accent, #2563eb);
}

.help-nav-cnt {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: var(--gray-400);
}

/* Sub-nav (articles within a section) */
.help-nav-sub {
    display: none;
    padding: 2px 0 4px 38px;
}

.help-nav-item.open .help-nav-sub {
    display: block;
}

.help-sub-btn {
    display: block;
    width: 100%;
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
    background: transparent;
    color: var(--gray-400, #94a3b8);
    transition: all 0.12s;
}

.help-sub-btn:hover {
    color: var(--text-muted);
}

.help-sub-btn.active {
    background: #FFF1EB;
    color: var(--accent, #2563eb);
    font-weight: 600;
}

/* Breadcrumbs */
.help-crumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-400, #94a3b8);
    margin-bottom: 16px;
}

.help-crumbs svg {
    width: 12px;
    height: 12px;
}

.help-crumb-active {
    color: var(--text);
    font-weight: 500;
}

/* Title & Divider */
.help-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.help-rule {
    height: 1px;
    background: var(--border, #e5e7eb);
    margin: 18px 0 24px;
}

/* Article Body */
.help-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted, #475569);
}

.help-body p {
    margin: 0 0 14px;
}

.help-body strong {
    color: var(--text);
}

/* Pipeline Flow */
.help-pipeline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 18px 0;
    padding: 16px 20px;
    background: var(--surface, white);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
}

.help-pipe-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.help-pipe-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pipe-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-pipe-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.help-pipe-desc {
    font-size: 11px;
    color: var(--gray-400);
}

.help-pipe-arrow {
    color: var(--gray-300);
}

/* Data Table */
.help-dt {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
    font-size: 13px;
}

.help-dt-head {
    display: grid;
    padding: 10px 14px;
    background: var(--gray-50, #f9fafb);
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-weight: 700;
    color: var(--text);
}

.help-dt-row {
    display: grid;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
    color: var(--text-muted);
}

.help-dt-row:last-child {
    border-bottom: none;
}

.help-dt-2 .help-dt-head,
.help-dt-2 .help-dt-row { grid-template-columns: 140px 1fr; }

.help-dt-4 .help-dt-head,
.help-dt-4 .help-dt-row { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* Formula Block */
.help-formula {
    padding: 16px 20px;
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin: 16px 0;
    color: var(--text);
}

/* Comparison Cards */
.help-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}

.help-compare-card {
    padding: 16px;
    border-radius: 10px;
}

.help-compare-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
}

.help-compare-card p {
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.help-compare-synced {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.help-compare-synced h4 { color: #166534; }
.help-compare-synced p { color: #166534; }

.help-compare-manual {
    background: var(--surface, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
}

.help-compare-manual h4 { color: var(--text); }
.help-compare-manual p { color: var(--text-muted); }

/* Tip & Warning Callouts */
.help-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    font-size: 13px;
    color: #1e40af;
    margin: 16px 0;
    line-height: 1.55;
}

.help-tip svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.help-warn {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    border-radius: 6px;
    font-size: 13px;
    color: #991b1b;
    margin: 16px 0;
    line-height: 1.55;
}

.help-warn svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Keyboard Shortcuts */
.help-kbd-list {
    display: grid;
    gap: 8px;
}

.help-kbd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    background: var(--surface, white);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
}

.help-body kbd {
    display: inline-block;
    padding: 3px 9px;
    background: var(--gray-50, #f1f5f9);
    border: 1px solid var(--gray-200, #d1d5db);
    border-radius: 5px;
    font-family: 'SF Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 1px 0 var(--gray-200, #d1d5db);
}

.help-kbd-plus {
    color: var(--gray-300);
    margin: 0 2px;
    font-size: 12px;
}

/* Prev/Next Navigation */
.help-pager {
    display: flex;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #e5e7eb);
}

.help-pager:empty {
    display: none;
}

.help-pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--surface, white);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s;
}

.help-pg-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.help-pg-btn svg {
    width: 14px;
    height: 14px;
}

.help-pg-next {
    margin-left: auto;
    color: var(--accent, #2563eb);
    font-weight: 600;
}

/* No Results */
.help-no-results {
    display: none;
    text-align: center;
    padding: 32px 16px;
    color: var(--gray-400);
}

.help-no-results p { margin: 4px 0 0; font-size: 12px; }

/* Mobile */
@media (max-width: 768px) {
    .help-sidebar { width: 100%; max-width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 220px; }
    .help-layout { flex-direction: column; }
    .help-main-inner { padding: 20px 16px 48px; }
    .help-title { font-size: 20px; }
    .help-compare { grid-template-columns: 1fr; }
    .help-pipeline { flex-direction: column; }
    .help-pipe-arrow { transform: rotate(90deg); }
}


/* Tour Launch Button */
.help-tour-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 20px;
    background: var(--accent, #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: filter 0.15s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(241, 90, 41, 0.3);
}

.help-tour-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(241, 90, 41, 0.35);
}

.help-tour-btn:active {
    transform: translateY(0);
}

.help-tour-btn svg {
    flex-shrink: 0;
}
