/* ── Onboarding Wizard ─────────────────────────────────────────────────────── */

#ob-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-2);
    overflow-y: auto;
}

/* ── Card ── */

.ob-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    padding: 36px 32px 28px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Skip button ── */

.ob-skip {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 12px;
    color: var(--text-4);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: color 0.12s, background 0.12s;
    font-family: inherit;
}

.ob-skip:hover {
    color: var(--text-2);
    background: var(--surface-2);
}

/* ── Header ── */

.ob-header {
    text-align: center;
    margin-bottom: 24px;
}

.ob-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.ob-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.ob-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.03em;
    margin: 0 0 6px;
}

.ob-subtitle {
    font-size: 13.5px;
    color: var(--text-3);
    margin: 0;
    line-height: 1.55;
}

/* ── Stepper ── */

.ob-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 24px;
    gap: 0;
}

.ob-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.ob-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface-2);
    color: var(--text-4);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.ob-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-4);
    white-space: nowrap;
    transition: color 0.18s;
}

/* Active step */
.ob-step-item--active .ob-step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.ob-step-item--active .ob-step-label {
    color: var(--accent);
}

/* Done step */
.ob-step-item--done .ob-step-num {
    background: var(--success, #22c55e);
    border-color: var(--success, #22c55e);
    color: #fff;
}

.ob-step-item--done .ob-step-label {
    color: var(--success, #22c55e);
}

/* Connector line */
.ob-step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 16px 8px 0; /* offset = half of num height */
    min-width: 32px;
    max-width: 80px;
}

/* ── Panel ── */

.ob-panel {
    margin-bottom: 20px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.ob-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 8px;
    text-align: center;
}

.ob-panel-desc {
    font-size: 13.5px;
    color: var(--text-3);
    margin: 0 0 14px;
    line-height: 1.6;
    text-align: center;
}

.ob-panel-hint {
    font-size: 12.5px;
    color: var(--text-4);
    text-align: center;
    margin-top: 10px;
    line-height: 1.55;
}

/* ── Instruction textarea + copy ── */

.ob-instr-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ob-textarea {
    width: 100%;
    box-sizing: border-box;
    height: 150px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-2);
    font-size: 11.5px;
    font-family: "SF Mono", "Fira Code", Consolas, "Courier New", monospace;
    line-height: 1.65;
    padding: 12px 14px;
    resize: none;
    outline: none;
    display: block;
    transition: border-color 0.12s;
}

.ob-textarea:focus {
    border-color: var(--accent);
}

.ob-textarea--import {
    height: 160px;
    font-size: 12px;
    color: var(--text-1);
}

.ob-copy-btn {
    width: 100%;
    height: 42px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, opacity 0.12s;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.ob-copy-btn:hover:not(:disabled) {
    background: var(--accent-strong);
}

.ob-copy-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

/* ── LLM grid ── */

.ob-llm-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ob-llm-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-1);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    cursor: pointer;
}

.ob-llm-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.ob-llm-arrow {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.45;
}

/* ── Import feedback ── */

.ob-import-feedback {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ob-import-feedback--success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

[data-theme="dark"] .ob-import-feedback--success {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
}

.ob-import-feedback--error {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.ob-import-btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

/* ── Bottom navigation ── */

.ob-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    margin-top: auto;
}

.ob-nav-pips {
    display: flex;
    gap: 7px;
    align-items: center;
}

.ob-pip {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-strong);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.ob-pip--active {
    background: var(--accent);
    transform: scale(1.35);
}

.ob-nav-back,
.ob-nav-next {
    min-width: 110px;
    justify-content: center;
    white-space: nowrap;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    .ob-card {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .ob-step-line {
        min-width: 16px;
    }

    .ob-step-label {
        font-size: 10px;
    }

    .ob-panel-title {
        font-size: 14px;
    }

    .ob-nav-back,
    .ob-nav-next {
        min-width: 90px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .ob-stepper {
        gap: 0;
    }

    .ob-step-line {
        min-width: 10px;
    }

    .ob-step-label {
        display: none;
    }
}
