/* ╔══════════════════════════════════════════════════════════════════╗
   ║  COGNSCAPE STUDIO — style.css                                   ║
   ║  Mobile-first. Dark + Light themes. COGNSCAPE palette.          ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ── FONTS & RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Crimson Text', Georgia, serif; line-height: 1.6; min-height: 100vh; }
a { text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

/* ── DARK THEME VARIABLES ───────────────────────────────────────── */
:root,
[data-theme="dark"],
body.theme-dark {
    --bg:          #06041A;
    --bg2:         #0E0C28;
    --bg3:         #141230;
    --surface:     #1A1840;
    --surface2:    #221F4A;
    --border:      rgba(0,206,201,0.15);
    --border2:     rgba(255,255,255,0.07);

    --teal:        #00CEC9;
    --tealL:       #1AEEE8;
    --tealD:       #009E9A;
    --gold:        #F5C518;
    --goldW:       #E8902A;
    --purple:      #7B2FBE;
    --purpleL:     #A855F7;
    --sunset:      #FF6B35;
    --magenta:     #D4289A;
    --danger:      #FF4D6D;
    --success:     #10B981;
    --warning:     #F59E0B;

    --text:        #E8E0D0;
    --text2:       #A89F90;
    --text3:       #6B6358;
    --heading:     #FFFFFF;

    --nav-bg:      #07051E;
    --nav-width:   240px;
    --topbar-h:    56px;

    --shadow:      0 4px 24px rgba(0,0,0,0.5);
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.35);
    --glow-teal:   0 0 20px rgba(0,206,201,0.25);
    --glow-gold:   0 0 20px rgba(245,197,24,0.2);

    --input-bg:    rgba(255,255,255,0.04);
    --input-border:rgba(0,206,201,0.2);

    --card-bg:     #0E0C28;
    --card-border: rgba(0,206,201,0.12);

    --badge-idea:      rgba(100,100,255,0.2);
    --badge-idea-c:    #9999FF;
    --badge-scripted:  rgba(0,206,201,0.2);
    --badge-scripted-c:#00CEC9;
    --badge-recorded:  rgba(245,197,24,0.2);
    --badge-recorded-c:#F5C518;
    --badge-edited:    rgba(168,85,247,0.2);
    --badge-edited-c:  #A855F7;
    --badge-published: rgba(16,185,129,0.2);
    --badge-published-c:#10B981;
}

/* ── LIGHT THEME VARIABLES ──────────────────────────────────────── */
[data-theme="light"],
body.theme-light {
    --bg:          #F0EBE0;
    --bg2:         #FAF7F2;
    --bg3:         #FFFFFF;
    --surface:     #FFFFFF;
    --surface2:    #F5F0E8;
    --border:      rgba(0,130,128,0.18);
    --border2:     rgba(0,0,0,0.08);

    --teal:        #007A78;
    --tealL:       #009E9A;
    --tealD:       #006260;
    --gold:        #B8860B;
    --goldW:       #C47A00;
    --purple:      #6B2FAE;
    --purpleL:     #8B3FC0;
    --sunset:      #D4520A;
    --magenta:     #B0206E;
    --danger:      #DC2626;
    --success:     #059669;
    --warning:     #D97706;

    --text:        #2A2030;
    --text2:       #5A4E60;
    --text3:       #8A7E8A;
    --heading:     #1A1030;

    --nav-bg:      #1A1540;
    --nav-width:   240px;
    --topbar-h:    56px;

    --shadow:      0 4px 24px rgba(0,0,0,0.12);
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
    --glow-teal:   0 0 16px rgba(0,130,128,0.15);
    --glow-gold:   0 0 16px rgba(184,134,11,0.15);

    --input-bg:    #FFFFFF;
    --input-border:rgba(0,130,128,0.25);

    --card-bg:     #FFFFFF;
    --card-border: rgba(0,130,128,0.15);

    --badge-idea:      rgba(99,102,241,0.12);
    --badge-idea-c:    #6366F1;
    --badge-scripted:  rgba(0,130,128,0.12);
    --badge-scripted-c:#007A78;
    --badge-recorded:  rgba(184,134,11,0.12);
    --badge-recorded-c:#B8860B;
    --badge-edited:    rgba(107,47,174,0.12);
    --badge-edited-c:  #6B2FAE;
    --badge-published: rgba(5,150,105,0.12);
    --badge-published-c:#059669;
}

/* ── APP LAYOUT ─────────────────────────────────────────────────── */
body { background: var(--bg); color: var(--text); }

.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── TOPBAR (mobile) ────────────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid rgba(0,206,201,0.12);
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.topbar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.topbar-eye {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: .35em;
    color: var(--teal);
    opacity: .8;
}
.topbar-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: .12em;
    color: #FFFFFF;
    font-weight: 700;
}

.ham-btn {
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid rgba(0,206,201,0.2);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}
.ham-btn span {
    display: block;
    width: 18px; height: 2px;
    background: var(--teal);
    border-radius: 2px;
    transition: all .2s;
}
.ham-btn:hover { border-color: var(--teal); }

.theme-btn {
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid rgba(0,206,201,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color .2s;
    color: inherit;
}
.theme-btn:hover { border-color: var(--gold); }

/* ── NAV OVERLAY ─────────────────────────────────────────────────── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ── SIDEBAR ────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--nav-width);
    height: 100vh;
    background: var(--nav-bg);
    border-right: 1px solid rgba(0,206,201,0.1);
    display: flex;
    flex-direction: column;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar.open { transform: translateX(0); }

.sidebar-brand {
    padding: 28px 20px 20px;
    border-bottom: 1px solid rgba(0,206,201,0.1);
    text-align: center;
}
.sb-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: .4em;
    color: var(--teal);
    opacity: .7;
    margin-bottom: 4px;
}
.sb-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: .1em;
}
.sb-tagline {
    font-style: italic;
    font-size: .78rem;
    color: var(--gold);
    opacity: .7;
    margin-top: 6px;
    line-height: 1.3;
}

.nav-list { list-style: none; padding: 12px 0; flex: 1; }
.nav-section-label {
    font-family: 'Inconsolata', monospace;
    font-size: .65rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 16px 20px 4px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text2);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    transition: all .18s;
    border-left: 2px solid transparent;
}
.nav-link:hover {
    color: var(--tealL);
    background: rgba(0,206,201,0.06);
    border-left-color: var(--teal);
}
.nav-link.active {
    color: var(--teal);
    background: rgba(0,206,201,0.1);
    border-left-color: var(--teal);
    font-weight: 600;
}
.nav-icon {
    font-size: .9rem;
    opacity: .7;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(0,206,201,0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sf-user {
    font-size: .85rem;
    color: var(--text2);
    font-family: 'Inconsolata', monospace;
}
.sf-theme, .sf-logout {
    font-size: .85rem;
    padding: 6px 10px;
    border-radius: 6px;
    text-align: center;
    transition: all .18s;
    cursor: pointer;
    display: block;
}
.sf-theme {
    background: rgba(0,206,201,0.08);
    color: var(--teal);
    border: 1px solid rgba(0,206,201,0.2);
}
.sf-theme:hover { background: rgba(0,206,201,0.16); }
.sf-logout {
    background: rgba(255,77,109,0.08);
    color: #FF4D6D;
    border: 1px solid rgba(255,77,109,0.2);
}
.sf-logout:hover { background: rgba(255,77,109,0.16); }

/* ── MAIN CONTENT ───────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-top: var(--topbar-h);
    padding: 20px 16px 40px;
    min-width: 0;
    width: 100%;
}

/* ── PAGE HEADER ────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.page-eyebrow {
    font-family: 'Inconsolata', monospace;
    font-size: .7rem;
    letter-spacing: .25em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: .8;
}
.page-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 5vw, 1.9rem);
    color: var(--heading);
    letter-spacing: .06em;
    line-height: 1.2;
}
.page-sub {
    font-style: italic;
    color: var(--text2);
    font-size: .95rem;
    margin-top: 4px;
}

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 20px;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--glow-teal); }
.card-title {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    letter-spacing: .08em;
    color: var(--teal);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title .ct-icon { opacity: .7; }

/* ── STAT CARDS ─────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
}
.stat-val {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-family: 'Inconsolata', monospace;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text2);
}

/* ── SECTION DIVIDERS ───────────────────────────────────────────── */
.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: .1em;
    color: var(--heading);
    margin: 24px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 7px;
    font-family: 'Cinzel', serif;
    font-size: .78rem;
    letter-spacing: .08em;
    cursor: pointer;
    border: none;
    transition: all .18s;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary {
    background: var(--teal);
    color: #FFFFFF;
}
.btn-primary:hover { background: var(--tealL); box-shadow: var(--glow-teal); }

.btn-gold {
    background: var(--gold);
    color: #1A0A00;
}
.btn-gold:hover { background: var(--goldW); box-shadow: var(--glow-gold); }

.btn-ghost {
    background: transparent;
    color: var(--teal);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(0,206,201,0.08); border-color: var(--teal); }

.btn-danger {
    background: rgba(255,77,109,0.12);
    color: var(--danger);
    border: 1px solid rgba(255,77,109,0.25);
}
.btn-danger:hover { background: rgba(255,77,109,0.2); }

.btn-sm { padding: 6px 12px; font-size: .72rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── FORMS ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-family: 'Inconsolata', monospace;
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text2);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 7px;
    padding: 10px 14px;
    color: var(--text);
    font-size: .95rem;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,206,201,0.12);
}
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── BADGES ─────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-family: 'Inconsolata', monospace;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-idea     { background: var(--badge-idea);     color: var(--badge-idea-c);     }
.badge-scripted { background: var(--badge-scripted); color: var(--badge-scripted-c); }
.badge-recorded { background: var(--badge-recorded); color: var(--badge-recorded-c); }
.badge-edited   { background: var(--badge-edited);   color: var(--badge-edited-c);   }
.badge-published{ background: var(--badge-published);color: var(--badge-published-c);}

/* ── EPISODE LIST ───────────────────────────────────────────────── */
.episode-list { display: flex; flex-direction: column; gap: 10px; }
.episode-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all .18s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.episode-card:hover { border-color: var(--teal); box-shadow: var(--glow-teal); }
.ep-num {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    color: var(--teal);
    opacity: .6;
    min-width: 28px;
    padding-top: 2px;
}
.ep-body { flex: 1; min-width: 0; }
.ep-title {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    color: var(--heading);
    letter-spacing: .04em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-meta {
    font-family: 'Inconsolata', monospace;
    font-size: .72rem;
    color: var(--text3);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.ep-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ── TABLE ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
thead th {
    font-family: 'Inconsolata', monospace;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border2);
    vertical-align: middle;
}
tbody tr:hover { background: rgba(0,206,201,0.04); }
tbody tr:last-child td { border-bottom: none; }

/* ── ALERTS ─────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-error {
    background: rgba(255,77,109,0.1);
    border: 1px solid rgba(255,77,109,0.25);
    color: #FF8080;
}
.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    color: #34D399;
}
.alert-info {
    background: rgba(0,206,201,0.08);
    border: 1px solid rgba(0,206,201,0.2);
    color: var(--teal);
}

/* Light theme alert overrides */
body.theme-light .alert-error { color: var(--danger); }
body.theme-light .alert-success { color: var(--success); }
body.theme-light .alert-info { color: var(--teal); }

/* ── MODAL ──────────────────────────────────────────────────────── */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 500;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding: 24px 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .25s ease;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.modal-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: .08em;
    color: var(--heading);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.modal-close:hover { color: var(--danger); }

/* ── CALENDAR ───────────────────────────────────────────────────── */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cal-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--teal);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s;
}
.cal-nav-btn:hover { background: rgba(0,206,201,0.1); border-color: var(--teal); }
.cal-month-label {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    letter-spacing: .1em;
    color: var(--heading);
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.cal-dow {
    font-family: 'Inconsolata', monospace;
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text3);
    text-align: center;
    padding: 4px 0 8px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 2px 2px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
    min-height: 36px;
    position: relative;
}
.cal-day:hover { background: rgba(0,206,201,0.08); border-color: var(--teal); }
.cal-day.today { background: rgba(0,206,201,0.12); border-color: var(--teal); }
.cal-day.today .cal-day-num { color: var(--teal); font-weight: 700; }
.cal-day.other-month .cal-day-num { opacity: .3; }
.cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--gold);
}
.cal-day-num {
    font-family: 'Inconsolata', monospace;
    font-size: .8rem;
    color: var(--text);
    line-height: 1;
}
.cal-event-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    margin-top: 2px;
    flex-shrink: 0;
}
.ev-teal   { background: var(--teal); }
.ev-gold   { background: var(--gold); }
.ev-purple { background: var(--purpleL); }
.ev-sunset { background: var(--sunset); }
.ev-magenta{ background: var(--magenta); }

/* Event list below calendar */
.event-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 8px;
}
.event-dot-lg {
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.event-info { flex: 1; min-width: 0; }
.event-title {
    font-family: 'Cinzel', serif;
    font-size: .9rem;
    color: var(--heading);
    letter-spacing: .04em;
}
.event-meta {
    font-family: 'Inconsolata', monospace;
    font-size: .72rem;
    color: var(--text3);
    margin-top: 2px;
}

/* ── DASHBOARD QUICK ACTIONS ────────────────────────────────────── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.qa-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .18s;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}
.qa-btn:hover { border-color: var(--teal); box-shadow: var(--glow-teal); color: var(--teal); }
.qa-icon { font-size: 1.5rem; line-height: 1; }
.qa-label {
    font-family: 'Cinzel', serif;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ── EMPTY STATE ────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text3);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .4; }
.empty-title { font-family: 'Cinzel', serif; font-size: 1rem; margin-bottom: 6px; color: var(--text2); }
.empty-sub { font-size: .9rem; }

/* ── IFRAME EMBED (cover studio / workbook) ─────────────────────── */
.tool-frame-wrap {
    position: relative;
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.tool-frame-wrap iframe {
    width: 100%;
    border: none;
    display: block;
    min-height: 600px;
}

/* ── UTILITY ────────────────────────────────────────────────────── */
.flex  { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-4   { margin-bottom: 4px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.text-teal   { color: var(--teal); }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text2); }
.text-small  { font-size: .85rem; }
.text-mono   { font-family: 'Inconsolata', monospace; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ── DESKTOP (≥ 768px) ──────────────────────────────────────────── */
@media (min-width: 768px) {
    .topbar { display: none; }

    .sidebar {
        position: fixed;
        transform: translateX(0);
    }
    .nav-overlay { display: none !important; }

    .main-content {
        margin-top: 0;
        margin-left: var(--nav-width);
        padding: 32px 32px 60px;
    }

    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .quick-actions { grid-template-columns: repeat(4, 1fr); }
    .form-row { grid-template-columns: 1fr 1fr; }

    .modal { border-radius: 16px; }
    .modal-backdrop { align-items: center; }

    .page-title { font-size: 2rem; }
}

@media (min-width: 1024px) {
    .main-content { padding: 40px 48px 80px; }
    .stats-grid { gap: 20px; }
}


/* ══════════════════════════════════════════════════════════════════
   MONOCHROMA THEMES
   Inspired by Nowhere Studios' Monochroma (2014)
   Greyscale world — red as the single accent
   Font: IBM Plex Mono throughout
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ── MONOCHROMA DARK ─────────────────────────────────────────────── */
[data-theme="monochroma-dark"],
body.theme-monochroma-dark {
    --bg:          #0D0D0D;
    --bg2:         #141414;
    --bg3:         #1A1A1A;
    --surface:     #1F1F1F;
    --surface2:    #242424;
    --border:      rgba(255,255,255,0.08);
    --border2:     rgba(255,255,255,0.04);

    --teal:        #CC2222;
    --tealL:       #E03030;
    --tealD:       #AA1A1A;
    --gold:        #BBBBBB;
    --goldW:       #CCCCCC;
    --purple:      #999999;
    --purpleL:     #AAAAAA;
    --sunset:      #DD3333;
    --magenta:     #CC2222;
    --danger:      #E03030;
    --success:     #AAAAAA;
    --warning:     #BBBBBB;

    --text:        #DEDEDE;
    --text2:       #AAAAAA;
    --text3:       #666666;
    --heading:     #F0F0F0;

    --nav-bg:      #080808;
    --nav-width:   240px;
    --topbar-h:    56px;

    --shadow:      0 4px 24px rgba(0,0,0,0.7);
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.5);
    --glow-teal:   0 0 20px rgba(204,34,34,0.2);
    --glow-gold:   0 0 16px rgba(200,200,200,0.1);

    --input-bg:    #1E1E1E;
    --input-border:rgba(255,255,255,0.1);
    --input-text:  #DEDEDE;

    --card-bg:     #141414;
    --card-border: rgba(255,255,255,0.06);

    --badge-idea:       rgba(255,255,255,0.06);
    --badge-idea-c:     #888888;
    --badge-scripted:   rgba(204,34,34,0.15);
    --badge-scripted-c: #CC2222;
    --badge-recorded:   rgba(255,255,255,0.1);
    --badge-recorded-c: #AAAAAA;
    --badge-edited:     rgba(255,255,255,0.07);
    --badge-edited-c:   #777777;
    --badge-published:  rgba(204,34,34,0.2);
    --badge-published-c:#E03030;

    --font-body: 'IBM Plex Mono', 'Courier New', monospace;
    --font-head: 'IBM Plex Mono', 'Courier New', monospace;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ── MONOCHROMA LIGHT ────────────────────────────────────────────── */
[data-theme="monochroma-light"],
body.theme-monochroma-light {
    --bg:          #EBEBEB;
    --bg2:         #F2F2F2;
    --bg3:         #F8F8F8;
    --surface:     #F8F8F8;
    --surface2:    #EFEFEF;
    --border:      rgba(0,0,0,0.1);
    --border2:     rgba(0,0,0,0.05);

    --teal:        #BB2020;
    --tealL:       #CC2222;
    --tealD:       #991818;
    --gold:        #444444;
    --goldW:       #333333;
    --purple:      #555555;
    --purpleL:     #666666;
    --sunset:      #CC2222;
    --magenta:     #BB2020;
    --danger:      #CC2222;
    --success:     #333333;
    --warning:     #555555;

    --text:        #1A1A1A;
    --text2:       #444444;
    --text3:       #888888;
    --heading:     #0D0D0D;

    --nav-bg:      #111111;
    --nav-width:   240px;
    --topbar-h:    56px;

    --shadow:      0 4px 24px rgba(0,0,0,0.12);
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
    --glow-teal:   0 0 16px rgba(187,32,32,0.15);
    --glow-gold:   0 0 12px rgba(0,0,0,0.08);

    --input-bg:    #DCDCDC;
    --input-border:rgba(0,0,0,0.15);
    --input-text:  #1A1A1A;

    --card-bg:     #F2F2F2;
    --card-border: rgba(0,0,0,0.08);

    --badge-idea:       rgba(0,0,0,0.06);
    --badge-idea-c:     #666666;
    --badge-scripted:   rgba(187,32,32,0.12);
    --badge-scripted-c: #BB2020;
    --badge-recorded:   rgba(0,0,0,0.08);
    --badge-recorded-c: #555555;
    --badge-edited:     rgba(0,0,0,0.05);
    --badge-edited-c:   #777777;
    --badge-published:  rgba(187,32,32,0.15);
    --badge-published-c:#BB2020;

    --font-body: 'IBM Plex Mono', 'Courier New', monospace;
    --font-head: 'IBM Plex Mono', 'Courier New', monospace;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ── MONOCHROMA FONT OVERRIDES ───────────────────────────────────── */
body.theme-monochroma-dark,
body.theme-monochroma-light {
    font-family: var(--font-body) !important;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: -0.01em;
}

/* All text elements */
body.theme-monochroma-dark *,
body.theme-monochroma-light * {
    font-family: var(--font-body) !important;
    letter-spacing: -0.01em;
}

/* Headings — slightly bolder monospace */
body.theme-monochroma-dark .page-title,
body.theme-monochroma-light .page-title,
body.theme-monochroma-dark .card-title,
body.theme-monochroma-light .card-title,
body.theme-monochroma-dark .ep-item-title,
body.theme-monochroma-light .ep-item-title,
body.theme-monochroma-dark .stat-val,
body.theme-monochroma-light .stat-val {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Sidebar brand in monochroma */
body.theme-monochroma-dark .sb-name,
body.theme-monochroma-light .sb-name,
body.theme-monochroma-dark .topbar-title,
body.theme-monochroma-light .topbar-title {
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #F0F0F0;
}
body.theme-monochroma-light .sb-name,
body.theme-monochroma-light .topbar-title {
    color: #F0F0F0; /* stays light — on dark nav bar */
}

/* Red accent on active nav */
body.theme-monochroma-dark .nav-link.active,
body.theme-monochroma-light .nav-link.active {
    color: var(--teal);
    border-left-color: var(--teal);
    background: rgba(204,34,34,0.08);
}
body.theme-monochroma-dark .nav-link:hover,
body.theme-monochroma-light .nav-link:hover {
    color: var(--tealL);
    border-left-color: var(--teal);
    background: rgba(204,34,34,0.05);
}

/* Stat card top border — red in monochroma */
body.theme-monochroma-dark .stat-card::before,
body.theme-monochroma-light .stat-card::before {
    background: linear-gradient(90deg, #CC2222, #888888);
}

/* Input fields */
body.theme-monochroma-dark input,
body.theme-monochroma-dark select,
body.theme-monochroma-dark textarea,
body.theme-monochroma-light input,
body.theme-monochroma-light select,
body.theme-monochroma-light textarea {
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--input-border) !important;
}
body.theme-monochroma-dark input:focus,
body.theme-monochroma-dark select:focus,
body.theme-monochroma-dark textarea:focus,
body.theme-monochroma-light input:focus,
body.theme-monochroma-light select:focus,
body.theme-monochroma-light textarea:focus {
    border-color: var(--teal) !important;
    box-shadow: 0 0 0 3px rgba(204,34,34,0.12) !important;
}

/* Page eyebrow in red */
body.theme-monochroma-dark .page-eyebrow,
body.theme-monochroma-light .page-eyebrow {
    color: var(--teal);
}

/* Tagline */
body.theme-monochroma-dark .sb-tagline {
    color: #CC2222;
    opacity: .6;
}
body.theme-monochroma-light .sb-tagline {
    color: #CC2222;
    opacity: .5;
}

/* Section title line */
body.theme-monochroma-dark .section-title::after,
body.theme-monochroma-light .section-title::after {
    background: rgba(204,34,34,0.2);
}

/* Alerts — monochroma */
body.theme-monochroma-dark .alert-success,
body.theme-monochroma-light .alert-success {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    color: #CCCCCC;
}
body.theme-monochroma-light .alert-success {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.12);
    color: #333333;
}

/* Ham button bars — red in monochroma */
body.theme-monochroma-dark .ham-btn span,
body.theme-monochroma-light .ham-btn span {
    background: #CC2222;
}

/* Theme button border */
body.theme-monochroma-dark .theme-btn,
body.theme-monochroma-light .theme-btn {
    border-color: rgba(204,34,34,0.3);
}
body.theme-monochroma-dark .theme-btn:hover,
body.theme-monochroma-light .theme-btn:hover {
    border-color: #CC2222;
}

/* Sidebar footer links */
body.theme-monochroma-dark .sf-theme,
body.theme-monochroma-light .sf-theme {
    background: rgba(204,34,34,0.08);
    color: #CC2222;
    border-color: rgba(204,34,34,0.2);
}

/* Login page */
body.theme-monochroma-dark .login-name,
body.theme-monochroma-light .login-name {
    text-shadow: 0 0 30px rgba(204,34,34,0.3);
}
body.theme-monochroma-dark .login-sub {
    color: #CC2222;
}
body.theme-monochroma-light .login-sub {
    color: #BB2020;
}
body.theme-monochroma-dark .login-card::before,
body.theme-monochroma-light .login-card::before {
    background: linear-gradient(90deg, #CC2222, #555555, #222222);
}

/* Quick action buttons */
body.theme-monochroma-dark .qa-btn:hover,
body.theme-monochroma-light .qa-btn:hover {
    border-color: #CC2222;
    box-shadow: 0 0 16px rgba(204,34,34,0.15);
    color: #CC2222;
}

/* Episode card hover */
body.theme-monochroma-dark .ep-item:hover,
body.theme-monochroma-light .ep-item:hover,
body.theme-monochroma-dark .episode-card:hover,
body.theme-monochroma-light .episode-card:hover {
    border-color: #CC2222;
    box-shadow: 0 0 16px rgba(204,34,34,0.15);
}

/* Ref URL color */
body.theme-monochroma-dark .ref-url,
body.theme-monochroma-light .ref-url {
    color: #CC2222;
}

/* Cal day today */
body.theme-monochroma-dark .cal-day.today,
body.theme-monochroma-light .cal-day.today {
    background: rgba(204,34,34,0.1);
    border-color: #CC2222;
}
body.theme-monochroma-dark .cal-day.today .cal-day-num,
body.theme-monochroma-light .cal-day.today .cal-day-num {
    color: #CC2222;
}

/* Event dots — red in monochroma */
body.theme-monochroma-dark .ev-teal,
body.theme-monochroma-dark .ev-gold,
body.theme-monochroma-dark .ev-purple,
body.theme-monochroma-dark .ev-sunset,
body.theme-monochroma-dark .ev-magenta,
body.theme-monochroma-light .ev-teal,
body.theme-monochroma-light .ev-gold,
body.theme-monochroma-light .ev-purple,
body.theme-monochroma-light .ev-sunset,
body.theme-monochroma-light .ev-magenta {
    background: #CC2222;
}

/* Topic depth colors — greyscale in monochroma */
body.theme-monochroma-dark .depth-0 { background:#141414; border-color:rgba(255,255,255,0.07); }
body.theme-monochroma-dark .depth-1 { background:rgba(204,34,34,0.05); border-color:rgba(204,34,34,0.15); }
body.theme-monochroma-dark .depth-2 { background:#161616; border-color:rgba(255,255,255,0.05); }
body.theme-monochroma-dark .depth-3 { background:#131313; border-color:rgba(255,255,255,0.04); }
body.theme-monochroma-light .depth-0 { background:#F2F2F2; border-color:rgba(0,0,0,0.08); }
body.theme-monochroma-light .depth-1 { background:rgba(187,32,32,0.05); border-color:rgba(187,32,32,0.15); }
body.theme-monochroma-light .depth-2 { background:#EEEEEE; border-color:rgba(0,0,0,0.06); }
body.theme-monochroma-light .depth-3 { background:#EBEBEB; border-color:rgba(0,0,0,0.04); }

/* Monochroma light — nav stays dark */
body.theme-monochroma-light .sidebar,
body.theme-monochroma-light .topbar {
    background: #111111;
}
body.theme-monochroma-light .sidebar-brand,
body.theme-monochroma-light .nav-list,
body.theme-monochroma-light .sidebar-footer {
    background: #111111;
}
body.theme-monochroma-light .nav-link {
    color: #888888;
}
body.theme-monochroma-light .nav-link:hover,
body.theme-monochroma-light .nav-link.active {
    color: #CC2222;
    background: rgba(204,34,34,0.08);
    border-left-color: #CC2222;
}
body.theme-monochroma-light .nav-section-label {
    color: #444444;
}
body.theme-monochroma-light .sb-tagline {
    color: #CC2222;
}

/* Quill editor monochroma */
body.theme-monochroma-dark .ql-editor h1 { color: #CC2222; }
body.theme-monochroma-dark .ql-editor h2 { color: #AAAAAA; }
body.theme-monochroma-dark .ql-editor h3 { color: #888888; }
body.theme-monochroma-light .ql-editor h1 { color: #BB2020; }
body.theme-monochroma-light .ql-editor h2 { color: #444444; }
body.theme-monochroma-light .ql-editor h3 { color: #666666; }

/* ── MONOCHROMA LIGHT — contrast fixes ──────────────────────────── */

/* Page background slightly darker so cards lift off it */
body.theme-monochroma-light {
    background: #D8D8D8 !important;
}

/* Cards distinctly lighter than the page */
body.theme-monochroma-light .card,
body.theme-monochroma-light .ep-item,
body.theme-monochroma-light .episode-card,
body.theme-monochroma-light .deal-card,
body.theme-monochroma-light .ref-card,
body.theme-monochroma-light .post-card,
body.theme-monochroma-light .snippet-card,
body.theme-monochroma-light .product-card,
body.theme-monochroma-light .download-card,
body.theme-monochroma-light .source-card,
body.theme-monochroma-light .event-item,
body.theme-monochroma-light .txn-row,
body.theme-monochroma-light .topic-node,
body.theme-monochroma-light .platform-listing-row,
body.theme-monochroma-light .merch-top-row,
body.theme-monochroma-light .top-post-row,
body.theme-monochroma-light .version-row,
body.theme-monochroma-light .export-group {
    background: #EFEFEF !important;
    border-color: rgba(0,0,0,0.1) !important;
}

/* Calendar card */
body.theme-monochroma-light .cal-grid,
body.theme-monochroma-light .card {
    background: #EFEFEF !important;
}

/* Stat cards */
body.theme-monochroma-light .stat-card {
    background: #EFEFEF !important;
    border-color: rgba(0,0,0,0.1) !important;
}

/* Quick action buttons */
body.theme-monochroma-light .qa-btn {
    background: #EFEFEF !important;
    border-color: rgba(0,0,0,0.1) !important;
}

/* Input / textarea / select — greyed white, not bright */
body.theme-monochroma-light input,
body.theme-monochroma-light select,
body.theme-monochroma-light textarea,
body.theme-monochroma-light .form-control {
    background: #D4D4D4 !important;
    border-color: rgba(0,0,0,0.15) !important;
    color: #1A1A1A !important;
}

/* Script / text editor background */
body.theme-monochroma-light .script-editor-wrap,
body.theme-monochroma-light .ql-container.ql-snow,
body.theme-monochroma-light .ql-editor {
    background: #DADADA !important;
    color: #1A1A1A !important;
}
body.theme-monochroma-light .ql-toolbar.ql-snow {
    background: #D0D0D0 !important;
    border-color: rgba(0,0,0,0.1) !important;
}

/* Script puller text area */
body.theme-monochroma-light .script-puller-text {
    background: #D4D4D4 !important;
    border-color: rgba(0,0,0,0.12) !important;
}

/* Modal background */
body.theme-monochroma-light .modal {
    background: #EBEBEB !important;
    border-color: rgba(0,0,0,0.12) !important;
}

/* Tab nav */
body.theme-monochroma-light .mk-tabs,
body.theme-monochroma-light .mo-tabs {
    background: #E4E4E4 !important;
    border-color: rgba(0,0,0,0.1) !important;
}

/* Filter tabs */
body.theme-monochroma-light .filter-tab {
    border-color: rgba(0,0,0,0.12) !important;
    color: #555555 !important;
}
body.theme-monochroma-light .filter-tab.active {
    background: rgba(187,32,32,0.1) !important;
    border-color: #BB2020 !important;
    color: #BB2020 !important;
}

/* Topic tree depth colours */
body.theme-monochroma-light .depth-0 { background: #EFEFEF !important; }
body.theme-monochroma-light .depth-1 { background: rgba(187,32,32,0.05) !important; border-color: rgba(187,32,32,0.15) !important; }
body.theme-monochroma-light .depth-2 { background: #E8E8E8 !important; }
body.theme-monochroma-light .depth-3 { background: #E4E4E4 !important; }

/* Export format cards */
body.theme-monochroma-light .format-card {
    background: #EFEFEF !important;
    border-color: rgba(0,0,0,0.1) !important;
}

/* Nav overlay bg */
body.theme-monochroma-light .topbar {
    border-bottom-color: rgba(0,0,0,0.15) !important;
}

/* ══════════════════════════════════════════════════════════════════
   MONOCHROMA — Font Pairing + Red Headers Update
   IBM Plex Mono (UI/numbers/nav) + IBM Plex Sans (body/reading)
   Red on eyebrows, section titles, card titles, nav labels
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ── Base font split ─────────────────────────────────────────────── */
body.theme-monochroma-dark,
body.theme-monochroma-light {
    font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
}

/* Mono stays on UI elements */
body.theme-monochroma-dark .nav-link,
body.theme-monochroma-light .nav-link,
body.theme-monochroma-dark .nav-section-label,
body.theme-monochroma-light .nav-section-label,
body.theme-monochroma-dark .stat-val,
body.theme-monochroma-light .stat-val,
body.theme-monochroma-dark .stat-label,
body.theme-monochroma-light .stat-label,
body.theme-monochroma-dark .badge,
body.theme-monochroma-light .badge,
body.theme-monochroma-dark .form-label,
body.theme-monochroma-light .form-label,
body.theme-monochroma-dark .ep-num-badge,
body.theme-monochroma-light .ep-num-badge,
body.theme-monochroma-dark .ep-item-dates,
body.theme-monochroma-light .ep-item-dates,
body.theme-monochroma-dark .ep-meta,
body.theme-monochroma-light .ep-meta,
body.theme-monochroma-dark .event-meta,
body.theme-monochroma-light .event-meta,
body.theme-monochroma-dark .txn-meta,
body.theme-monochroma-light .txn-meta,
body.theme-monochroma-dark .ref-meta,
body.theme-monochroma-light .ref-meta,
body.theme-monochroma-dark .post-date,
body.theme-monochroma-light .post-date,
body.theme-monochroma-dark .version-date,
body.theme-monochroma-light .version-date,
body.theme-monochroma-dark .platform-stat,
body.theme-monochroma-light .platform-stat,
body.theme-monochroma-dark .text-mono,
body.theme-monochroma-light .text-mono,
body.theme-monochroma-dark .sb-eyebrow,
body.theme-monochroma-light .sb-eyebrow,
body.theme-monochroma-dark .topbar-eye,
body.theme-monochroma-light .topbar-eye,
body.theme-monochroma-dark .autosave-label,
body.theme-monochroma-light .autosave-label,
body.theme-monochroma-dark .filter-tab,
body.theme-monochroma-light .filter-tab,
body.theme-monochroma-dark .mo-tab,
body.theme-monochroma-light .mo-tab,
body.theme-monochroma-dark .mk-tab,
body.theme-monochroma-light .mk-tab,
body.theme-monochroma-dark code,
body.theme-monochroma-light code {
    font-family: 'IBM Plex Mono', monospace !important;
}

/* Plex Sans on reading-heavy areas */
body.theme-monochroma-dark .ep-item-title,
body.theme-monochroma-light .ep-item-title,
body.theme-monochroma-dark .ep-item-desc,
body.theme-monochroma-light .ep-item-desc,
body.theme-monochroma-dark .node-title,
body.theme-monochroma-light .node-title,
body.theme-monochroma-dark .node-notes,
body.theme-monochroma-light .node-notes,
body.theme-monochroma-dark .ref-title,
body.theme-monochroma-light .ref-title,
body.theme-monochroma-dark .ref-quote,
body.theme-monochroma-light .ref-quote,
body.theme-monochroma-dark .ref-notes,
body.theme-monochroma-light .ref-notes,
body.theme-monochroma-dark .post-content,
body.theme-monochroma-light .post-content,
body.theme-monochroma-dark .snippet-content,
body.theme-monochroma-light .snippet-content,
body.theme-monochroma-dark .deal-deliverables,
body.theme-monochroma-light .deal-deliverables,
body.theme-monochroma-dark .product-desc,
body.theme-monochroma-light .product-desc,
body.theme-monochroma-dark .source-notes,
body.theme-monochroma-light .source-notes,
body.theme-monochroma-dark .page-sub,
body.theme-monochroma-light .page-sub,
body.theme-monochroma-dark .empty-sub,
body.theme-monochroma-light .empty-sub,
body.theme-monochroma-dark .text-muted,
body.theme-monochroma-light .text-muted,
body.theme-monochroma-dark textarea,
body.theme-monochroma-light textarea,
body.theme-monochroma-dark .ql-editor,
body.theme-monochroma-light .ql-editor,
body.theme-monochroma-dark .script-puller-text,
body.theme-monochroma-light .script-puller-text {
    font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
    font-size: 0.95rem;
    line-height: 1.75;
}

/* Page titles — Plex Mono bold, slightly larger */
body.theme-monochroma-dark .page-title,
body.theme-monochroma-light .page-title {
    font-family: 'IBM Plex Mono', monospace !important;
    font-weight: 600;
    font-size: clamp(1.4rem, 5vw, 2rem);
    letter-spacing: -0.02em;
}

/* Sidebar brand name */
body.theme-monochroma-dark .sb-name,
body.theme-monochroma-light .sb-name,
body.theme-monochroma-dark .topbar-title,
body.theme-monochroma-light .topbar-title {
    font-family: 'IBM Plex Mono', monospace !important;
    font-weight: 600;
}

/* ── RED on headers and labels ──────────────────────────────────── */

/* Page eyebrows — WORKSPACE, BUSINESS, CREATION etc */
body.theme-monochroma-dark .page-eyebrow,
body.theme-monochroma-light .page-eyebrow {
    color: #CC2222 !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-weight: 500;
    letter-spacing: 0.2em;
}

/* Section titles — dividers with the line */
body.theme-monochroma-dark .section-title,
body.theme-monochroma-light .section-title {
    color: #CC2222 !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.15em;
}
body.theme-monochroma-light .section-title {
    color: #BB2020 !important;
}

/* Card titles */
body.theme-monochroma-dark .card-title,
body.theme-monochroma-light .card-title {
    color: #CC2222 !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    font-weight: 500;
}
body.theme-monochroma-light .card-title {
    color: #BB2020 !important;
}

/* Nav section labels — WORKSPACE, CREATION, BUSINESS, ACCOUNT */
body.theme-monochroma-dark .nav-section-label,
body.theme-monochroma-light .nav-section-label {
    color: #CC2222 !important;
    opacity: 0.7;
}

/* Stat labels under the numbers */
body.theme-monochroma-dark .stat-label,
body.theme-monochroma-light .stat-label {
    color: #CC2222 !important;
    opacity: 0.75;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}
body.theme-monochroma-light .stat-label {
    color: #BB2020 !important;
}

/* Ep season tag */
body.theme-monochroma-dark .ep-season,
body.theme-monochroma-light .ep-season {
    color: #CC2222 !important;
    background: rgba(204,34,34,0.08) !important;
    border-color: rgba(204,34,34,0.2) !important;
}

/* Modal titles */
body.theme-monochroma-dark .modal-title,
body.theme-monochroma-light .modal-title {
    font-family: 'IBM Plex Mono', monospace !important;
    color: #CC2222 !important;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}
body.theme-monochroma-light .modal-title {
    color: #BB2020 !important;
}

/* Deal brand name */
body.theme-monochroma-dark .deal-brand,
body.theme-monochroma-light .deal-brand {
    font-family: 'IBM Plex Mono', monospace !important;
}

/* Product/download names — Plex Sans for readability */
body.theme-monochroma-dark .product-name,
body.theme-monochroma-light .product-name,
body.theme-monochroma-dark .download-name,
body.theme-monochroma-light .download-name,
body.theme-monochroma-dark .event-title,
body.theme-monochroma-light .event-title,
body.theme-monochroma-dark .event-row-title,
body.theme-monochroma-light .event-row-title {
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-weight: 500;
}

/* Source/ref type label in red */
body.theme-monochroma-dark .source-type-label,
body.theme-monochroma-light .source-type-label,
body.theme-monochroma-dark .product-type-label,
body.theme-monochroma-light .product-type-label,
body.theme-monochroma-dark .deal-ep,
body.theme-monochroma-light .deal-ep {
    color: #CC2222 !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.7rem;
}
body.theme-monochroma-light .source-type-label,
body.theme-monochroma-light .product-type-label,
body.theme-monochroma-light .deal-ep {
    color: #BB2020 !important;
}

/* Snippet type tag */
body.theme-monochroma-dark .snippet-type-tag,
body.theme-monochroma-light .snippet-type-tag {
    background: rgba(204,34,34,0.1) !important;
    color: #CC2222 !important;
    border-color: rgba(204,34,34,0.2) !important;
    font-family: 'IBM Plex Mono', monospace !important;
}
body.theme-monochroma-light .snippet-type-tag {
    background: rgba(187,32,32,0.08) !important;
    color: #BB2020 !important;
}

/* Empty state title */
body.theme-monochroma-dark .empty-title,
body.theme-monochroma-light .empty-title {
    font-family: 'IBM Plex Mono', monospace !important;
    color: #888888 !important;
}

/* Quick action labels */
body.theme-monochroma-dark .qa-label,
body.theme-monochroma-light .qa-label {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

/* Txn description — Sans for readability */
body.theme-monochroma-dark .txn-desc,
body.theme-monochroma-light .txn-desc {
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-weight: 500;
}

/* Platform names */
body.theme-monochroma-dark .platform-name,
body.theme-monochroma-light .platform-name {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.72rem;
    color: #888888 !important;
}

/* Cal month label */
body.theme-monochroma-dark .cal-month-label,
body.theme-monochroma-light .cal-month-label {
    font-family: 'IBM Plex Mono', monospace !important;
    color: #CC2222 !important;
    font-weight: 500;
}
body.theme-monochroma-light .cal-month-label {
    color: #BB2020 !important;
}

/* Sidebar tagline */
body.theme-monochroma-dark .sb-tagline,
body.theme-monochroma-light .sb-tagline {
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-style: italic;
    font-size: 0.75rem;
}

/* Login page title */
body.theme-monochroma-dark .login-name,
body.theme-monochroma-light .login-name {
    font-family: 'IBM Plex Mono', monospace !important;
}
body.theme-monochroma-dark .login-sub,
body.theme-monochroma-light .login-sub {
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-style: italic;
}
body.theme-monochroma-dark .login-heading,
body.theme-monochroma-light .login-heading {
    font-family: 'IBM Plex Mono', monospace !important;
    color: #888888 !important;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
}

/* Ep info bar title */
body.theme-monochroma-dark .ep-info-title,
body.theme-monochroma-light .ep-info-title {
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-weight: 500;
}

/* Version number */
body.theme-monochroma-dark .version-num,
body.theme-monochroma-light .version-num {
    color: #CC2222 !important;
    font-family: 'IBM Plex Mono', monospace !important;
}
body.theme-monochroma-light .version-num {
    color: #BB2020 !important;
}

/* Export group labels */
body.theme-monochroma-dark .export-group-label,
body.theme-monochroma-light .export-group-label {
    color: #CC2222 !important;
    font-family: 'IBM Plex Mono', monospace !important;
}
body.theme-monochroma-light .export-group-label {
    color: #BB2020 !important;
}

/* Buttons — Plex Mono */
body.theme-monochroma-dark .btn,
body.theme-monochroma-light .btn {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Merch top name */
body.theme-monochroma-dark .merch-top-name,
body.theme-monochroma-light .merch-top-name,
body.theme-monochroma-dark .top-post-content,
body.theme-monochroma-light .top-post-content {
    font-family: 'IBM Plex Sans', sans-serif !important;
}

/* ══════════════════════════════════════════════════════════════════
   ORIGINAL DARK + LIGHT — Eye-friendly font pairing
   IBM Plex Mono replaces Cinzel + Inconsolata
   IBM Plex Sans replaces Crimson Text
   All colors completely unchanged.
   ══════════════════════════════════════════════════════════════════ */

/* Base body — Plex Sans for comfortable reading */
body.theme-dark,
body.theme-light {
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
}

/* Headings + UI labels — Plex Mono */
body.theme-dark .page-title,     body.theme-light .page-title,
body.theme-dark .sb-name,        body.theme-light .sb-name,
body.theme-dark .topbar-title,   body.theme-light .topbar-title,
body.theme-dark .login-name,     body.theme-light .login-name,
body.theme-dark .section-title,  body.theme-light .section-title,
body.theme-dark .card-title,     body.theme-light .card-title,
body.theme-dark .modal-title,    body.theme-light .modal-title,
body.theme-dark .cal-month-label,body.theme-light .cal-month-label,
body.theme-dark .ep-item-title,  body.theme-light .ep-item-title,
body.theme-dark .ep-title,       body.theme-light .ep-title,
body.theme-dark .ep-info-title,  body.theme-light .ep-info-title,
body.theme-dark .event-title,    body.theme-light .event-title,
body.theme-dark .event-row-title,body.theme-light .event-row-title,
body.theme-dark .node-title,     body.theme-light .node-title,
body.theme-dark .ref-title,      body.theme-light .ref-title,
body.theme-dark .deal-brand,     body.theme-light .deal-brand,
body.theme-dark .product-name,   body.theme-light .product-name,
body.theme-dark .download-name,  body.theme-light .download-name,
body.theme-dark .merch-top-name, body.theme-light .merch-top-name,
body.theme-dark .txn-desc,       body.theme-light .txn-desc,
body.theme-dark .empty-title,    body.theme-light .empty-title,
body.theme-dark .qa-label,       body.theme-light .qa-label,
body.theme-dark .version-num,    body.theme-light .version-num,
body.theme-dark .ep-season,      body.theme-light .ep-season,
body.theme-dark .source-name,    body.theme-light .source-name,
body.theme-dark .snippet-card .snippet-content,
body.theme-light .snippet-card .snippet-content {
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: -0.01em;
}

/* Page title weight */
body.theme-dark .page-title,
body.theme-light .page-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
    font-weight: 600;
}

/* UI mono — nav, badges, stats, labels, dates */
body.theme-dark .nav-link,        body.theme-light .nav-link,
body.theme-dark .nav-section-label,body.theme-light .nav-section-label,
body.theme-dark .page-eyebrow,    body.theme-light .page-eyebrow,
body.theme-dark .sb-eyebrow,      body.theme-light .sb-eyebrow,
body.theme-dark .topbar-eye,      body.theme-light .topbar-eye,
body.theme-dark .badge,           body.theme-light .badge,
body.theme-dark .stat-val,        body.theme-light .stat-val,
body.theme-dark .stat-label,      body.theme-light .stat-label,
body.theme-dark .form-label,      body.theme-light .form-label,
body.theme-dark .ep-meta,         body.theme-light .ep-meta,
body.theme-dark .ep-num-badge,    body.theme-light .ep-num-badge,
body.theme-dark .ep-item-dates,   body.theme-light .ep-item-dates,
body.theme-dark .event-meta,      body.theme-light .event-meta,
body.theme-dark .txn-meta,        body.theme-light .txn-meta,
body.theme-dark .ref-meta,        body.theme-light .ref-meta,
body.theme-dark .version-date,    body.theme-light .version-date,
body.theme-dark .post-date,       body.theme-light .post-date,
body.theme-dark .filter-tab,      body.theme-light .filter-tab,
body.theme-dark .mo-tab,          body.theme-light .mo-tab,
body.theme-dark .mk-tab,          body.theme-light .mk-tab,
body.theme-dark .btn,             body.theme-light .btn,
body.theme-dark .autosave-label,  body.theme-light .autosave-label,
body.theme-dark .sf-theme,        body.theme-light .sf-theme,
body.theme-dark .sf-logout,       body.theme-light .sf-logout,
body.theme-dark .sf-user,         body.theme-light .sf-user {
    font-family: 'IBM Plex Mono', monospace;
}

/* Reading-heavy areas — Plex Sans */
body.theme-dark .ep-item-desc,    body.theme-light .ep-item-desc,
body.theme-dark .node-notes,      body.theme-light .node-notes,
body.theme-dark .ref-quote,       body.theme-light .ref-quote,
body.theme-dark .ref-notes,       body.theme-light .ref-notes,
body.theme-dark .post-content,    body.theme-light .post-content,
body.theme-dark .deal-deliverables,body.theme-light .deal-deliverables,
body.theme-dark .product-desc,    body.theme-light .product-desc,
body.theme-dark .source-notes,    body.theme-light .source-notes,
body.theme-dark .page-sub,        body.theme-light .page-sub,
body.theme-dark .empty-sub,       body.theme-light .empty-sub,
body.theme-dark .text-muted,      body.theme-light .text-muted,
body.theme-dark .sb-tagline,      body.theme-light .sb-tagline,
body.theme-dark textarea,         body.theme-light textarea,
body.theme-dark .ql-editor,       body.theme-light .ql-editor,
body.theme-dark .script-puller-text,
body.theme-light .script-puller-text {
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    line-height: 1.75;
}

/* Login subtitle stays italic Sans */
body.theme-dark .login-sub,
body.theme-light .login-sub {
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: italic;
}
