/* ── CSS Custom Properties ── */
:root {
    --bg:           #0f172a;
    --text-primary: #f1f5f9;
    --text-muted:   #94a3b8;
    --text-faint:   #64748b;
    --text-dim:     #475569;
    --surface:      #1e293b;
    --border:       #334155;
    --accent:       #3b82f6;
    --accent-hover: #93c5fd;
}

body.cohere {
    --bg:           #ffffff;
    --text-primary: #212121;
    --text-muted:   #616161;
    --text-faint:   #93939f;
    --text-dim:     #93939f;
    --surface:      #eeece7;
    --border:       #e5e7eb;
    --accent:       #1863dc;
    --accent-hover: #17171c;
}

/* ── Base ── */
body {
    background: var(--bg);
    color: var(--text-primary);
    transition: background 0.25s, color 0.25s;
}

/* ── Theme toggle ── */
.theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.theme-toggle:hover {
    border-color: var(--text-dim);
    color: var(--text-muted);
}

.toggle-track {
    width: 30px;
    height: 16px;
    background: var(--border);
    border-radius: 9999px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    background: var(--text-dim);
    transition: transform 0.25s, background 0.25s;
}

/* ── Cohere toggle state ── */
body.cohere .theme-toggle {
    background: #eeece7;
    border-color: #d9d9dd;
    color: #93939f;
}

body.cohere .theme-toggle:hover {
    border-color: #17171c;
    color: #212121;
}

body.cohere .toggle-track {
    background: #ff7759;
}

body.cohere .toggle-thumb {
    transform: translateX(14px);
    background: #ffffff;
}

body.cohere .toggle-label {
    color: #212121;
}
