/* ============================================================
 *  SOURCE MODAL
 * ============================================================ */
#source-modal {
    position: fixed; inset: 0;
    background: var(--bg-overlay-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9990;
}

.source-card {
    background: var(--bg-surface);
    padding: 40px 36px;
    border-radius: 16px;
    box-shadow: var(--shadow-modal);
    max-width: 420px;
    width: 92%;
    text-align: center;
}

.source-card h2 {
    font-size: 1.4rem;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.source-subtitle {
    color: var(--text-soft);
    font-size: 0.88rem;
    margin-bottom: 28px;
}

.source-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.source-btn-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.source-btn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.source-btn-text strong {
    font-size: 0.98rem;
    color: inherit;
}

.source-btn-text small {
    font-size: 0.78rem;
    opacity: 0.75;
    font-weight: normal;
}

.source-btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
}
.source-btn-primary:hover { background: var(--accent-hover); }

.source-btn-secondary {
    background: var(--aka-bg);
    color: var(--text-heading);
    border-color: var(--border-strong);
}
.source-btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }

/* ============================================================
 *  HELP / USER GUIDE MODAL
 * ============================================================ */
#help-overlay {
    position: fixed; inset: 0;
    background: var(--bg-overlay-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9995;
    padding: 24px;
}

.help-modal {
    background: var(--bg-surface);
    border-radius: 14px;
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 880px;
    height: 100%;
    max-height: 620px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-header);
    color: var(--text-on-header);
    flex-shrink: 0;
}

.help-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.help-close {
    background: transparent;
    border: none;
    color: var(--text-on-header);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
    min-width: 44px;
    min-height: 44px;
}
.help-close:hover { background: rgba(255, 255, 255, 0.15); }

.help-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.help-nav {
    flex-shrink: 0;
    width: 220px;
    background: var(--bg-surface-alt);
    border-right: 1px solid var(--accent-border-soft);
    padding: 12px 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-nav-btn {
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.86rem;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    min-height: 44px;
}
.help-nav-btn:hover { background: var(--bg-hover-soft); color: var(--text-heading); }
.help-nav-btn.active {
    background: var(--accent);
    color: var(--text-on-accent);
    font-weight: 600;
}

.help-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

.help-topic { display: none; }
.help-topic.active { display: block; }

.help-topic h3 {
    font-size: 1.25rem;
    color: var(--text-heading);
    margin: 0 0 12px;
}
.help-topic h4 {
    font-size: 0.98rem;
    color: var(--text-heading);
    margin: 20px 0 6px;
}
.help-topic p {
    font-size: 0.9rem;
    color: var(--text-body, var(--text-soft));
    line-height: 1.6;
    margin: 0 0 10px;
}
.help-topic ul,
.help-topic ol {
    font-size: 0.9rem;
    color: var(--text-body, var(--text-soft));
    line-height: 1.6;
    margin: 0 0 10px;
    padding-left: 22px;
}
.help-topic li { margin-bottom: 5px; }
.help-topic strong { color: var(--text-heading); }

.help-tip {
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 10px 14px !important;
    margin-top: 14px !important;
}

@media (max-width: 680px) {
    .nav-btn-help .help-label { display: none; }
    .help-modal { max-height: none; border-radius: 0; }
    .help-modal-body { flex-direction: column; }
    .help-nav {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--accent-border-soft);
    }
    .help-content { padding: 18px; }
}
