/* ============================================================
   CuratedLabs — Design System v4.0
   Apple/macOS-inspired design with frosted glass, clean
   typography, and refined interactions.
   ============================================================ */

/* === DESIGN TOKENS === */
:root {
    /* Colors — Light Mode (Apple System Colors) */
    --bg-0: #F5F5F7;
    --bg-1: #FFFFFF;
    --bg-2: #E8E8ED;
    --bg-3: #D2D2D7;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-border: rgba(255, 255, 255, 0.5);
    --bg-gradient: linear-gradient(135deg, #F5F5F7 0%, #E8E8ED 100%);

    --text-0: #1D1D1F;
    --text-1: #1D1D1F;
    --text-2: #515154;
    --text-3: #6E6E73;
    --text-inv: #ffffff;

    --border-0: #D2D2D7;
    --border-1: #C7C7CC;
    --border-focus: #007AFF;

    /* Accent Palette — Apple Blue */
    --accent: #007AFF;
    --accent-light: #4DA3FF;
    --accent-dark: #0055CC;
    --accent-bg: rgba(0, 122, 255, 0.08);
    --accent-border: rgba(0, 122, 255, 0.25);
    --accent-glow: rgba(0, 122, 255, 0.2);
    --accent-gradient: linear-gradient(135deg, #007AFF, #5AC8FA);

    --sage: #34C759;
    --sage-light: #5DD67B;
    --sage-bg: rgba(52, 199, 89, 0.1);
    --sage-border: rgba(52, 199, 89, 0.25);

    --coral: #FF6B6B;
    --coral-bg: rgba(255, 107, 107, 0.1);

    --blue: #007AFF;
    --blue-light: #4DA3FF;
    --blue-bg: rgba(0, 122, 255, 0.1);

    --red: #FF3B30;
    --red-bg: rgba(255, 59, 48, 0.08);

    --purple: #AF52DE;
    --purple-bg: rgba(175, 82, 222, 0.08);

    --warning: #F59E0B;
    --warning-dark: #D97706;
    --warning-bg: rgba(245, 158, 11, 0.1);

    /* Layout */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Spacing */
    --pad-sm: 8px;
    --pad: 12px;
    --pad-md: 16px;
    --pad-lg: 24px;
    --pad-xl: 32px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.16);
    --shadow-glow: 0 0 0 3px rgba(0, 122, 255, 0.15);

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

    --fs-xs: 0.6875rem;   /* 11px */
    --fs-sm: 0.8125rem;   /* 13px */
    --fs-base: 0.9375rem; /* 15px */
    --fs-md: 1rem;        /* 16px */
    --fs-lg: 1.125rem;    /* 18px */
    --fs-xl: 1.375rem;    /* 22px */
    --fs-2xl: 1.75rem;    /* 28px */
    --fs-3xl: 2.25rem;    /* 36px */

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration: 250ms;
    --duration-slow: 400ms;

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 50;
    --z-nav: 100;
    --z-modal: 200;
    --z-toast: 300;
    --z-cmd: 400;
    --z-skip: 500;

    /* Nav */
    --nav-height: 52px;
    --sidebar-width: 260px;
}

/* === DARK THEME === */
[data-theme="dark"] {
    --bg-0: #000000;
    --bg-1: #1C1C1E;
    --bg-2: #2C2C2E;
    --bg-3: #3A3A3C;
    --bg-glass: rgba(28, 28, 30, 0.72);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --bg-gradient: linear-gradient(135deg, #000000 0%, #1C1C1E 100%);

    --text-0: #F5F5F7;
    --text-1: #E5E5EA;
    --text-2: #98989D;
    --text-3: #636366;
    --text-inv: #000000;

    --border-0: #38383A;
    --border-1: #48484A;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --shadow-xl: 0 16px 64px rgba(0,0,0,0.7);
    --shadow-glow: 0 0 0 3px var(--accent-glow);

    --accent-bg: rgba(0, 122, 255, 0.15);
    --sage-bg: rgba(52, 199, 89, 0.15);
    --red-bg: rgba(255, 59, 48, 0.15);
    --blue-bg: rgba(0, 122, 255, 0.15);
    --purple-bg: rgba(175, 82, 222, 0.15);
}

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-0);
    background: var(--bg-0);
    overflow-x: hidden;
}

h1, h2, h3, .serif { font-family: var(--font-sans); font-weight: 600; }
h1 { font-size: var(--fs-2xl); line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-lg); line-height: 1.35; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--accent-bg); color: var(--accent); }

/* Skip link for accessibility */
.skip-link {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--text-inv);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--fs-sm);
    z-index: var(--z-skip);
    transition: top 0.2s;
    text-decoration: none;
}
.skip-link:focus {
    top: 12px;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    z-index: calc(var(--z-skip) + 1);
    transition: width 0.1s linear;
}

/* Focus ring */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* === SIDEBAR TOGGLE === */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-1);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: calc(var(--z-nav) + 1);
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-1);
}
.hamburger-btn:hover { background: var(--bg-2); }

/* === SIDEBAR NAVIGATION === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid var(--bg-glass-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: var(--z-nav);
    transition: transform var(--duration-slow) var(--ease-out), width var(--duration-slow) var(--ease-out);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
}
.sidebar-hide-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.sidebar-hide-btn:hover { background: var(--bg-2); color: var(--text-0); }
.sidebar-brand {
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-0);
}
.sidebar-brand span { color: var(--accent); }
.sidebar-brand img { width: 22px; height: 22px; object-fit: contain; }
[data-theme="dark"] .sidebar-brand img { filter: invert(1); }
.sidebar-toggle-btn {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
}
.sidebar-toggle-btn:hover { background: var(--bg-2); }
.sidebar-toggle-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }

.sidebar-section {
    padding: 4px 12px;
}
.sidebar-section-label {
    text-transform: uppercase;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-3);
    padding: 16px 8px 6px;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: var(--fs-sm);
    font-weight: 400;
    color: var(--text-2);
    cursor: pointer;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
}
.sidebar-item svg { opacity: 0.7; flex-shrink: 0; }
.sidebar-item:hover { background: var(--bg-2); color: var(--text-0); }
.sidebar-item:hover svg { opacity: 1; }
.sidebar-item:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); background: var(--bg-2); }
.sidebar-item.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--accent);
    font-weight: 600;
}
.sidebar-item.active svg { opacity: 1; color: var(--accent); }

/* Collapsible sidebar sections */
.sidebar-section-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.sidebar-chevron {
    transition: transform var(--duration, 0.2s) var(--ease-out, ease);
    opacity: 0.5;
}
.sidebar-section-toggle.collapsed .sidebar-chevron {
    transform: rotate(-90deg);
}
.sidebar-section-items.collapsible {
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.sidebar-section-items.collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Sidebar badges */
.sidebar-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
}
.sidebar-badge:empty { display: none; }
.sidebar-badge.has-data {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
}
.sidebar-badge.empty {
    background: var(--bg-3, #e5e5e5);
    color: var(--text-3);
}

.sidebar-spacer { flex: 1; }
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--bg-glass-border);
}
.sidebar-footer .streak-badge {
    margin-bottom: 8px;
}
.sidebar-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-inv);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}
.user-avatar-sidebar { position: relative; }
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-nav) - 1);
}

.streak-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-1);
}
.streak-badge svg { color: var(--accent); flex-shrink: 0; }
.streak-label { font-weight: 400; color: var(--text-3); }

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: all var(--duration);
}
.icon-btn:hover { background: var(--bg-2); color: var(--text-0); }

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--bg-glass-border);
    z-index: var(--z-nav);
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
    transition: transform var(--duration-slow) var(--ease-out);
}
.mobile-nav.visible { transform: translateY(0); }
.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-3);
    font-size: 10px;
    font-family: var(--font-sans);
    transition: color var(--duration);
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav-btn.active { color: var(--accent); position: relative; }
.mobile-nav-btn.active::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}
.mobile-nav-btn span { font-weight: 500; }
.mobile-nav-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); border-radius: var(--radius-sm); }

/* === APP CONTAINER === */
.app { min-height: 100vh; }
.app.with-nav { margin-left: var(--sidebar-width); transition: margin-left var(--duration-slow) var(--ease-out); }

.view {
    display: none;
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
    animation: viewEnter var(--duration-slow) var(--ease-out);
}
.view.active { display: block; }

@keyframes viewEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SPINNERS === */
.spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-0);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinSm 0.6s linear infinite;
}
@keyframes spinSm {
    to { transform: rotate(360deg); }
}

/* === BUTTONS === */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: all var(--duration) var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn:hover { filter: brightness(0.92); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: var(--text-inv); }
.btn-primary:hover { box-shadow: var(--shadow-sm); }

.btn-secondary, .btn-outline {
    background: transparent;
    border: 1px solid var(--border-0);
    color: var(--text-1);
}
.btn-secondary:hover, .btn-outline:hover { border-color: var(--border-1); background: var(--bg-2); filter: none; }

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    padding: 8px 12px;
}
.btn-text:hover { text-decoration: underline; filter: none; }

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-2);
    padding: 8px 12px;
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text-0); filter: none; }

.btn-danger {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
}
.btn-danger:hover { background: var(--red-bg); filter: none; }

.btn-sm { padding: 6px 12px; font-size: var(--fs-xs); }
.btn-lg { padding: 12px 24px; font-size: var(--fs-base); }

/* === FORM ELEMENTS === */
.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-2);
    margin-bottom: 8px;
}
.required { color: var(--red); }
.form-hint { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 6px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.char-count { font-variant-numeric: tabular-nums; opacity: 0.7; }
.form-hint-inline { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-3); }

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-0);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-sans);
    background: var(--bg-0);
    color: var(--text-0);
    transition: all var(--duration);
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

.input-group {
    display: flex;
    gap: 0;
    position: relative;
}
.input-group .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-toggle {
    padding: 0 14px;
    border: 1.5px solid var(--border-0);
    border-left: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--bg-2);
    cursor: pointer;
    color: var(--text-2);
    display: flex;
    align-items: center;
}
.input-toggle:hover { background: var(--bg-3); color: var(--text-0); }

/* Option Cards */
.option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.option-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.option-card {
    padding: 18px 12px;
    border: 2px solid var(--border-0);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-1);
    text-align: center;
    transition: all var(--duration) var(--ease-out);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.option-card:hover { border-color: var(--text-3); transform: translateY(-1px); }
.option-card:active { transform: scale(0.97); }
.option-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.option-card.selected {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: 0 0 0 1px var(--accent);
}
.option-card.selected::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
}
.option-card .icon { font-size: 24px; margin-bottom: 6px; }
.option-card .title { font-size: 14px; font-weight: 600; color: var(--text-0); }
.option-card .desc { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }

/* Chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 10px 18px;
    border: 1.5px solid var(--border-0);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    background: var(--bg-1);
    color: var(--text-1);
    transition: all var(--duration) var(--ease-out);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--text-3); background: var(--bg-2); }
.chip:active { transform: scale(0.96); }
.chip:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.chip.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* === DISCOVERY VIEW === */
.discovery-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-0);
}
.discovery-header {
    text-align: center;
    padding: 48px 24px 20px;
}
.discovery-logo {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.discovery-logo span { color: var(--accent); }
.discovery-tagline { color: var(--text-1); font-size: 16px; font-weight: 500; line-height: 1.5; }
.discovery-sub { color: var(--text-3); font-size: 13px; margin-top: 6px; }

.discovery-content {
    flex: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 140px;
    width: 100%;
}

/* Discovery Progress */
.discovery-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;
    padding: 0 8px;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-3);
    background: var(--bg-1);
    transition: all var(--duration-slow) var(--ease-out);
}
.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    transition: color var(--duration);
}
.progress-connector {
    flex: 1;
    height: 2px;
    background: var(--border-0);
    margin: 0 6px;
    margin-bottom: 22px;
    transition: background var(--duration-slow);
    border-radius: 1px;
}
.progress-step.active .step-num {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-bg);
}
.progress-step.active .step-label { color: var(--accent); font-weight: 600; }
.progress-step.done .step-num {
    border-color: #34C759;
    background: #34C759;
    color: #fff;
}
.progress-step.done .step-label { color: #34C759; }
.progress-step.done + .progress-connector { background: #34C759; }

/* Phase Animation */
.phase {
    display: none;
    animation: phaseIn 0.35s ease-out;
}
.phase.active { display: block; }
@keyframes phaseIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Option card selection pulse */
@keyframes selectionPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 122, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}
.option-card.selected {
    animation: selectionPulse 0.6s ease-out;
}

/* Discovery skeleton loaders */
.discovery-skeleton {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.discovery-skeleton .skeleton {
    height: 24px;
    border-radius: 8px;
}
.discovery-skeleton .skeleton:first-child { width: 30%; height: 14px; }
.discovery-skeleton .skeleton:nth-child(2) { width: 60%; height: 32px; }
.discovery-skeleton .skeleton:nth-child(3) { width: 100%; height: 120px; }

.phase-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.phase-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-0);
    letter-spacing: -0.02em;
}
.phase-desc {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Deep Dive Sections */
.deep-dive-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    margin-top: 12px;
    cursor: pointer;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    border: 1.5px dashed var(--accent-border);
    background: var(--accent-bg);
    border-radius: var(--radius-sm);
    transition: all var(--duration);
    width: 100%;
}
.deep-dive-toggle:hover { background: rgba(0,122,255,0.08); }
.deep-dive-toggle svg {
    transition: transform var(--duration);
}
.deep-dive-toggle.open svg {
    transform: rotate(180deg);
}
.deep-dive-toggle.open {
    border-style: solid;
    border-color: var(--accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}
.deep-dive-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0,122,255,0.12);
    color: var(--accent);
    letter-spacing: 0.03em;
    margin-left: auto;
}
.deep-dive-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    opacity: 0;
    border: 1.5px solid var(--accent);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    margin-top: 0;
    padding: 0 16px;
    background: var(--accent-bg);
}
.deep-dive-section.open {
    max-height: 800px;
    opacity: 1;
    padding: 20px 16px;
}

/* Discovery Nav (bottom) */
.discovery-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-1);
    border-top: 1px solid var(--border-0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 688px;
    margin: 0 auto;
    z-index: 50;
}
.discovery-nav .btn-primary {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}
.discovery-nav .btn-ghost {
    padding: 12px 20px;
    font-size: 14px;
}

/* === DISCOVERY MOBILE === */
@media (max-width: 640px) {
    .discovery-header { padding: 32px 20px 16px; }
    .discovery-logo { font-size: 22px; }
    .discovery-tagline { font-size: 15px; }
    .discovery-sub { font-size: 12px; }
    .discovery-content { padding: 0 20px 140px; }
    .discovery-progress { padding: 0; margin-bottom: 28px; }
    .step-num { width: 32px; height: 32px; font-size: 12px; }
    .step-label { font-size: 10px; }
    .progress-connector { margin: 0 4px; margin-bottom: 22px; }
    .phase-title { font-size: 24px; }
    .phase-desc { font-size: 14px; margin-bottom: 24px; }
    .form-group { margin-bottom: 20px; }
    .form-group label { font-size: 11px; margin-bottom: 6px; }
    .option-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .option-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .option-card { padding: 14px 10px; }
    .option-card .icon { font-size: 20px; margin-bottom: 4px; }
    .option-card .title { font-size: 13px; }
    .option-card .desc { font-size: 11px; }
    .chip { padding: 10px 16px; font-size: 13px; }
    .form-input, .form-textarea { font-size: 16px; padding: 12px 14px; }
    .form-textarea { min-height: 90px; }
    .discovery-nav { padding: 14px 20px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
    .discovery-nav .btn-primary { padding: 12px 24px; font-size: 15px; flex: 1; justify-content: center; }
    .discovery-nav .btn-ghost { padding: 12px 16px; }
    .deep-dive-toggle { padding: 12px 14px; font-size: 12px; }
}

/* === GENERATING VIEW === */
.generating-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.generating-content {
    max-width: 520px;
    width: 100%;
    text-align: center;
}
.gen-logo {
    font-family: var(--font-serif);
    font-size: var(--fs-md);
    color: var(--text-3);
    margin-bottom: 32px;
}
.gen-logo span { color: var(--accent); }
.generating-content h1 { margin-bottom: 8px; }
.gen-sub { color: var(--text-2); margin-bottom: 40px; }

/* Agent Cards */
.gen-agents {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}
.agent-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    text-align: left;
    transition: all var(--duration-slow) var(--ease-out);
}
.agent-card.active {
    border-color: var(--accent-border);
    background: var(--accent-bg);
}
.agent-card.done {
    border-color: var(--sage-border);
    background: var(--sage-bg);
}
.agent-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: var(--radius);
    background: var(--bg-2);
    flex-shrink: 0;
}
.agent-info { flex: 1; }
.agent-role { font-weight: 600; font-size: var(--fs-sm); }
.agent-task { font-size: var(--fs-xs); color: var(--text-3); }
.agent-status {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-3);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-2);
}
.agent-card.active .agent-status {
    color: var(--accent);
    background: rgba(0, 122, 255, 0.15);
    animation: pulseOpacity 1.5s ease-in-out infinite;
}
.agent-card.done .agent-status {
    color: var(--sage);
    background: rgba(90, 122, 90, 0.15);
}

@keyframes pulseOpacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress */
.gen-progress { margin-bottom: 16px; }
.gen-progress-bar {
    height: 6px;
    background: var(--bg-2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.gen-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--sage));
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
}
.gen-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: var(--fs-xs);
    color: var(--text-3);
}
.gen-status {
    font-size: var(--fs-sm);
    color: var(--text-2);
    font-style: italic;
    margin-bottom: 32px;
}

/* Completion */
.completion-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    display: none;
    box-shadow: var(--shadow-lg);
}
.completion-card.active {
    display: block;
    animation: scaleUp var(--duration-slow) var(--ease-spring);
}
@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.completion-check {
    width: 64px;
    height: 64px;
    background: var(--sage);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: checkBounce var(--duration-slow) var(--ease-spring);
}
@keyframes checkBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.completion-card h2 { margin-bottom: 8px; }
.completion-card p { color: var(--text-2); margin-bottom: 24px; }
.completion-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

/* === GENERATION THEATER (v2.3) === */
.gen-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.generating-view { position: relative; }
.generating-content { position: relative; z-index: 1; }

/* Agent card stagger entrance */
.agent-card:nth-child(1) { animation: staggerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.agent-card:nth-child(2) { animation: staggerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.agent-card:nth-child(3) { animation: staggerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.agent-card:nth-child(4) { animation: staggerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both; }
@keyframes staggerSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Active agent pulse ring */
.agent-card.active::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid var(--accent);
    animation: agentPulseRing 2s ease-in-out infinite;
    pointer-events: none;
}
.agent-card { position: relative; }
@keyframes agentPulseRing {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Completion spring animation */
.completion-card.active {
    animation: completionSpring 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes completionSpring {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    60% { transform: scale(1.03) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Signup Wall Overlay (guest mode) */
.signup-wall-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.signup-wall-overlay.active {
    display: flex;
    animation: signupWallFadeIn 0.4s ease;
}
@keyframes signupWallFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.signup-wall-card {
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px 32px;
    max-width: 440px;
    width: 100%;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    animation: signupWallSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (max-width: 480px) {
    .signup-wall-overlay { padding: 12px; }
    .signup-wall-card { padding: 28px 20px 24px; border-radius: 16px; }
    .signup-wall-title { font-size: 19px; }
}
/* Hide floating FAB when signup wall is showing */
.signup-wall-overlay.active ~ .guest-fab,
body:has(.signup-wall-overlay.active) .guest-fab { display: none !important; }
@keyframes signupWallSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.signup-wall-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.signup-wall-close:hover {
    background: var(--bg-2);
    color: var(--text-1);
}
.signup-wall-icon {
    margin-bottom: 16px;
}
.signup-wall-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-1);
}
.signup-wall-desc {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.signup-wall-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.signup-wall-stat {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-2);
}
.signup-wall-stat strong {
    display: block;
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 2px;
}
.signup-wall-cta {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-decoration: none;
    font-size: 15px;
}
.signup-wall-secondary {
    display: block;
    width: 100%;
    margin-bottom: 16px;
    text-decoration: none;
    font-size: 14px;
}
.signup-wall-dev {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.signup-wall-dev-toggle {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.signup-wall-dev-toggle:hover {
    color: var(--text-2);
}
.signup-wall-dev-form {
    display: none;
    margin-top: 10px;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.signup-wall-dev-form.active {
    display: flex;
}
.signup-wall-dev-form .form-input {
    max-width: 200px;
    font-size: 13px;
}

/* === GUEST CTAs (sidebar + floating mobile) === */
.sidebar-guest-cta {
    display: none;
    padding: 16px 14px;
    margin: 0 10px 8px;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(168,85,247,0.08));
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 12px;
    text-align: center;
}
body.guest-mode .sidebar-guest-cta { display: block; }
body.guest-mode #userMenu { display: none; }
body.guest-mode #streakBadge { display: none !important; }
.sidebar-guest-text {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.4;
    margin-bottom: 10px;
}
.sidebar-guest-btn {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: center;
    margin-bottom: 6px;
}
.sidebar-guest-link {
    font-size: 11px;
    color: var(--text-3);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sidebar-guest-link:hover { color: var(--text-2); }

/* Floating mobile CTA for guests */
.guest-fab {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 900;
    background: var(--accent);
    color: #fff;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.guest-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(99,102,241,0.45);
}
.guest-fab svg { flex-shrink: 0; }
body.guest-mode .guest-fab { display: none; }
@media (max-width: 768px) {
    body.guest-mode .guest-fab { display: flex; }
}
/* Hide during discovery and tour */
body.discovery-mode .guest-fab { display: none !important; }

/* === DISCOVERY MODE: Standalone immersive experience === */
body.discovery-mode .sidebar,
body.discovery-mode .hamburger-btn,
body.discovery-mode .copilot-toggle,
body.discovery-mode .mobile-nav,
body.discovery-mode .scroll-progress,
body.discovery-mode .mobile-more-menu,
body.discovery-mode #userMenu {
    display: none !important;
}
body.discovery-mode .app {
    margin-left: 0 !important;
    padding-bottom: 0 !important;
}

/* === GUIDED DASHBOARD TOUR V2 — Floating card === */
.tour-v2 {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}
.tour-v2-card {
    width: 360px;
    background: var(--bg-0);
    border: 1px solid var(--border-0);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,0.18));
    animation: tourV2SlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tourV2SlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.tour-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.tour-v2-step {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
}
.tour-v2-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.tour-v2-close:hover { color: var(--text-1); }
.tour-v2-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 12px;
}
.tour-v2-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.tour-v2-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: background 0.15s;
    background: var(--bg-2, #f5f5f5);
}
.tour-v2-feature:hover { background: var(--accent-bg, rgba(0,122,255,0.08)); }
.tour-v2-feature-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.tour-v2-feature-text { flex: 1; min-width: 0; }
.tour-v2-feature-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}
.tour-v2-feature-desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.3;
}
.tour-v2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tour-v2-dots {
    display: flex;
    gap: 6px;
}
.tour-v2-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bg-3);
    transition: background 0.2s, transform 0.2s;
}
.tour-v2-dot.active { background: var(--accent); transform: scale(1.3); }
.tour-v2-dot.done { background: var(--accent); opacity: 0.5; }
.tour-v2-actions {
    display: flex;
    gap: 6px;
}

/* Sidebar pulse highlight during tour */
.sidebar-item.tour-highlight {
    animation: tourPulse 1.5s infinite;
}
@keyframes tourPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,122,255,0.25); }
    50% { box-shadow: 0 0 0 6px rgba(0,122,255,0); }
}

/* Tour V2 mobile */
@media (max-width: 640px) {
    .tour-v2 {
        bottom: 80px;
        right: 8px;
        left: 8px;
    }
    .tour-v2-card {
        width: 100%;
        padding: 16px;
    }
    .tour-v2-title { font-size: 15px; }
}

/* === STRATEGY QUALITY INDICATOR === */
.strategy-quality {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
    font-size: 12px;
    color: var(--text-3);
}
.strategy-quality-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-3, #e5e5e5);
    border-radius: 2px;
    overflow: hidden;
}
.strategy-quality-fill {
    height: 100%;
    width: 10%;
    border-radius: 2px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
    transition: width 0.4s ease;
}
.strategy-quality-info {
    white-space: nowrap;
    font-weight: 500;
}

/* === CHIP "OTHER" INPUT === */
.chip-other-toggle {
    border-style: dashed;
    opacity: 0.7;
}
.chip-other-toggle:hover { opacity: 1; }
.chip-other-input {
    margin-top: 8px;
    font-size: 13px;
    padding: 8px 12px;
}

/* === SMART DEFAULT BADGE === */
.chip.smart-default::after,
.option-card.smart-default::after {
    content: 'Suggested';
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(0,122,255,0.1);
    color: var(--accent);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
}

/* Status typewriter cursor */
.gen-status.typing::after {
    content: '|';
    animation: blink 0.7s step-end infinite;
    color: var(--accent);
    margin-left: 2px;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Skeleton preview panel */
.gen-skeleton-preview {
    display: none;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
    animation: fadeSlideUp 0.5s ease-out;
}
.gen-skeleton-preview.visible { display: block; }
.skeleton-preview-header {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

/* === DASHBOARD v2 === */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}
.dash-greeting {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-0);
    margin: 0;
    line-height: 1.2;
}
.dash-date {
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin-top: 4px;
}
.dash-header-right { flex-shrink: 0; }

/* Dashboard Cards */
.dash-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.dash-card-center { text-align: center; }
.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-0);
}
.dash-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-0);
}
.dash-card-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--bg-2);
    padding: 3px 8px;
    border-radius: 6px;
}
.dash-card-link {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.dash-card-link:hover { text-decoration: underline; }
.dash-card-body { padding: 16px 18px; }

/* Week Progress */
.week-progress-bar {
    height: 4px;
    background: var(--bg-2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}
.week-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.6s var(--ease-out);
}
.week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.week-day {
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    transition: all var(--duration);
}
.week-day.is-today {
    background: var(--accent-bg);
}
.week-day-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 4px;
    text-transform: uppercase;
}
.week-day-dot {
    width: 24px;
    height: 24px;
    margin: 0 auto 4px;
    border-radius: 50%;
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-2);
    transition: all var(--duration);
}
.week-day.has-posts .week-day-dot {
    background: var(--accent);
    color: #fff;
}
.week-day.is-today .week-day-dot {
    box-shadow: 0 0 0 2px var(--accent);
}
.week-day-num {
    font-size: 11px;
    color: var(--text-3);
}

/* Pillar Rows */
.pillar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}
.pillar-row:not(:last-child) {
    border-bottom: 1px solid var(--border-0);
}
.pillar-row-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pillar-row-info { flex: 1; min-width: 0; }
.pillar-row-name {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-0);
    margin-bottom: 6px;
}
.pillar-row-bar {
    height: 3px;
    background: var(--bg-2);
    border-radius: 2px;
    overflow: hidden;
}
.pillar-row-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s var(--ease-out);
}
.pillar-row-stat {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-2);
    flex-shrink: 0;
    min-width: 24px;
    text-align: right;
}

/* Dash Insights */
.dash-insights { display: flex; flex-direction: column; gap: 12px; }
.dash-insight {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.dash-insight-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
}
.dash-insight-text {
    flex: 1;
    font-size: var(--fs-xs);
    color: var(--text-2);
    line-height: 1.5;
}
.dash-insight-text strong {
    display: block;
    color: var(--text-0);
    font-size: var(--fs-sm);
    margin-bottom: 1px;
}

/* Upcoming */
.dash-upcoming {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    transition: all var(--duration);
}
.dash-upcoming:not(:last-child) {
    border-bottom: 1px solid var(--border-0);
}
.dash-upcoming:hover { opacity: 0.8; }
.dash-upcoming-date {
    width: 40px;
    height: 40px;
    background: var(--accent-bg);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-upcoming-day {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.dash-upcoming-month {
    font-size: 9px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
}
.dash-upcoming-info { flex: 1; min-width: 0; }
.dash-upcoming-title {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-upcoming-meta {
    font-size: var(--fs-xs);
    color: var(--text-3);
}

/* Quick Actions */
.dash-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.dash-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-1);
    transition: all var(--duration);
    font-family: inherit;
}
.dash-action:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.dash-action svg { color: var(--text-2); transition: color var(--duration); }
.dash-action:hover svg { color: var(--accent); }

/* Empty State */
.dash-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-2);
}
.dash-empty-state svg { margin-bottom: 12px; }
.dash-empty-state p { margin-bottom: 16px; font-size: var(--fs-sm); }

/* Stat Card Colors */
.stat-card { position: relative; cursor: pointer; }
.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.stat-blue .stat-icon { background: rgba(0, 122, 255, 0.1); color: #007AFF; }
.stat-purple .stat-icon { background: rgba(175, 82, 222, 0.1); color: #AF52DE; }
.stat-green .stat-icon { background: rgba(52, 199, 89, 0.1); color: #34C759; }
.stat-orange .stat-icon { background: rgba(255, 149, 0, 0.1); color: #FF9500; }
.stat-divider { color: var(--text-3); font-weight: 400; }

/* Task Tags */
.task-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.task-tag-create { background: rgba(0, 122, 255, 0.1); color: #007AFF; }
.task-tag-engage { background: rgba(52, 199, 89, 0.1); color: #34C759; }
.task-tag-review { background: rgba(255, 149, 0, 0.1); color: #FF9500; }
.task-view-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: all var(--duration);
    flex-shrink: 0;
}
.task-view-btn:hover { background: var(--accent); color: #fff; }

/* Legacy compat */
.dash-welcome {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dash-welcome h1 { font-size: var(--fs-xl); margin-bottom: 4px; }
.dash-welcome p { color: var(--text-2); font-size: var(--fs-sm); }
.dash-welcome-actions { display: flex; gap: 8px; }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}
.dash-main { display: flex; flex-direction: column; gap: 20px; }
.dash-side { display: flex; flex-direction: column; gap: 16px; }

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--duration);
    border-left: 2px solid var(--accent);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Task completion animation */
.today-task.completed .task-check {
    animation: taskCheckPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes taskCheckPop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Goal ring animation */
.ring-fill {
    animation: goalRingFill 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes goalRingFill {
    from { stroke-dashoffset: var(--ring-circumference, 264); }
}

/* Pillar donut spin-in */
.pillar-donut {
    animation: donutSpinIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes donutSpinIn {
    from { transform: rotate(-90deg) scale(0.8); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* Reveal delay helpers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.stat-value { font-family: var(--font-sans); font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.stat-label {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 4px;
}

/* Today Section */
.today-section {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.today-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.today-header h2 {
    font-size: var(--fs-md);
    font-family: var(--font-sans);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.today-date { font-size: var(--fs-sm); color: var(--text-2); }
.today-body { padding: 16px; }

.today-task {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-2);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    align-items: center;
}
.today-task:last-child { margin-bottom: 0; }
.today-task:hover { transform: translateX(4px); background: var(--bg-3); }
.today-task.completed { opacity: 0.5; }
.today-task.completed .task-title { text-decoration: line-through; }

.task-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    transition: all var(--duration);
}
.today-task.completed .task-check {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--text-inv);
}
.task-content { flex: 1; min-width: 0; }
.task-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2px;
}
.task-title { font-size: var(--fs-sm); font-weight: 500; }
.task-meta { font-size: var(--fs-xs); color: var(--text-3); }
.task-action {
    font-size: var(--fs-xs);
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.no-tasks { text-align: center; padding: 32px; color: var(--text-3); font-size: var(--fs-sm); }

/* Tracker */
.tracker-section {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}
.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.tracker-header h3 {
    font-size: var(--fs-sm);
    font-family: var(--font-sans);
    font-weight: 600;
}
.tracker-stats { font-size: var(--fs-sm); color: var(--text-2); }
.tracker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tracker-day {
    text-align: center;
    padding: 10px 4px;
    border-radius: var(--radius);
    background: var(--bg-2);
    transition: all var(--duration);
}
.tracker-day.today { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-bg); }
.tracker-day.has-posts { background: var(--sage-bg); }
.tracker-day-name { font-size: 9px; font-weight: 700; color: var(--text-3); margin-bottom: 4px; }
.tracker-day-num { font-family: var(--font-serif); font-size: var(--fs-md); }
.tracker-day-count { font-size: 9px; color: var(--sage); margin-top: 2px; }

/* Goal Ring */
.goal-section {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}
.goal-section h3 {
    font-size: var(--fs-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 16px;
}
.goal-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 14px;
}
.goal-ring svg { transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 8; }
.goal-ring .ring-bg { stroke: var(--border-0); }
.goal-ring .ring-fill {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s var(--ease-out);
}
.goal-ring .ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.goal-ring .ring-value { font-family: var(--font-serif); font-size: var(--fs-xl); }
.goal-ring .ring-label { font-size: 9px; color: var(--text-3); }
.goal-text { font-size: var(--fs-sm); color: var(--text-2); }

/* Tips */
.tips-section {
    background: linear-gradient(135deg, var(--accent-bg), transparent);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: var(--fs-sm);
    font-weight: 600;
}
.tip-card {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
}
.tip-card:last-child { margin-bottom: 0; }
.tip-cat { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.tip-text { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-1); }

/* Quick Actions */
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    text-align: center;
    transition: all var(--duration) var(--ease-out);
}
.quick-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-icon { font-size: 20px; margin-bottom: 6px; }
.quick-label { font-size: var(--fs-xs); font-weight: 600; }

/* Pillars */
.pillars-section {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.pillars-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pillars-header h3 {
    font-size: var(--fs-sm);
    font-family: var(--font-sans);
    font-weight: 600;
}
.pillar-list { padding: 8px; }
.pillar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--duration);
}
.pillar-item:hover { background: var(--bg-2); }
.pillar-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pillar-info { flex: 1; min-width: 0; }
.pillar-name { font-size: var(--fs-sm); font-weight: 500; }
.pillar-count { font-size: var(--fs-xs); color: var(--text-3); }

/* === VAULT / IDEAS === */
.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}
.vault-header h1 { font-size: var(--fs-xl); }
.vault-controls { display: flex; gap: 8px; align-items: center; }

.vault-search {
    position: relative;
    width: 240px;
}
.vault-search input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-family: var(--font-sans);
    background: var(--bg-1);
    color: var(--text-0);
}
.vault-search input:focus { outline: none; border-color: var(--accent); }
.vault-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
}
.vault-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    cursor: pointer;
    background: transparent;
    color: var(--text-2);
    font-family: var(--font-sans);
    font-weight: 500;
    transition: all var(--duration);
    position: relative;
}
.filter-chip:hover { color: var(--text-0); background: var(--bg-2); }
.filter-chip.active { background: var(--bg-1); color: var(--text-0); box-shadow: var(--shadow-sm); font-weight: 600; }

/* Kanban */
.kanban {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    min-height: 300px;
}
.kanban-col {
    background: transparent;
    border-radius: var(--radius-lg);
    padding: 0 8px;
}
.kanban-col-header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kanban-col[data-status="fresh"] .kanban-col-header { border-color: var(--accent); }
.kanban-col[data-status="posted"] .kanban-col-header { border-color: var(--sage); }
.kanban-col[data-status="in_progress"] .kanban-col-header { border-color: var(--blue); }

.kanban-items { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }

.kanban-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all var(--duration) var(--ease-out);
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.6; transform: scale(0.95); box-shadow: var(--shadow-lg); }
.kanban-card:active { cursor: grabbing; }

/* Kanban column drop feedback */
.kanban-col.drag-over {
    background: var(--accent-bg);
    border: 2px dashed var(--accent);
    border-radius: var(--radius-lg);
}

/* Filter chip active indicator */
.filter-chip.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}
.filter-chip { position: relative; }

/* Modal section staggered reveals */
.modal-body .idea-section:nth-child(1) { animation: staggerSlideIn 0.4s ease 0.05s both; }
.modal-body .idea-section:nth-child(2) { animation: staggerSlideIn 0.4s ease 0.1s both; }
.modal-body .idea-section:nth-child(3) { animation: staggerSlideIn 0.4s ease 0.15s both; }
.modal-body .idea-section:nth-child(4) { animation: staggerSlideIn 0.4s ease 0.2s both; }
.modal-body .idea-section:nth-child(5) { animation: staggerSlideIn 0.4s ease 0.25s both; }

/* Hook copy animation */
@keyframes hookCopied {
    0% { background: var(--sage-bg); }
    100% { background: transparent; }
}
.hook-copied { animation: hookCopied 0.6s ease; }

/* Drawer panel */
.drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drawer-body {
    padding: 20px;
    overflow-y: auto;
    height: calc(100% - 60px);
}
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    transition: opacity 0.3s;
    display: none;
}
.drawer-backdrop.open {
    display: block;
    opacity: 1;
}
.kanban-card .k-pillar {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 4px;
}
.kanban-card .k-title { font-size: var(--fs-sm); margin-bottom: 8px; line-height: 1.4; font-weight: 500; }
.kanban-card .k-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-3);
}
.kanban-card .k-format {
    padding: 2px 6px;
    background: var(--bg-2);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
}

/* Empty Kanban Column */
.kanban-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-3);
    font-size: var(--fs-xs);
    border: 2px dashed var(--border-0);
    border-radius: var(--radius);
}

/* === CALENDAR === */
.cal-page { max-width: 1100px; margin: 0 auto; }
.cal-header { margin-bottom: 16px; }
.cal-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-header-top h1 { font-size: var(--fs-xl); margin: 0; }
.cal-header-actions { display: flex; gap: 8px; }
.cal-header-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.cal-view-toggle {
    display: flex; background: var(--bg-2); border-radius: var(--radius-sm); padding: 2px; border: 1px solid var(--border-0);
}
.cal-view-toggle button {
    padding: 6px 16px; border: none; background: none; border-radius: var(--radius-sm); cursor: pointer;
    font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); font-family: var(--font-sans); transition: all 0.15s;
}
.cal-view-toggle button.active { background: var(--bg-1); color: var(--text-0); box-shadow: var(--shadow-sm); }

.cal-month-nav { display: flex; align-items: center; gap: 6px; }
.cal-month-nav button {
    padding: 6px 10px; border: 1px solid var(--border-0); border-radius: var(--radius-sm);
    background: var(--bg-1); cursor: pointer; color: var(--text-1); font-family: var(--font-sans);
    transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.cal-month-nav button:hover { background: var(--bg-2); }
.cal-month-label { font-weight: 600; font-size: var(--fs-sm); min-width: 140px; text-align: center; }
.cal-today-btn {
    padding: 6px 12px; border: 1px solid var(--accent-border); border-radius: var(--radius-sm);
    background: var(--accent-bg); cursor: pointer; color: var(--accent); font-size: var(--fs-xs);
    font-weight: 600; font-family: var(--font-sans); transition: all 0.15s;
}
.cal-today-btn:hover { background: var(--accent); color: white; }

/* Stats bar */
.cal-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.cal-stat {
    padding: 12px; background: var(--bg-1); border: 1px solid var(--border-0);
    border-radius: var(--radius); text-align: center;
}
.cal-stat-num { font-size: var(--fs-lg); font-weight: 700; color: var(--text-0); }
.cal-stat-label { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; }

/* Content area */
.cal-content-month { display: grid; grid-template-columns: 1fr 240px; gap: 16px; }
.cal-content-agenda { display: grid; gap: 16px; }

/* Month grid (existing calendar-main styles) */
.calendar-main {
    background: var(--bg-1); border: 1px solid var(--border-0);
    border-radius: var(--radius-lg); overflow: hidden;
}
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg-2); }
.calendar-weekday {
    padding: 10px; text-align: center; font-size: 10px; font-weight: 700;
    color: var(--text-3); text-transform: uppercase;
}
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); animation: calFade 0.3s ease-out; }
@keyframes calFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.calendar-day {
    min-height: 80px; border-right: 1px solid var(--border-0); border-bottom: 1px solid var(--border-0);
    padding: 6px; transition: background 0.15s; cursor: pointer;
}
.calendar-day:hover { background: var(--bg-2); }
.calendar-day:nth-child(7n) { border-right: none; }
.calendar-day.today .day-num {
    background: var(--accent); color: var(--text-inv); border-radius: 50%;
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.calendar-day.other-month { opacity: 0.3; pointer-events: none; }
.calendar-day .day-num { font-size: var(--fs-xs); font-weight: 600; margin-bottom: 4px; }
.calendar-event {
    padding: 3px 6px; border-radius: 4px; font-size: 9px; margin-bottom: 2px; cursor: pointer;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500;
    border-left: 3px solid var(--accent); transition: all 0.15s;
}
.calendar-event:hover { opacity: 0.85; }
.calendar-overflow { font-size: 9px; color: var(--text-2); padding: 2px 6px; cursor: pointer; font-weight: 500; }
.calendar-overflow:hover { color: var(--accent); }
.calendar-day.has-events { background: var(--bg-1); }
.calendar-day.drag-over { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); }

/* Agenda view */
.cal-agenda { display: grid; gap: 0; }
.cal-agenda-group {
    display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--border-0);
}
.cal-agenda-group.past { opacity: 0.5; }
.cal-agenda-group.is-today { opacity: 1; }
.cal-agenda-date { text-align: center; padding-top: 4px; }
.cal-agenda-day-num {
    font-size: var(--fs-xl); font-weight: 700; color: var(--text-0); line-height: 1;
}
.cal-agenda-day-num.today-num {
    background: var(--accent); color: white; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto; font-size: var(--fs-base);
}
.cal-agenda-day-label { font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; }
.cal-agenda-items { display: grid; gap: 6px; }
.cal-agenda-item {
    padding: 12px; background: var(--bg-1); border: 1px solid var(--border-0);
    border-radius: var(--radius); cursor: pointer; transition: all 0.15s;
}
.cal-agenda-item:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.cal-agenda-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cal-agenda-format { font-size: var(--fs-xs); font-weight: 600; text-transform: capitalize; }
.cal-agenda-pillar {
    font-size: 10px; padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 600;
}
.cal-agenda-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); }
.cal-agenda-meta {
    display: flex; justify-content: space-between; align-items: center; margin-top: 6px;
    font-size: var(--fs-xs); color: var(--text-2);
}
.cal-unsched-btn {
    padding: 2px 6px; border: none; background: none; color: var(--text-3); cursor: pointer;
    font-size: var(--fs-xs); border-radius: var(--radius-sm); transition: all 0.15s;
}
.cal-unsched-btn:hover { color: var(--rose); background: var(--rose-bg); }

/* Unscheduled section */
.cal-unsched-section {
    background: var(--bg-1); border: 1px solid var(--border-0);
    border-radius: var(--radius-lg); overflow: hidden;
}
.cal-unsched-section.desktop-sidebar { max-height: 600px; overflow-y: auto; }
.cal-unsched-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; cursor: pointer; user-select: none;
}
.cal-unsched-header:hover { background: var(--bg-2); }
.cal-unsched-chevron { transition: transform 0.2s; }
.cal-unsched-section.collapsed .cal-unsched-chevron { transform: rotate(-90deg); }
.cal-unsched-section.collapsed .cal-unsched-list { display: none; }
.cal-unsched-list { padding: 0 12px 12px; display: grid; gap: 6px; }
.cal-unsched-item {
    background: var(--bg-2); border: 1px solid var(--border-0); border-radius: var(--radius);
    padding: 10px; cursor: pointer; transition: all 0.15s;
}
.cal-unsched-item:hover { border-color: var(--accent); }

/* Mobile calendar */
@media (max-width: 768px) {
    .cal-header-nav { flex-direction: column; align-items: stretch; gap: 8px; }
    .cal-view-toggle { justify-content: center; }
    .cal-month-nav { justify-content: center; }
    .cal-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .cal-stat { padding: 10px; }
    .cal-content-month { grid-template-columns: 1fr; }
    .cal-content-month .desktop-sidebar { display: none; }
    .calendar-day { min-height: 50px; padding: 4px; }
    .calendar-event { font-size: 8px; padding: 2px 4px; }
    .calendar-weekday { padding: 6px 2px; font-size: 9px; }
    .cal-agenda-group { grid-template-columns: 50px 1fr; gap: 8px; padding: 10px 0; }
    .cal-agenda-item { padding: 10px; }
}

/* Queue priority color bars */
.queue-item.priority-high { border-left-color: var(--red); }
.queue-item.priority-medium { border-left-color: var(--accent); }
.queue-item.priority-low { border-left-color: var(--sage); }

/* Queue card lift */
.queue-item.card-lift { transition: all var(--duration) var(--ease-out); }

/* Queue completion animation */
.queue-item.completing {
    animation: queueComplete 0.4s ease-out forwards;
}
@keyframes queueComplete {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(40px); height: 0; padding: 0; margin: 0; border: none; overflow: hidden; }
}

/* Queue stat cards */
.queue-stat-card.card-lift { transition: all var(--duration) var(--ease-out); }

/* === ANALYTICS === */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.analytics-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.analytics-card h3 {
    font-size: var(--fs-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 16px;
}
.analytics-card.full-width { grid-column: 1 / -1; }

.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar {
    width: 4px;
    background: var(--accent-bg);
    border-radius: 2px;
    transition: height 0.5s var(--ease-out);
    position: relative;
}
.bar.active { background: var(--accent); background-image: var(--accent-gradient); }

/* Bar animated growth */
.bar.bar-animate {
    height: 0 !important;
    animation: barGrow 0.6s var(--ease-out) forwards;
}
@keyframes barGrow {
    from { height: 0; }
    to { height: var(--bar-height); }
}

/* Active bar glow */
.bar.bar-glow {
    box-shadow: 0 0 12px var(--accent-border), 0 0 24px rgba(0, 122, 255, 0.15);
}
.bar-label { font-size: 9px; color: var(--text-3); font-weight: 600; }
.bar-value { font-size: var(--fs-xs); font-weight: 600; }

.pillar-breakdown { display: flex; flex-direction: column; gap: 12px; }
.pillar-bar-item { display: flex; align-items: center; gap: 12px; }
.pillar-bar-label { font-size: var(--fs-sm); width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pillar-bar-track { flex: 1; height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.pillar-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s var(--ease-out);
}
.pillar-bar-pct { font-size: var(--fs-xs); color: var(--text-3); width: 36px; text-align: right; }

/* Heatmap hover */
.heatmap-cell { transition: transform var(--duration); }
.heatmap-cell:hover { transform: scale(1.4); z-index: 1; }

/* Achievement unlock spring */
.achievement-unlocked {
    animation: achieveUnlock 0.5s var(--ease-out);
}
@keyframes achieveUnlock {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Achievement locked shimmer on hover */
.achievement-locked { position: relative; overflow: hidden; }
.achievement-locked:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.08) 55%, transparent 60%);
    animation: achieveShimmer 1s ease-in-out;
}
@keyframes achieveShimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* Flow arrow pulse */
.flow-arrow::after {
    animation: flowPulse 2s ease-in-out infinite;
}
@keyframes flowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Analytics card entrance */
.analytics-grid.stagger-in > .analytics-card {
    animation: analyticsCardIn 0.4s var(--ease-out) both;
}
.analytics-grid.stagger-in > .analytics-card:nth-child(1) { animation-delay: 0s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(2) { animation-delay: 0.08s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(3) { animation-delay: 0.16s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(4) { animation-delay: 0.24s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(5) { animation-delay: 0.32s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(6) { animation-delay: 0.4s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(7) { animation-delay: 0.48s; }
.analytics-grid.stagger-in > .analytics-card:nth-child(8) { animation-delay: 0.56s; }
@keyframes analyticsCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Format tag hover */
.format-tag { transition: transform var(--duration), color var(--duration); display: inline-block; }
.format-tag:hover { transform: scale(1.15); color: var(--accent-light) !important; }

/* Level progress bar dot */
.level-progress-dot {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}

/* === VOICE === */
.voice-page { max-width: 700px; margin: 0 auto; }
.voice-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.voice-header h1 { font-size: var(--fs-xl); }

.voice-section {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}
.voice-section-header {
    padding: 14px 20px;
    background: var(--bg-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.voice-section-body { padding: 20px; }
.voice-profile {
    font-size: var(--fs-base);
    line-height: 1.8;
    font-style: italic;
    color: var(--text-2);
    border-left: 3px solid var(--accent);
    padding-left: 16px;
}

.tone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.tone-item {
    text-align: center;
    padding: 14px;
    background: var(--bg-2);
    border-radius: var(--radius);
}
.tone-label { font-size: 9px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; }
.tone-value { font-size: var(--fs-base); font-weight: 500; text-transform: capitalize; }

.word-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.word-tag {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 500;
}
.word-use { background: var(--sage-bg); color: var(--sage); }
.word-avoid { background: var(--red-bg); color: var(--red); text-decoration: line-through; }

/* === ROADMAP === */
.roadmap-page { max-width: 800px; margin: 0 auto; }
.roadmap-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.roadmap-header h1 { font-size: var(--fs-xl); }

.rm-section {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}
.rm-header {
    padding: 14px 20px;
    background: var(--bg-2);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.rm-body { padding: 20px; }

.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.schedule-day {
    text-align: center;
    padding: 14px 6px;
    background: var(--bg-2);
    border-radius: var(--radius);
    transition: all var(--duration);
}
.schedule-day.has-post { background: var(--accent-bg); border: 1px solid var(--accent-border); }
.schedule-day-name { font-size: 9px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; }
.schedule-day-content { font-size: 10px; color: var(--text-2); }

.phase-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.phase-card {
    padding: 20px;
    background: var(--bg-2);
    border-radius: var(--radius);
    border-top: 3px solid var(--text-0);
    transition: all var(--duration);
}
.phase-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.phase-card:nth-child(2) { border-color: var(--accent); }
.phase-card:nth-child(3) { border-color: var(--sage); }
.phase-num { font-size: 9px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; }
.phase-name { font-size: var(--fs-base); font-family: var(--font-serif); margin-bottom: 4px; }
.phase-days { font-size: var(--fs-xs); color: var(--accent); margin-bottom: 8px; font-weight: 600; }
.phase-focus { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }

/* === MODALS === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 16px;
}
.modal-overlay.active {
    display: flex;
    animation: fadeIn var(--duration) var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--bg-1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    animation: modalSlide var(--duration-slow) var(--ease-spring);
}
.modal-lg { max-width: 640px; }

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    position: sticky;
    top: 0;
    background: var(--bg-1);
    z-index: 1;
}
.modal-title { font-size: 17px; font-weight: 600; font-family: var(--font-sans); }
.modal-sub { font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; }
.modal-header-actions { display: flex; gap: 4px; align-items: center; }
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-2);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration);
}
.modal-close:hover { background: var(--bg-3); color: var(--text-0); }
.modal-close:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }

.modal-body { padding: 24px; max-height: calc(85vh - 120px); overflow-y: auto; }
.modal-section { margin-bottom: 20px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 10px;
}

.hook-item {
    padding: 12px 14px;
    background: var(--bg-2);
    border-radius: var(--radius);
    margin-bottom: 6px;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all var(--duration);
    border: 1px solid transparent;
}
.hook-item:hover { background: var(--bg-3); border-color: var(--border-0); }
.hook-item.copied { background: var(--sage-bg); border-color: var(--sage-border); }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    bottom: 0;
    background: var(--bg-1);
}

.idea-status-switcher { display: flex; gap: 4px; }
.status-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-0);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-1);
    color: var(--text-2);
    font-family: var(--font-sans);
    transition: all var(--duration);
}
.status-btn:hover { border-color: var(--text-3); }
.status-btn.active { background: var(--text-0); color: var(--text-inv); border-color: var(--text-0); }

/* Settings */
.settings-section { margin-bottom: 24px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-title { font-size: var(--fs-sm); font-family: var(--font-sans); font-weight: 600; margin-bottom: 12px; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.shortcuts-list { display: flex; flex-direction: column; gap: 8px; }
.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-sm);
    color: var(--text-2);
}
kbd {
    padding: 3px 8px;
    background: var(--bg-2);
    border: 1px solid var(--border-0);
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-sans);
    color: var(--text-2);
}

/* === COMMAND PALETTE === */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-cmd);
    display: none;
    justify-content: center;
    padding-top: 20vh;
}
.cmd-palette-overlay.active {
    display: flex;
    animation: fadeIn 150ms var(--ease-out);
}
.cmd-palette {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    animation: modalSlide 200ms var(--ease-spring);
}
.cmd-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-0);
}
.cmd-search svg { color: var(--text-3); flex-shrink: 0; }
.cmd-search input {
    flex: 1;
    border: none;
    background: none;
    font-size: var(--fs-base);
    font-family: var(--font-sans);
    color: var(--text-0);
    outline: none;
}
.cmd-search input::placeholder { color: var(--text-3); }
.cmd-search kbd { flex-shrink: 0; }

.cmd-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.cmd-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 8px 10px 4px;
}
.cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--duration-fast);
}
.cmd-item:hover, .cmd-item.selected { background: var(--bg-2); transform: translateX(4px); transition: all var(--duration) var(--ease-out); }
.cmd-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.cmd-item.selected .cmd-item-icon { background: var(--accent-bg); }
.cmd-item-text { flex: 1; }
.cmd-item-title { font-size: var(--fs-sm); font-weight: 500; }
.cmd-item-desc { font-size: var(--fs-xs); color: var(--text-3); }
.cmd-item-shortcut { font-size: var(--fs-xs); color: var(--text-3); }

.cmd-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border-0);
    display: flex;
    gap: 16px;
    font-size: var(--fs-xs);
    color: var(--text-3);
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    padding: 12px 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-sm);
    pointer-events: auto;
    animation: toastIn var(--duration-slow) var(--ease-spring);
    max-width: 360px;
}
.toast.removing { animation: toastOut var(--duration) var(--ease-out) forwards; }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-3);
    padding: 2px;
}
.toast { position: relative; overflow: hidden; }
.toast.success { border-left: 3px solid var(--sage); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    animation: toastProgressShrink linear forwards;
    width: 100%;
}
.toast.success .toast-progress { background: var(--sage); }
.toast.error .toast-progress { background: var(--red); }
.toast.info .toast-progress { background: var(--blue); }
@keyframes toastProgressShrink {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(20px) scale(0.95); }
}

/* === ERROR VIEW === */
.error-view {
    text-align: center;
    padding: 80px 24px;
    max-width: 420px;
    margin: 0 auto;
}
.error-icon { margin-bottom: 20px; color: var(--text-3); }
.error-view h2 { font-size: var(--fs-xl); margin-bottom: 8px; }
.error-view p { color: var(--text-2); margin-bottom: 24px; font-size: var(--fs-sm); line-height: 1.6; }
.error-actions { display: flex; gap: 10px; justify-content: center; }

/* === IDEA MODAL ENHANCEMENTS === */
.idea-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-0);
    margin-bottom: 16px;
}
.idea-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-0);
    border-radius: var(--radius-sm);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: var(--fs-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration);
}
.idea-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.idea-schedule-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
}
.idea-date-input {
    border: 1px solid var(--border-0);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: var(--fs-xs);
    background: var(--bg-1);
    color: var(--text-1);
    cursor: pointer;
}
.idea-date-input:focus { border-color: var(--accent); outline: none; }
.hook-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}
.copy-sm-btn {
    float: right;
    border: 1px solid var(--border-0);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 11px;
    background: var(--bg-1);
    color: var(--text-2);
    cursor: pointer;
}
.copy-sm-btn:hover { color: var(--accent); border-color: var(--accent); }
.idea-notes {
    width: 100%;
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: var(--fs-sm);
    font-family: inherit;
    background: var(--bg-0);
    color: var(--text-1);
    resize: vertical;
    min-height: 60px;
    transition: border-color var(--duration);
}
.idea-notes:focus { border-color: var(--accent); outline: none; }

/* === PRO BADGE === */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #AF52DE, #007AFF);
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    margin-left: 6px;
    flex-shrink: 0;
}
.pro-badge::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: proBadgeShimmer 2s infinite;
}
@keyframes proBadgeShimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}
.btn.gated {
    opacity: 0.75;
    cursor: pointer;
}

/* === STICKY UPGRADE BAR (mobile) === */
.sticky-upgrade-bar {
    position: fixed;
    bottom: 60px;
    left: 0; right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, #AF52DE, #007AFF);
    color: white;
    font-size: 13px;
    font-weight: 600;
}
.sticky-upgrade-text { flex: 1; }
.sticky-upgrade-btn {
    background: white !important;
    color: #007AFF !important;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 12px;
}
@media (min-width: 769px) {
    .sticky-upgrade-bar { display: none !important; }
}

/* === DRAFT GRID & CARDS === */
.draft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.draft-card {
    padding: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--duration), box-shadow var(--duration);
}
.draft-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,122,255,0.1);
}
.draft-card-platform {
    font-weight: 600;
    font-size: var(--fs-xs);
    color: var(--text-0);
}

/* === HOOK VARIANT CARDS === */
.hook-variant-card {
    padding: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--duration);
}
.hook-variant-card:hover {
    border-color: var(--accent);
}

/* === VOICE CHECKER === */
.voice-checker-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius-full);
    font-size: 20px;
    font-weight: 800;
    color: white;
}
.voice-checker-aspect {
    padding: 8px 12px;
    background: var(--bg-1);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
}

/* === TEMPLATE CARDS === */
.template-card {
    padding: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    transition: border-color var(--duration);
}
.template-card:hover { border-color: var(--accent); }

/* === COMPETITOR CARDS === */
.competitor-card {
    padding: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
}

/* === UPGRADE MODAL === */
.upgrade-content {
    text-align: center;
    padding: 24px;
}
.upgrade-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(175,82,222,0.1), rgba(0,122,255,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}
.upgrade-title { font-size: var(--fs-xl); font-weight: 600; margin-bottom: 8px; }
.upgrade-desc { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.6; margin-bottom: 24px; }
.upgrade-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.upgrade-plan {
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    padding: 16px 12px;
    cursor: pointer;
    transition: all var(--duration);
}
.upgrade-plan:hover { border-color: var(--accent); }
.upgrade-plan.featured { border-color: var(--accent); background: var(--accent-bg); }
.upgrade-plan-name { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; }
.upgrade-plan-price { font-size: var(--fs-xl); font-weight: 700; color: var(--accent); }
.upgrade-plan-price span { font-size: var(--fs-xs); font-weight: 400; color: var(--text-3); }

/* === SKELETON LOADING === */
.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-card { height: 80px; margin-bottom: 10px; }
.skeleton-circle { border-radius: 50%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-side { order: -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .dash-header { flex-direction: column; gap: 12px; }
    .dash-actions-grid { grid-template-columns: repeat(4, 1fr); }
    .kanban { grid-template-columns: repeat(2, 1fr); }
    .analytics-grid { grid-template-columns: 1fr; }
}

/* Mobile More Menu */
.mobile-more-menu {
    display: none;
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 8px);
    right: 12px;
    left: 12px;
    background: var(--bg-1);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 8px;
    z-index: calc(var(--z-nav) + 1);
}
.mobile-more-menu.open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mobile-more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-1);
    font-size: 11px;
    font-family: var(--font-sans);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--duration);
    width: 100%;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.mobile-more-item:hover, .mobile-more-item:active { background: var(--bg-2); }
.mobile-more-item svg { opacity: 0.6; flex-shrink: 0; }

@media (max-width: 768px) {
    .sidebar { display: none !important; }
    .sidebar-backdrop { display: none !important; }
    .hamburger-btn { display: none !important; }

    .mobile-nav { display: flex; }
    .app.with-nav { padding-bottom: 72px; margin-left: 0; padding-top: 0; }

    .view { padding: 20px 16px 20px; }
    .dash-side { grid-template-columns: 1fr; }
    .dash-welcome { flex-direction: column; align-items: flex-start; gap: 12px; }
    .dash-header { flex-direction: column; }
    .dash-greeting { font-size: 22px; }
    .dash-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .week-days { gap: 2px; }

    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .kanban { grid-template-columns: 1fr; }
    /* old calendar-layout overrides removed — handled by .cal-content-month */
    .phase-row, .tone-grid { grid-template-columns: repeat(2, 1fr); }
    .schedule-grid { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 4px; }
    .schedule-day { min-width: 80px; flex-shrink: 0; }

    .option-grid { grid-template-columns: repeat(2, 1fr); }
    .option-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }

    .modal { margin: 8px; max-height: 90vh; }

    .toast-container { bottom: 88px; right: 16px; left: 16px; }
    .toast { max-width: 100%; }

    /* Hide non-essential table columns on mobile */
    .vault-list th:nth-child(4),
    .vault-list td:nth-child(4),
    .vault-list th:nth-child(5),
    .vault-list td:nth-child(5),
    .vault-list th:nth-child(7),
    .vault-list td:nth-child(7) { display: none; }

    /* Prevent table overflow */
    .vault-list { font-size: var(--fs-sm); }
    .vault-list th, .vault-list td { padding: 8px 6px; }

    .cmd-palette-overlay { padding-top: 10vh; padding: 10vh 16px 0; }

    /* Vault / Ideas page mobile fixes */
    .vault-header { flex-wrap: wrap; gap: 10px; }
    .vault-header h1 { font-size: 22px; width: 100%; }
    .vault-controls { display: grid !important; grid-template-columns: 1fr auto auto; gap: 8px; width: 100%; align-items: center; }
    .vault-search { width: 100%; grid-column: 1 / -1; }
    .vault-view-toggle { display: flex; gap: 4px; }
    .vault-sort { flex-direction: row !important; align-items: center; gap: 6px !important; }
    .vault-sort label { display: none; }
    .vault-summary { gap: 12px !important; flex-wrap: wrap; }

    /* Roadmap page mobile fixes */
    .rm-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .schedule-visual { display: flex !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; gap: 8px !important; padding-bottom: 4px; }
    .schedule-visual > div { min-width: 80px; flex-shrink: 0; }
    .rm-times-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important; gap: 16px !important; }
    .roadmap-timeline { padding-left: 40px !important; }
    .timeline-node { width: 40px !important; height: 40px !important; font-size: var(--fs-sm) !important; }
    .timeline-line { left: 18px !important; }
    .rm-phase-row { padding-left: 56px !important; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: var(--fs-xl); }
    .tracker-grid { grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .schedule-grid { display: flex; overflow-x: auto; }
    .schedule-day { min-width: 72px; }
    .phase-row { grid-template-columns: 1fr; }
    .tone-grid { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: 1fr; }
    .vault-search { width: 100%; }
    .vault-header { flex-wrap: wrap; }
    .vault-controls { grid-template-columns: 1fr 1fr !important; }
    .vault-controls .btn { font-size: var(--fs-xs); padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .vault-view-toggle { display: flex; gap: 4px; }
    .vault-view-toggle .btn { flex: 1; }
    .vault-summary { gap: 8px !important; font-size: var(--fs-xs) !important; padding: 10px 12px !important; }
    .filter-chip { padding: 5px 10px; font-size: 11px; }

    /* Roadmap: smaller timeline for phones */
    .rm-stats-grid { grid-template-columns: 1fr 1fr !important; }
    .rm-times-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .roadmap-timeline { padding-left: 32px !important; }
    .timeline-node { width: 32px !important; height: 32px !important; font-size: var(--fs-xs) !important; }
    .timeline-line { left: 14px !important; }
    .rm-phase-row { padding-left: 44px !important; }
    .schedule-visual > div { min-width: 70px; }
    .roadmap-header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .roadmap-header h1 { font-size: 22px; }
}

/* === BRAND SWITCHER === */
.brand-switcher {
    position: relative;
}

.brand-current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    min-width: 0;
}

.brand-current:hover {
    background: var(--bg-2);
}

.brand-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--text-inv);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--fs-lg);
    flex-shrink: 0;
}

.brand-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--fs-base);
}

.brand-avatar-new {
    background: var(--bg-3);
    color: var(--text-2);
    border: 2px dashed var(--border-0);
}

.brand-info {
    min-width: 0;
}

.brand-name {
    font-weight: 600;
    font-size: var(--fs-base);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-meta {
    font-size: var(--fs-xs);
    color: var(--text-3);
}

.brand-chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: var(--text-3);
}

.brand-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: calc(var(--z-modal) + 1);
    display: none;
    overflow: hidden;
}

.brand-dropdown.open {
    display: block;
    animation: dropdown-in 0.15s ease-out;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--duration-fast);
}

.brand-option:hover {
    background: var(--bg-2);
}

.brand-option.active {
    background: var(--accent-bg);
}

.brand-option.brand-new {
    border-top: 1px solid var(--border-0);
}

.brand-option-info {
    min-width: 0;
    flex: 1;
}

.brand-option-name {
    font-size: var(--fs-sm);
    font-weight: 500;
    text-transform: capitalize;
}

.brand-option-meta {
    font-size: var(--fs-xs);
    color: var(--text-3);
    text-transform: capitalize;
}

.brand-active-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* === ANALYTICS HEATMAP === */
.analytics-heatmap {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    padding: 16px 0;
}

.heatmap-cell {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--bg-2);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
}
.heatmap-cell:hover { transform: scale(1.15); box-shadow: var(--shadow-sm); }

.heatmap-cell.today {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.heatmap-legend {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-top: 12px;
}

.donut-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto;
}

/* === CONTENT PIPELINE === */
.flow-pipeline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.flow-node {
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    background: var(--bg-2);
    color: var(--text-1);
    transition: all var(--duration) var(--ease-out);
    min-width: 100px;
    border: 1px solid var(--border-0);
}
.flow-node:hover {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.flow-arrow {
    font-size: 18px;
    color: var(--text-3);
    flex-shrink: 0;
}

/* === DASHBOARD HEATMAP === */
.streak-heatmap {
    display: grid;
    gap: 2px;
}

.heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.heatmap-day {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    transition: all var(--duration);
}

.heatmap-empty { background: var(--bg-2); }
.heatmap-low { background: rgba(52, 199, 89, 0.2); }
.heatmap-med { background: rgba(52, 199, 89, 0.5); }
.heatmap-high { background: var(--sage); }

.heatmap-day:hover { transform: scale(1.2); }

/* === HEALTH SCORE & CARDS === */
.health-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.health-ring {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}
.health-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.health-ring circle { fill: none; stroke-width: 6; }

.pillar-donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto;
}

.ai-insight {
    background: linear-gradient(135deg, var(--accent-bg), rgba(0, 122, 255, 0.04));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all var(--duration) var(--ease-out);
}
.ai-insight:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.insight-icon {
    font-size: 18px;
    flex-shrink: 0;
    color: var(--accent);
}

.insight-text {
    font-size: var(--fs-sm);
    line-height: 1.4;
    color: var(--text-1);
}

/* === VAULT VIEW === */
.vault-view-toggle {
    display: flex;
    gap: 6px;
}

.vault-sort {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vault-list {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    overflow: hidden;
}

.vault-list-row {
    border-bottom: 1px solid var(--border-0);
    transition: background var(--duration);
}
.vault-list-row:hover { background: var(--bg-2); }
.vault-list-row:last-child { border-bottom: none; }

.vault-list-cell {
    padding: 12px;
    font-size: var(--fs-sm);
    color: var(--text-1);
}

.vault-pillar-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 500;
    white-space: nowrap;
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.vault-select {
    accent-color: var(--accent);
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.vault-batch-bar {
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.vault-summary {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 14px 16px;
    font-size: var(--fs-sm);
    color: var(--text-2);
}

/* === VOICE SECTION === */
.voice-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    transition: all var(--duration);
}
.voice-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); }

/* Voice shimmer border — disabled for clean Apple look */
.voice-shimmer { position: relative; }
.voice-shimmer::before { display: none; }

/* Vocabulary word hover */
.vocab-word { transition: all var(--duration) !important; }
.vocab-word:hover { transform: translateY(-2px) scale(1.05); box-shadow: var(--shadow-sm); }

.voice-copy-btn {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--fs-xs);
    color: var(--accent);
    transition: all var(--duration) var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.voice-copy-btn:hover {
    text-decoration: underline;
}

.tone-spectrum {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.tone-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-0);
    transition: all var(--duration) var(--ease-out);
    background: var(--accent);
    cursor: pointer;
}
.tone-dot:hover { transform: scale(1.15); box-shadow: var(--shadow-sm); }

.voice-vocab-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius);
    background: var(--bg-2);
    border: 1px solid var(--border-0);
    font-size: var(--fs-xs);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
}
.voice-vocab-tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--accent);
}

.voice-cheat-sheet {
    background: linear-gradient(135deg, var(--purple-bg), rgba(124, 108, 173, 0.04));
    border: 1px solid rgba(124, 108, 173, 0.2);
}

.sig-phrase {
    display: inline-block;
    padding: 8px 14px;
    background: var(--purple-bg);
    border: 1px solid rgba(124, 108, 173, 0.2);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
}
.sig-phrase:hover {
    transform: translateY(-2px);
    border-color: var(--purple);
    box-shadow: var(--shadow-sm);
}

/* === ROADMAP TIMELINE === */
.roadmap-timeline {
    position: relative;
    padding: 20px 0 20px 60px;
}

.timeline-line {
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-0);
}

.timeline-node {
    position: absolute;
    left: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border-0);
    background: var(--bg-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all var(--duration) var(--ease-out);
}

.timeline-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inv);
}
.timeline-completed {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inv);
}

/* Timeline line grow animation */
.timeline-line {
    animation: timelineGrow 0.8s ease-out;
    transform-origin: top;
}
@keyframes timelineGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* Strategy progress bar animated fill */
.progress-bar-animated {
    animation: progressFill 1s ease-out 0.3s forwards;
}
@keyframes progressFill {
    from { width: 0; }
    to { width: var(--target-width); }
}

/* Milestone check animation */
.milestone-check:checked {
    animation: milestoneCheck 0.3s ease-out;
}
@keyframes milestoneCheck {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Clock spin-in for best posting times */
.time-indicator {
    animation: clockSpinIn 0.8s ease-out;
    box-sizing: border-box;
}
@media (max-width: 480px) {
    .time-indicator { width: 64px !important; height: 64px !important; }
}
@keyframes clockSpinIn {
    from { transform: rotate(-180deg) scale(0.5); opacity: 0; }
    to { transform: rotate(0) scale(1); opacity: 1; }
}

.phase-card-v2 {
    padding: 20px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    transition: all var(--duration) var(--ease-out);
    margin-bottom: 16px;
}
.phase-card-v2:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.phase-progress {
    height: 4px;
    background: var(--bg-2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}
.phase-progress::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    transition: width var(--duration-slow) var(--ease-out);
}

.milestone-check {
    accent-color: var(--accent);
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.schedule-visual {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.time-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0deg, var(--accent) 180deg, var(--bg-2) 180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-0);
    box-shadow: var(--shadow-sm);
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 1024px) {
    .flow-pipeline { flex-wrap: wrap; }
    .analytics-heatmap { overflow-x: auto; padding-bottom: 8px; }
}

@media (max-width: 768px) {
    .vault-list { display: block; overflow-x: auto; }
    .voice-card { padding: 16px; }
    .roadmap-timeline { padding-left: 40px; }
    .timeline-line { left: 18px; }
    .timeline-node { width: 40px; height: 40px; left: -8px; }
    .schedule-visual { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .analytics-heatmap { grid-template-columns: repeat(7, 1fr); }
    .schedule-visual { grid-template-columns: repeat(2, 1fr); }
    .tone-spectrum { flex-wrap: wrap; }
}

/* === VIEW TRANSITIONS === */
.view {
    transition: opacity var(--duration-slow) var(--ease-out);
}

.view.entering {
    animation: viewSlideIn var(--duration-slow) var(--ease-out);
}

.view.leaving {
    animation: viewSlideOut var(--duration) var(--ease-out);
}

@keyframes viewSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes viewSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

/* === MICRO-ANIMATIONS === */

/* Staggered children animations */
.stats-row > *:nth-child(1) { animation-delay: 0ms; }
.stats-row > *:nth-child(2) { animation-delay: 50ms; }
.stats-row > *:nth-child(3) { animation-delay: 100ms; }
.stats-row > *:nth-child(4) { animation-delay: 150ms; }

.kanban > *:nth-child(1) { animation-delay: 0ms; }
.kanban > *:nth-child(2) { animation-delay: 60ms; }
.kanban > *:nth-child(3) { animation-delay: 120ms; }
.kanban > *:nth-child(4) { animation-delay: 180ms; }

.analytics-grid > * {
    animation: cardEntrance var(--duration-slow) var(--ease-out) backwards;
}
.analytics-grid > *:nth-child(1) { animation-delay: 0ms; }
.analytics-grid > *:nth-child(2) { animation-delay: 60ms; }
.analytics-grid > *:nth-child(3) { animation-delay: 120ms; }
.analytics-grid > *:nth-child(4) { animation-delay: 180ms; }

.phase-row > *:nth-child(1) { animation-delay: 0ms; }
.phase-row > *:nth-child(2) { animation-delay: 80ms; }
.phase-row > *:nth-child(3) { animation-delay: 160ms; }

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Achievement icon floating animation */
.achievement-unlock {
    animation: achievementFloat var(--duration-slow) var(--ease-out);
}

@keyframes achievementFloat {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(-8px);
    }
}

/* Subtle shimmer on accent elements */
.accent-shimmer:hover {
    animation: accentShimmer var(--duration) var(--ease-out);
}

@keyframes accentShimmer {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* Smooth number transitions */
.stat-value {
    transition: all var(--duration-slow) var(--ease-out);
}

.stat-card {
    animation: cardEntrance var(--duration-slow) var(--ease-out) backwards;
}

/* Card entrance animations */
.kanban-card {
    animation: cardEntrance var(--duration-slow) var(--ease-out) backwards;
}

.kanban-card:nth-child(1) { animation-delay: 0ms; }
.kanban-card:nth-child(2) { animation-delay: 40ms; }
.kanban-card:nth-child(3) { animation-delay: 80ms; }
.kanban-card:nth-child(4) { animation-delay: 120ms; }
.kanban-card:nth-child(5) { animation-delay: 160ms; }

/* === DARK MODE ENHANCEMENTS === */

[data-theme="dark"] .kanban-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .kanban-card:hover {
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

[data-theme="dark"] .voice-card {
    border-color: var(--border-1);
    box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.1);
}

[data-theme="dark"] .voice-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .analytics-card {
    background: var(--bg-2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .analytics-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .today-task:hover {
    background: var(--bg-3);
    box-shadow: inset 0 0 0 1px var(--accent-border);
}

[data-theme="dark"] .stat-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.1);
}

[data-theme="dark"] .modal {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .btn-warning {
    background: var(--warning);
    border-color: var(--warning);
}
[data-theme="dark"] .btn-warning:hover {
    background: var(--warning-dark);
    border-color: var(--warning-dark);
}

/* === ACCESSIBILITY IMPROVEMENTS === */

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --text-0: #000000;
        --text-1: #1a1a1a;
        --border-0: #000000;
        --border-1: #1a1a1a;
    }

    [data-theme="dark"] {
        --text-0: #ffffff;
        --text-1: #ffffff;
        --border-0: #ffffff;
        --border-1: #ffffff;
    }

    .btn, .icon-btn, .chip, .option-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
/* Dark mode smooth transitions */
body, .nav, .app, .view, .btn, .card, .stat-card, .analytics-card, .voice-card,
.modal-overlay, .modal-content, .cmd-palette, .toast, .queue-item, .queue-stat-card,
.calendar-main, .calendar-sidebar, .calendar-day, .kanban-card, .kanban-col,
.mobile-nav, .drawer, input, textarea, select {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
        scroll-behavior: auto !important;
    }
    .agent-card.active .agent-status,
    .agent-pulse-ring::before,
    .flow-arrow::after,
    .skeleton { animation: none !important; }
    /* Force elements to final state */
    .reveal, .stagger-in > *, .bar-animate, .progress-bar-animated {
        opacity: 1 !important;
        transform: none !important;
    }
    .bar-animate {
        height: var(--bar-height) !important;
    }
    .progress-bar-animated {
        width: var(--target-width) !important;
    }
    .counter {
        /* counters should show final value immediately */
    }
}

/* Ensure all interactive elements have visible focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast focus ring for dark mode */
[data-theme="dark"] button:focus-visible,
[data-theme="dark"] a:focus-visible,
[data-theme="dark"] input:focus-visible {
    outline-color: var(--accent-light);
}

/* Minimum touch target sizes for mobile */
@media (pointer: coarse) {
    .btn,
    .icon-btn,
    .mobile-nav-btn,
    .chip,
    input,
    textarea,
    select,
    button {
        min-height: 48px;
        min-width: 48px;
    }

    .btn-sm {
        min-height: 44px;
        min-width: 44px;
    }

    .form-input, .form-textarea {
        min-height: 48px;
        padding: 14px 16px;
    }

    .task-check {
        width: 28px;
        height: 28px;
    }
}

/* Text contrast ratios meet WCAG AA standards */
.text-contrast-aa {
    color: var(--text-0);
}

/* === SKELETON LOADING ENHANCEMENTS === */

.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-card {
    height: 80px;
    margin-bottom: 10px;
}

.skeleton-circle {
    border-radius: 50%;
}

/* Skeleton variations for different content */
.skeleton-stat-card {
    height: 120px;
    margin-bottom: 12px;
    border-radius: var(--radius);
}

.skeleton-kanban-card {
    height: 100px;
    margin-bottom: 8px;
    border-radius: var(--radius);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.skeleton-heading {
    height: 28px;
    width: 70%;
    margin-bottom: 16px;
}

.skeleton-paragraph {
    height: 12px;
    margin-bottom: 6px;
}

.skeleton-paragraph:last-child {
    width: 80%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* === SCROLLBAR STYLING === */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
    background: var(--border-1);
    border-radius: 4px;
    transition: background var(--duration);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Firefox scrollbar */
* {
    scrollbar-color: var(--border-1) var(--bg-2);
    scrollbar-width: thin;
}

/* === SELECTION & HIGHLIGHT STYLES === */

::selection {
    background: var(--accent-bg);
    color: var(--accent);
}

::placeholder {
    color: var(--text-3);
}

/* Search highlight */
.search-highlight {
    background: var(--accent-bg);
    color: var(--accent);
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 500;
}

/* Text selection indicator */
.text-selected {
    background: var(--accent-bg);
    padding: 2px 4px;
    border-radius: 2px;
}

/* === FORM FIELD ENHANCEMENTS === */

.field-error {
    display: block;
    font-size: var(--fs-xs);
    color: var(--red);
    margin-top: 6px;
    font-weight: 500;
}

.form-input.error,
.form-textarea.error {
    border-color: var(--red);
    background: var(--red-bg);
}

.form-input.error:focus,
.form-textarea.error:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-bg);
}

.form-input.success,
.form-textarea.success {
    border-color: var(--sage);
    background: var(--sage-bg);
}

.form-input.success:focus,
.form-textarea.success:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px var(--sage-bg);
}

.char-counter {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-top: 6px;
    text-align: right;
    transition: color var(--duration);
}

.char-counter.warning {
    color: var(--accent);
}

.char-counter.error {
    color: var(--red);
}

/* Form group validation states */
.form-group.error label {
    color: var(--red);
}

.form-group.success label {
    color: var(--sage);
}

.form-group.focused label {
    color: var(--accent);
}

/* === SETTINGS PAGE STYLES === */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.setting-card {
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--duration) var(--ease-out);
}

.setting-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-md);
}

.setting-title {
    font-size: var(--fs-base);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-0);
}

.setting-desc {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Slider control */
.slider-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-input {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration);
}

.slider-input::-webkit-slider-thumb:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: scale(1.15);
}

.slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration);
}

.slider-input::-moz-range-thumb:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: scale(1.15);
}

.slider-value {
    font-size: var(--fs-sm);
    font-weight: 600;
    min-width: 40px;
    text-align: right;
    color: var(--accent);
}

/* Color picker */
.color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.color-option.selected {
    border-color: var(--text-0);
    box-shadow: var(--shadow-lg);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Danger zone */
.danger-zone {
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 32px;
}

.danger-zone-title {
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--red);
    margin-bottom: 8px;
}

.danger-zone-desc {
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin-bottom: 16px;
}

.danger-zone-action {
    display: flex;
    gap: 8px;
}

/* Toggle switch */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    width: 42px;
    height: 26px;
    background: var(--bg-3);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    transition: background var(--duration) var(--ease-out);
    border: none;
    padding: 0;
}

.toggle-switch.enabled {
    background: var(--sage);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left var(--duration) var(--ease-out);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.enabled::after {
    left: 18px;
}

/* === RESPONSIVE FORM TWEAKS === */

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .color-picker {
        gap: 8px;
    }

    .color-option {
        width: 40px;
        height: 40px;
    }

    .form-input, .form-textarea {
        font-size: 16px;
    }
}

/* === ADDITIONAL RESPONSIVE TWEAKS === */

/* Better tablet layout for kanban */
@media (max-width: 1024px) and (min-width: 769px) {
    .kanban {
        grid-template-columns: repeat(3, 1fr);
    }

}

/* Improved mobile card stacking */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analytics-card.full-width {
        grid-column: 1;
    }

    .phase-row {
        grid-template-columns: 1fr;
    }

    .tone-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px 14px;
    }

    .stat-value {
        font-size: var(--fs-xl);
    }

    .stat-label {
        font-size: var(--fs-xs);
    }
}

/* Better touch scroll for horizontal sections */
@media (pointer: coarse) {
    .kanban,
    .analytics-grid,
    .vault-list,
    .schedule-grid {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .vault-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Smooth scrolling for all sections */
.scrollable-section {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Improved mobile navigation spacing */
@media (max-width: 480px) {
    .nav {
        padding: 0 16px;
    }

    .mobile-nav {
        height: 68px;
    }

    .mobile-nav-btn {
        padding: 6px;
    }

    .view {
        padding: 16px 12px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .btn {
        padding: 9px 16px;
    }

    .btn-sm {
        padding: 6px 12px;
    }
}

/* === ANIMATIONS FOR DISCOVERY FLOW === */

/* Slide out animation for phase transitions */
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Slide in animation for phase transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce animation for option card selection */
@keyframes bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Pulse animation for active progress step */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(0, 122, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
    }
}


/* === FORM SLIDER === */
.form-slider {
    width: 100%;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--bg-3);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background var(--duration) var(--ease-out);
}

.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--duration) var(--ease-out);
}

.form-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.form-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--duration) var(--ease-out);
}

.form-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.form-slider:focus {
    background: var(--bg-2);
}

.btn-warning {
    background: var(--warning);
    color: var(--text-inv);
    border: 1px solid var(--warning);
    transition: all var(--duration) var(--ease-out);
}

.btn-warning:hover {
    background: var(--warning-dark);
    border-color: var(--warning-dark);
    box-shadow: var(--shadow-md);
}

/* === CONTENT QUEUE === */
.queue-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--pad-lg);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.queue-header h1 {
    font-size: var(--fs-3xl);
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-0);
}

.queue-subtitle {
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin: 0;
}

.queue-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.queue-stat-card {
    padding: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--duration) var(--ease-out);
}

.queue-stat-card:hover {
    border-color: var(--border-1);
    box-shadow: var(--shadow-sm);
}

.queue-stat-value {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 4px;
}

.queue-stat-label {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
}

.queue-stat-sub {
    font-size: var(--fs-xs);
    color: var(--text-3);
}

.queue-timeline {
    margin-bottom: 24px;
}

.queue-section-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 12px 0;
    padding-left: 12px;
}

.queue-section-divider {
    height: 1px;
    background: var(--border-0);
    margin: 20px 0;
}

.queue-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-0);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: all var(--duration) var(--ease-out);
    align-items: flex-start;
}

.queue-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-1);
}

.queue-item.today {
    border-left-color: var(--accent);
    background: var(--accent-bg);
}

.queue-item.this-week {
    border-left-color: var(--blue);
    background: var(--blue-bg);
}

.queue-item.urgent {
    border-left-color: var(--red);
    background: var(--red-bg);
}

.queue-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    cursor: grab;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    transition: all var(--duration);
}

.queue-drag-handle:hover {
    background: var(--bg-2);
    color: var(--text-1);
}

.queue-item-content {
    flex: 1;
}

.queue-item-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 8px;
    word-break: break-word;
}

.queue-item-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.queue-pillar-tag {
    font-size: var(--fs-xs);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
    white-space: nowrap;
}

.queue-date-badge {
    font-size: var(--fs-xs);
    color: var(--text-2);
    padding: 4px 8px;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.queue-status-badge {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queue-status-badge[data-status="in_progress"] {
    background: var(--accent-bg);
    color: var(--accent);
}

.queue-status-badge[data-status="planned"] {
    background: var(--blue-bg);
    color: var(--blue);
}

.queue-status-badge[data-status="fresh"] {
    background: var(--sage-bg);
    color: var(--sage);
}

.queue-status-badge[data-status="posted"] {
    background: var(--purple-bg);
    color: var(--purple);
}

.queue-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.queue-item-actions .icon-btn {
    padding: 6px;
    color: var(--text-2);
    transition: all var(--duration);
}

.queue-item-actions .icon-btn:hover:not(:disabled) {
    color: var(--text-0);
    background: var(--bg-2);
}

.queue-item-actions .icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.queue-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    background: var(--bg-1);
    border: 2px dashed var(--border-0);
    border-radius: var(--radius);
}

.queue-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.queue-empty-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 8px;
}

.queue-empty-desc {
    font-size: var(--fs-md);
    color: var(--text-2);
    margin-bottom: 24px;
    max-width: 300px;
}

.queue-footer {
    display: flex;
    justify-content: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-0);
}

/* === ONBOARDING === */
.onboarding-overlay { position: fixed; inset: 0; z-index: 500; pointer-events: auto; }
.onboarding-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.onboarding-spotlight { /* cutout */ }
.onboarding-tooltip {
    position: absolute; background: var(--bg-1); border-radius: var(--radius-lg);
    padding: 20px; box-shadow: var(--shadow-xl); max-width: 320px; z-index: 501;
    animation: tooltipIn var(--duration-slow) var(--ease-spring);
}
.onboarding-tooltip-text { font-size: var(--fs-sm); line-height: 1.6; color: var(--text-1); margin-bottom: 16px; }
.onboarding-step-counter { font-size: var(--fs-xs); color: var(--text-3); }
.onboarding-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* === INSIGHTS === */
.insights-grid { display: grid; gap: 12px; }
.insight-card {
    padding: 14px; background: var(--bg-1); border: 1px solid var(--border-0);
    border-radius: var(--radius); cursor: pointer; transition: all var(--duration);
    display: flex; gap: 12px; align-items: flex-start;
}
.insight-card:hover { transform: translateX(4px); border-color: var(--accent-border); }
.insight-priority-high { border-left: 3px solid var(--accent); }
.insight-priority-medium { border-left: 3px solid var(--blue); }
.insight-priority-low { border-left: 3px solid var(--border-0); }

/* === PLATFORM EXPORT === */
.export-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border-0); padding-bottom: 8px; }
.export-tab { padding: 8px 16px; cursor: pointer; font-size: var(--fs-sm); border-radius: var(--radius) var(--radius) 0 0; transition: all var(--duration); }
.export-tab.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.export-content {
    background: var(--bg-2); border-radius: var(--radius);
    padding: 16px; font-family: var(--font-sans); font-size: var(--fs-sm);
    white-space: pre-wrap; line-height: 1.6; max-height: 300px; overflow-y: auto;
}
.export-copy-btn { margin-top: 12px; }

/* ============================================================
   FEATURE 1: AI CONTENT COPILOT (Chat Sidebar)
   ============================================================ */
.copilot-toggle {
    position: fixed; bottom: 24px; right: 24px; z-index: 200;
    width: 56px; height: 56px; border-radius: var(--radius-full);
    background: var(--accent-gradient); color: white; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow);
    transition: transform var(--duration) var(--ease-spring), box-shadow var(--duration);
}
.copilot-toggle:hover { transform: scale(1.08); box-shadow: var(--shadow-xl), 0 0 30px var(--accent-glow); }
.copilot-toggle svg { width: 24px; height: 24px; }
.copilot-toggle .copilot-badge {
    position: absolute; top: -2px; right: -2px; width: 14px; height: 14px;
    background: var(--coral); border-radius: 50%; border: 2px solid var(--bg-1);
    display: none;
}

.copilot-panel {
    position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; z-index: 300;
    background: var(--bg-1); border-left: 1px solid var(--border-0);
    display: flex; flex-direction: column;
    transition: right var(--duration-slow) var(--ease-out);
    box-shadow: -8px 0 30px rgba(0,0,0,0.1);
}
.copilot-panel.open { right: 0; }
.copilot-backdrop {
    position: fixed; inset: 0; z-index: 299; background: rgba(0,0,0,0.3);
    opacity: 0; pointer-events: none; transition: opacity var(--duration);
}
.copilot-backdrop.active { opacity: 1; pointer-events: auto; }

.copilot-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border-0);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-glass); backdrop-filter: blur(20px);
}
.copilot-header-left { display: flex; align-items: center; gap: 10px; }
.copilot-header-title { font-weight: 600; font-size: var(--fs-md); color: var(--text-0); }
.copilot-header-tag {
    font-size: var(--fs-xs); background: var(--accent-bg); color: var(--accent);
    padding: 2px 8px; border-radius: var(--radius-full); font-weight: 500;
}
.copilot-close {
    width: 32px; height: 32px; border-radius: var(--radius-sm); border: none;
    background: transparent; cursor: pointer; color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--duration-fast);
}
.copilot-close:hover { background: var(--bg-2); }

.copilot-actions {
    padding: 12px 20px; border-bottom: 1px solid var(--border-0);
    display: flex; gap: 6px; flex-wrap: wrap;
}
.copilot-action-btn {
    padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--border-0);
    background: var(--bg-1); cursor: pointer; font-size: var(--fs-xs); color: var(--text-2);
    transition: all var(--duration-fast); white-space: nowrap;
}
.copilot-action-btn:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }

.copilot-messages {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    display: flex; flex-direction: column; gap: 16px;
    scroll-behavior: smooth;
}
.copilot-msg {
    display: flex; gap: 10px; max-width: 95%;
    animation: copilotFadeIn 0.3s var(--ease-out);
}
@keyframes copilotFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.copilot-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.copilot-msg-avatar {
    width: 28px; height: 28px; border-radius: var(--radius-full); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-xs); font-weight: 600;
}
.copilot-msg.assistant .copilot-msg-avatar { background: var(--accent-bg); color: var(--accent); }
.copilot-msg.user .copilot-msg-avatar { background: var(--sage-bg); color: var(--sage); }
.copilot-msg-body {
    padding: 10px 14px; border-radius: var(--radius); font-size: var(--fs-sm); line-height: 1.6;
}
.copilot-msg.assistant .copilot-msg-body {
    background: var(--bg-2); color: var(--text-1);
}
.copilot-msg.user .copilot-msg-body {
    background: var(--accent); color: white;
}
.copilot-msg-body p { margin: 0 0 8px; }
.copilot-msg-body p:last-child { margin: 0; }
.copilot-msg-body strong { font-weight: 600; }
.copilot-msg-body ul, .copilot-msg-body ol { margin: 4px 0; padding-left: 18px; }
.copilot-msg-body li { margin: 2px 0; }
.copilot-msg-body code {
    background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px;
    font-family: 'SF Mono', monospace; font-size: 0.85em;
}
.copilot-typing {
    display: flex; gap: 4px; padding: 12px 14px; align-items: center;
}
.copilot-typing-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-3);
    animation: copilotBounce 1.4s infinite;
}
.copilot-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.copilot-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes copilotBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

.copilot-input-area {
    padding: 12px 16px; border-top: 1px solid var(--border-0);
    display: flex; gap: 8px; align-items: flex-end;
    background: var(--bg-glass); backdrop-filter: blur(20px);
}
.copilot-input {
    flex: 1; padding: 10px 14px; border: 1px solid var(--border-0); border-radius: var(--radius);
    background: var(--bg-0); color: var(--text-0); font-size: var(--fs-sm); font-family: var(--font-sans);
    resize: none; max-height: 120px; min-height: 40px; line-height: 1.5;
    transition: border-color var(--duration-fast);
}
.copilot-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-glow); }
.copilot-send {
    width: 40px; height: 40px; border-radius: var(--radius); border: none;
    background: var(--accent); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--duration-fast), transform var(--duration-fast);
    flex-shrink: 0;
}
.copilot-send:hover { background: var(--accent-dark); }
.copilot-send:active { transform: scale(0.95); }
.copilot-send:disabled { opacity: 0.5; cursor: not-allowed; }

.copilot-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; color: var(--text-3); padding: 40px 20px; text-align: center;
}
.copilot-empty-icon { font-size: 48px; opacity: 0.3; }
.copilot-empty h3 { font-size: var(--fs-md); color: var(--text-2); margin: 0; }
.copilot-empty p { font-size: var(--fs-sm); margin: 0; }

.copilot-context-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: var(--radius-full);
    background: var(--purple-bg); color: var(--purple); font-size: var(--fs-xs);
    margin-bottom: 8px;
}

/* ============================================================
   FEATURE 2: PERFORMANCE FEEDBACK LOOP
   ============================================================ */
.perf-feedback-bar {
    display: flex; gap: 8px; padding: 12px 16px; background: var(--bg-0);
    border-radius: var(--radius); border: 1px solid var(--border-0); margin-top: 12px;
}
.perf-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-0);
    background: var(--bg-1); cursor: pointer; font-size: var(--fs-sm); color: var(--text-2);
    transition: all var(--duration-fast);
}
.perf-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.perf-btn.fire { border-color: transparent; }
.perf-btn.fire:hover, .perf-btn.fire.active { background: rgba(255,149,0,0.12); color: #FF9500; border-color: rgba(255,149,0,0.3); }
.perf-btn.meh:hover, .perf-btn.meh.active { background: var(--warning-bg); color: var(--warning-dark); border-color: rgba(245,158,11,0.3); }
.perf-btn.flop:hover, .perf-btn.flop.active { background: var(--red-bg); color: var(--red); border-color: rgba(255,59,48,0.3); }

.perf-metrics {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-top: 10px; padding: 12px; background: var(--bg-0); border-radius: var(--radius);
}
.perf-metric-input {
    display: flex; flex-direction: column; gap: 4px;
}
.perf-metric-input label {
    font-size: var(--fs-xs); color: var(--text-3); font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.perf-metric-input input {
    padding: 8px; border: 1px solid var(--border-0); border-radius: var(--radius-sm);
    background: var(--bg-1); color: var(--text-0); font-size: var(--fs-sm);
    text-align: center; width: 100%;
}
.perf-score-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
    border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 600;
}
.perf-score-badge.fire { background: rgba(255,149,0,0.12); color: #FF9500; }
.perf-score-badge.meh { background: var(--warning-bg); color: var(--warning-dark); }
.perf-score-badge.flop { background: var(--red-bg); color: var(--red); }

.perf-digest-card {
    padding: 16px; background: var(--bg-0); border-radius: var(--radius);
    border: 1px solid var(--border-0); margin-top: 12px;
}
.perf-pattern { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.perf-pattern-icon { font-size: 20px; }
.perf-pattern-text { font-size: var(--fs-sm); color: var(--text-1); }

/* ============================================================
   FEATURE 3: TRENDING TOPIC INJECTION
   ============================================================ */
.trending-panel {
    padding: 16px; background: var(--bg-0); border-radius: var(--radius);
    border: 1px solid var(--border-0);
}
.trending-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.trending-header h3 { font-size: var(--fs-md); margin: 0; }
.trending-refresh {
    padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--border-0);
    background: transparent; cursor: pointer; font-size: var(--fs-xs); color: var(--text-2);
    transition: all var(--duration-fast);
}
.trending-refresh:hover { background: var(--accent-bg); color: var(--accent); }
.trending-item {
    padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-0);
    background: var(--bg-1); margin-bottom: 8px; cursor: pointer;
    transition: all var(--duration-fast);
}
.trending-item:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.trending-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.trending-item-tag {
    padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--fs-xs);
    font-weight: 500;
}
.trending-item-tag.hot { background: rgba(255,149,0,0.12); color: #FF9500; }
.trending-item-tag.rising { background: var(--sage-bg); color: var(--sage); }
.trending-item-tag.steady { background: var(--blue-bg); color: var(--blue); }
.trending-item-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); }
.trending-item-desc { font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; }
.trending-item-actions { display: flex; gap: 6px; margin-top: 8px; }
.trending-use-btn {
    padding: 4px 10px; border-radius: var(--radius-full); border: 1px solid var(--accent-border);
    background: var(--accent-bg); color: var(--accent); font-size: var(--fs-xs); cursor: pointer;
    transition: all var(--duration-fast);
}
.trending-use-btn:hover { background: var(--accent); color: white; }

/* ============================================================
   FEATURE 4: PUBLISHING & SCHEDULING
   ============================================================ */
.publish-queue {
    display: flex; flex-direction: column; gap: 8px;
}
.publish-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: var(--bg-1); border-radius: var(--radius); border: 1px solid var(--border-0);
    transition: all var(--duration-fast);
}
.publish-item:hover { box-shadow: var(--shadow-sm); }
.publish-time {
    min-width: 64px; text-align: center;
}
.publish-time-hour { font-size: var(--fs-md); font-weight: 600; color: var(--text-0); }
.publish-time-label { font-size: var(--fs-xs); color: var(--text-3); }
.publish-item-content { flex: 1; }
.publish-item-title { font-size: var(--fs-sm); font-weight: 500; color: var(--text-0); }
.publish-item-meta { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; }
.publish-item-actions { display: flex; gap: 6px; }
.publish-deeplink {
    padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--border-0);
    background: transparent; cursor: pointer; font-size: var(--fs-xs);
    display: flex; align-items: center; gap: 4px; color: var(--text-2);
    transition: all var(--duration-fast);
}
.publish-deeplink:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }

.schedule-picker {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}
.schedule-picker label { font-size: var(--fs-sm); color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.schedule-picker input, .schedule-picker select {
    padding: 8px 12px; border: 1px solid var(--border-0); border-radius: var(--radius-sm);
    background: var(--bg-1); color: var(--text-0); font-size: var(--fs-sm);
}

/* ============================================================
   WELCOME EXPERIENCE & GETTING STARTED
   ============================================================ */

/* Welcome overlay */
.welcome-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.4s var(--ease-out);
    padding: 20px; pointer-events: none;
}
.welcome-overlay.active { opacity: 1; pointer-events: auto; }
.welcome-modal {
    background: var(--bg-1); border-radius: var(--radius-xl);
    max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
    padding: 0; position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.1);
    transform: translateY(20px) scale(0.96); transition: transform 0.4s var(--ease-out);
}
.welcome-overlay.active .welcome-modal { transform: translateY(0) scale(1); }
.welcome-header {
    text-align: center; padding: 40px 36px 24px;
    background: linear-gradient(180deg, var(--accent-bg) 0%, transparent 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.welcome-icon { margin-bottom: 16px; }
.welcome-icon svg { filter: drop-shadow(0 2px 8px rgba(0,122,255,0.3)); }
.welcome-title {
    font-size: 22px; font-weight: 700; color: var(--text-0); margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.welcome-sub {
    font-size: var(--fs-sm); color: var(--text-2); margin: 0; line-height: 1.5;
}
.welcome-stats {
    display: flex; gap: 8px; padding: 0 36px; margin-bottom: 24px;
}
.welcome-stat {
    flex: 1; text-align: center; padding: 14px 10px;
    background: var(--bg-0); border: 1px solid var(--border-0);
    border-radius: var(--radius);
}
.welcome-stat-num {
    font-size: 24px; font-weight: 700; color: var(--accent);
    line-height: 1;
}
.welcome-stat-label {
    font-size: var(--fs-xs); color: var(--text-3); margin-top: 4px;
    font-weight: 500; letter-spacing: 0.02em;
}
.welcome-steps { padding: 0 36px; margin-bottom: 24px; }
.welcome-steps-title {
    font-size: var(--fs-xs); font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 12px;
}
.welcome-step {
    display: flex; gap: 14px; padding: 10px 0;
    border-bottom: 1px solid var(--bg-2);
}
.welcome-step:last-child { border-bottom: none; }
.welcome-step-num {
    width: 26px; height: 26px; border-radius: var(--radius-full);
    background: var(--accent); color: #fff; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0; margin-top: 1px;
}
.welcome-step-body { flex: 1; }
.welcome-step-title {
    font-size: var(--fs-sm); font-weight: 600; color: var(--text-0);
}
.welcome-step-desc {
    font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px;
    line-height: 1.4;
}
.welcome-actions {
    text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: 8px; padding: 0 36px 32px;
}
.welcome-start-btn { min-width: 200px; }

/* Getting Started Checklist */
.gs-card {
    border: 1px solid var(--border-0);
    background: var(--bg-1);
    margin-bottom: 20px;
    padding: 16px;
    border-radius: var(--radius);
}
.gs-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px;
}
.gs-header-left { display: flex; align-items: center; gap: 8px; }
.gs-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); }
.gs-counter {
    font-size: var(--fs-xs); font-weight: 600; color: var(--accent);
    background: var(--accent-bg); padding: 2px 8px; border-radius: 10px;
}
.gs-dismiss {
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--text-3); border-radius: var(--radius-sm);
    transition: all var(--duration-fast);
}
.gs-dismiss:hover { background: var(--bg-2); color: var(--text-1); }
.gs-progress-bar {
    height: 3px; background: var(--bg-2); border-radius: 2px;
    margin-bottom: 12px; overflow: hidden;
}
.gs-progress-fill {
    height: 100%; background: var(--accent); border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}
.gs-items { display: flex; flex-direction: column; gap: 1px; }
.gs-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--duration-fast);
}
.gs-item:hover:not(.completed) { background: var(--bg-0); }
.gs-item.completed { opacity: 0.45; cursor: default; }
.gs-item.completed .gs-item-label { text-decoration: line-through; }
.gs-item-check {
    width: 22px; height: 22px; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
    border-radius: var(--radius-sm); background: var(--bg-0);
}
.gs-item.completed .gs-item-check { background: var(--sage-bg); }
.gs-item-body { flex: 1; min-width: 0; }
.gs-item-label {
    font-size: var(--fs-sm); font-weight: 500; color: var(--text-0);
}
.gs-item-desc {
    font-size: var(--fs-xs); color: var(--text-3); margin-top: 1px;
}

/* Context Tips */
.context-tip {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; margin-bottom: 16px;
    background: var(--bg-0);
    border: 1px solid var(--border-0);
    border-radius: var(--radius);
    transition: all 0.3s ease; overflow: hidden;
}
.context-tip-icon { flex-shrink: 0; }
.context-tip-body { flex: 1; }
.context-tip-text {
    font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5;
}
.context-tip-close {
    flex-shrink: 0; background: none; border: none;
    color: var(--text-3); padding: 4px 10px; border-radius: var(--radius-sm);
    font-size: var(--fs-xs); font-weight: 500; cursor: pointer;
    transition: all var(--duration-fast);
}
.context-tip-close:hover { background: var(--bg-2); color: var(--text-1); }

@media (max-width: 768px) {
    .welcome-header { padding: 28px 20px 20px; }
    .welcome-stats { padding: 0 20px; gap: 6px; }
    .welcome-stat { padding: 10px 8px; }
    .welcome-stat-num { font-size: 20px; }
    .welcome-steps { padding: 0 20px; }
    .welcome-actions { padding: 0 20px 24px; }
    .gs-card { margin: 0 0 16px; }
}

/* ============================================================
   FEATURE 5: TEAM & CLIENT MANAGEMENT
   ============================================================ */
.workspace-switcher {
    padding: 12px; background: var(--bg-0); border-radius: var(--radius);
    border: 1px solid var(--border-0); margin-bottom: 16px;
}
.workspace-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border-radius: var(--radius-sm); cursor: pointer; transition: background var(--duration-fast);
}
.workspace-item:hover { background: var(--bg-2); }
.workspace-item.active { background: var(--accent-bg); }
.workspace-avatar {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: var(--fs-sm);
}
.approval-flow {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.approval-step {
    display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-3);
}
.approval-step.current { color: var(--accent); font-weight: 600; }
.approval-step.done { color: var(--sage); }
.approval-connector { width: 20px; height: 1px; background: var(--border-0); }

.comment-thread { margin-top: 12px; }
.comment-item {
    display: flex; gap: 8px; padding: 8px 0;
    border-bottom: 1px solid var(--bg-2);
}
.comment-avatar {
    width: 24px; height: 24px; border-radius: 50%; background: var(--accent-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-xs); color: var(--accent); font-weight: 600; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-meta { font-size: var(--fs-xs); color: var(--text-3); }
.comment-text { font-size: var(--fs-sm); color: var(--text-1); margin-top: 2px; }
.comment-item:last-child { border-bottom: none; }
.workspace-switcher .btn { margin-top: 8px; }
.workspace-item + .workspace-item { margin-top: 2px; }
.approval-flow { flex-wrap: wrap; }

/* ============================================================
   FEATURE 6: COMPETITOR INTELLIGENCE
   ============================================================ */
.competitor-card {
    padding: 16px; background: var(--bg-1); border-radius: var(--radius);
    border: 1px solid var(--border-0); margin-bottom: 12px;
}
.competitor-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.competitor-avatar {
    width: 40px; height: 40px; border-radius: var(--radius-full);
    background: var(--purple-bg); display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-md); font-weight: 600; color: var(--purple);
}
.competitor-info { flex: 1; }
.competitor-name { font-weight: 600; font-size: var(--fs-sm); color: var(--text-0); }
.competitor-handle { font-size: var(--fs-xs); color: var(--text-3); }
.gap-analysis {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px;
}
.gap-item {
    padding: 10px; border-radius: var(--radius-sm); background: var(--bg-0);
    border: 1px solid var(--border-0);
}
.gap-item-label { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.gap-item-value { font-size: var(--fs-md); font-weight: 600; color: var(--text-0); margin-top: 4px; }
.diff-score {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg-0);
}
.diff-score-bar { flex: 1; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.diff-score-fill { height: 100%; border-radius: 3px; transition: width 0.6s var(--ease-out); }

/* ============================================================
   FEATURE 7: CONTENT REPURPOSING ENGINE
   ============================================================ */
.repurpose-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px;
}
@media (max-width: 768px) { .repurpose-grid { grid-template-columns: repeat(2, 1fr); } }
.repurpose-card {
    padding: 14px; border-radius: var(--radius); border: 1px solid var(--border-0);
    background: var(--bg-1); cursor: pointer; transition: all var(--duration-fast);
    position: relative; overflow: hidden;
}
.repurpose-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.repurpose-card.active { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.repurpose-card-platform {
    display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.repurpose-card-emoji { font-size: 20px; }
.repurpose-card-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); }
.repurpose-card-format { font-size: var(--fs-xs); color: var(--text-3); }
.repurpose-preview {
    padding: 12px; background: var(--bg-0); border-radius: var(--radius-sm);
    font-size: var(--fs-sm); line-height: 1.6; color: var(--text-1);
    max-height: 200px; overflow-y: auto; white-space: pre-wrap;
    margin-top: 10px;
}
.repurpose-actions { display: flex; gap: 6px; margin-top: 10px; }

/* ============================================================
   FEATURE 8: VISUAL CONTENT BRIEFS
   ============================================================ */
.visual-brief {
    padding: 16px; background: var(--bg-0); border-radius: var(--radius);
    border: 1px solid var(--border-0); margin-top: 12px;
}
.visual-brief-section { margin-bottom: 16px; }
.visual-brief-section:last-child { margin-bottom: 0; }
.visual-brief-label {
    font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-3); font-weight: 600; margin-bottom: 8px;
}
.thumbnail-concepts {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.thumbnail-concept {
    padding: 12px; background: var(--bg-1); border-radius: var(--radius-sm);
    border: 1px solid var(--border-0);
}
.thumbnail-concept-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); margin-bottom: 4px; }
.thumbnail-concept-desc { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }
.broll-list { display: flex; flex-direction: column; gap: 6px; }
.broll-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: var(--bg-1); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--text-1);
}
.broll-item-num {
    width: 22px; height: 22px; border-radius: 50%; background: var(--accent-bg);
    color: var(--accent); font-size: var(--fs-xs); font-weight: 600;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.color-palette {
    display: flex; gap: 8px; margin-top: 8px;
}
.color-swatch {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    border: 2px solid var(--bg-1); box-shadow: var(--shadow-xs);
    position: relative; cursor: pointer;
}
.color-swatch-label {
    position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
    font-size: 9px; color: var(--text-3); white-space: nowrap;
}
.mood-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mood-tag {
    padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--fs-xs);
    background: var(--purple-bg); color: var(--purple); font-weight: 500;
}

/* ============================================================
   FEATURE 9: CONTENT SCORING & OPTIMIZATION
   ============================================================ */
.content-score {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: var(--bg-0); border-radius: var(--radius); margin-top: 12px;
}
.score-ring {
    position: relative; width: 56px; height: 56px; flex-shrink: 0;
}
.score-ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.score-ring .ring-bg { stroke: var(--bg-3); }
.score-ring .ring-fill { transition: stroke-dashoffset 0.8s var(--ease-out); }
.score-ring-value {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-md); font-weight: 700; color: var(--text-0);
}
.score-details { flex: 1; }
.score-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); }
.score-breakdown { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.score-item {
    display: flex; align-items: center; justify-content: space-between;
    font-size: var(--fs-xs); color: var(--text-2);
}
.score-item-bar { width: 60px; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.score-item-fill { height: 100%; border-radius: 2px; }
.score-item-fill.high { background: var(--sage); }
.score-item-fill.medium { background: var(--warning); }
.score-item-fill.low { background: var(--coral); }

.optimization-suggestions {
    margin-top: 10px; display: flex; flex-direction: column; gap: 6px;
}
.opt-suggestion {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px;
    background: var(--bg-1); border-radius: var(--radius-sm); border: 1px solid var(--border-0);
    font-size: var(--fs-xs); color: var(--text-1); line-height: 1.5;
}
.opt-suggestion-icon { flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   FEATURE 10: ADVANCED ANALYTICS
   ============================================================ */
.analytics-mega-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
}
@media (max-width: 1024px) { .analytics-mega-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .analytics-mega-grid { grid-template-columns: 1fr; } }
.analytics-mega-card {
    padding: 16px; background: var(--bg-1); border-radius: var(--radius);
    border: 1px solid var(--border-0);
}
.analytics-mega-card-label { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.analytics-mega-card-value { font-size: var(--fs-2xl); font-weight: 700; color: var(--text-0); margin-top: 4px; }
.analytics-mega-card-trend {
    font-size: var(--fs-xs); margin-top: 4px; display: flex; align-items: center; gap: 4px;
}
.analytics-mega-card-trend.up { color: var(--sage); }
.analytics-mega-card-trend.down { color: var(--coral); }
.analytics-mega-card-trend.flat { color: var(--text-3); }

.weekly-report {
    padding: 20px; background: var(--bg-1); border-radius: var(--radius);
    border: 1px solid var(--border-0); margin-top: 16px;
}
.weekly-report-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.weekly-report h3 { font-size: var(--fs-lg); margin: 0; }
.weekly-report-section { margin-bottom: 16px; }
.weekly-report-section h4 { font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 8px; }
.growth-projection {
    padding: 16px; background: var(--bg-0); border-radius: var(--radius);
    border: 1px solid var(--border-0);
}
.projection-bar-container {
    display: flex; align-items: center; gap: 12px; margin: 8px 0;
}
.projection-label { font-size: var(--fs-xs); color: var(--text-3); min-width: 60px; }
.projection-bar { flex: 1; height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.projection-fill { height: 100%; border-radius: 4px; background: var(--accent-gradient); transition: width 0.8s var(--ease-out); }
.projection-value { font-size: var(--fs-xs); font-weight: 600; color: var(--text-0); min-width: 40px; text-align: right; }

.pillar-roi-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px;
}
@media (max-width: 600px) { .pillar-roi-grid { grid-template-columns: 1fr; } }
.pillar-roi-card {
    padding: 12px; background: var(--bg-0); border-radius: var(--radius-sm);
    border: 1px solid var(--border-0);
}
.pillar-roi-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); }
.pillar-roi-stats { display: flex; gap: 12px; margin-top: 6px; }
.pillar-roi-stat { font-size: var(--fs-xs); color: var(--text-2); }
.pillar-roi-stat strong { color: var(--text-0); }

/* Copilot responsive */
@media (max-width: 768px) {
    .copilot-panel { width: 100%; right: -100%; }
    .copilot-toggle { bottom: 80px; right: 16px; width: 48px; height: 48px; }
}

/* === PRINT === */
@media print {
    .sidebar, .mobile-nav, .toast-container, .cmd-palette-overlay,
    .mobile-menu-toggle, .sidebar-backdrop, .modal-overlay, .btn,
    .drawer, .scroll-progress, .skip-link { display: none !important; }
    .app { padding: 0 !important; margin-left: 0 !important; }
    .view { max-width: 100%; padding: 0; }
    body { font-size: 12px; background: white !important; color: black !important; }
    * { box-shadow: none !important; }
    .card, .stat-card, .analytics-card, .kanban-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ccc !important;
    }
    a { color: black !important; text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 10px; color: #666; }
    a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }
    h1, h2, h3 { page-break-after: avoid; }
    p, li { orphans: 2; widows: 2; }
}

/* ============================================================
   MEGA UPDATE: Discovery 2.0 + 8 New Features Styles
   ============================================================ */

/* === BRAND CATEGORY FORK (Creator vs Business) === */
.brand-category-card {
    min-height: 100px;
    text-align: center;
    transition: all 0.25s var(--ease-out);
}
.brand-category-card .icon { font-size: 32px; margin-bottom: 4px; }
.brand-category-card .title { font-size: var(--fs-lg); }
.brand-category-card.selected {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
#brandTypeGroup {
    animation: phaseIn 0.35s ease-out;
}

/* === NICHE DEEP-DIVE QUESTIONS === */
.niche-questions-container { display: flex; flex-direction: column; gap: 16px; }
.niche-question-group { animation: fadeIn 0.3s ease; }
.niche-question-group label { font-weight: 600; font-size: var(--fs-sm); color: var(--text-0); margin-bottom: 6px; display: block; }

/* === PERSONALITY TRAIT CHIPS === */
.personality-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.personality-chip {
    padding: 6px 14px; border-radius: 20px; font-size: var(--fs-sm);
    border: 1px solid var(--border-1); background: var(--bg-0); color: var(--text-1);
    cursor: pointer; transition: all 0.2s; user-select: none;
}
.personality-chip:hover { border-color: var(--accent); color: var(--accent); }
.personality-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === DAY-OF-WEEK PICKER === */
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip {
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 600;
    border: 2px solid var(--border-1); background: var(--bg-0); color: var(--text-2);
    cursor: pointer; transition: all 0.2s;
}
.day-chip:hover { border-color: var(--accent); }
.day-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === AUDIENCE SELECTOR CHIPS === */
.audience-chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.audience-chip {
    padding: 6px 12px; border-radius: var(--radius-sm); font-size: var(--fs-xs);
    border: 1px solid var(--border-1); background: var(--bg-1); color: var(--text-1);
    cursor: pointer; transition: all 0.2s;
}
.audience-chip:hover { border-color: var(--accent); background: var(--accent-light, rgba(0,122,255,0.08)); }
.audience-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === FRAMEWORK CARD (Idea Modal) === */
.framework-card {
    background: var(--bg-1); border-radius: var(--radius-sm); padding: 12px;
    border: 1px solid var(--border-0); margin-top: 8px;
}
.framework-card .framework-row { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; }
.framework-card .framework-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    min-width: 56px; color: var(--accent);
}
.framework-card .framework-value { font-size: var(--fs-sm); color: var(--text-1); }

/* === HASHTAG CHIPS === */
.hashtag-chip {
    display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px;
    background: var(--bg-2); color: var(--accent); margin: 2px; font-weight: 500;
}

/* === PERSONA VIEW (BUILD 3) === */
.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .persona-grid { grid-template-columns: 1fr; } }
.persona-card {
    background: var(--bg-0); border: 1px solid var(--border-0); border-radius: var(--radius-md);
    padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.persona-avatar { font-size: 40px; text-align: center; }
.persona-name { font-size: var(--fs-lg); font-weight: 700; color: var(--text-0); text-align: center; margin: 0; }
.persona-occupation { font-size: var(--fs-sm); color: var(--accent); text-align: center; font-weight: 500; }
.persona-bio { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.persona-section { margin-top: 8px; }
.persona-section strong { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); }
.persona-section ul { padding-left: 16px; margin: 4px 0 0; }
.persona-section li { font-size: var(--fs-sm); color: var(--text-1); margin: 2px 0; }
.persona-section p { font-size: var(--fs-sm); color: var(--text-1); margin: 4px 0 0; }
.persona-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.persona-tag {
    padding: 3px 10px; border-radius: 12px; font-size: 11px;
    background: var(--accent-light, rgba(0,122,255,0.08)); color: var(--accent); font-weight: 500;
}

/* === SERIES VIEW (BUILD 4) === */
.series-setup { max-width: 600px; margin: 24px auto; }
.series-thread {
    background: var(--bg-1); padding: 12px 16px; border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent); font-size: var(--fs-sm); color: var(--text-1); margin: 16px 0;
}
.series-timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 24px; margin-top: 16px; }
.series-timeline::before {
    content: ''; position: absolute; left: 11px; top: 0; bottom: 0;
    width: 2px; background: var(--border-1);
}
.series-part-card {
    background: var(--bg-0); border: 1px solid var(--border-0); border-radius: var(--radius-md);
    padding: 16px; margin-bottom: 16px; position: relative;
}
.series-part-card::before {
    content: ''; position: absolute; left: -19px; top: 20px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-0);
}
.series-part-num {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--accent); margin-bottom: 4px;
}
.series-part-card h3 { font-size: var(--fs-md); color: var(--text-0); margin: 0 0 8px; }
.series-hook {
    font-style: italic; color: var(--text-2); font-size: var(--fs-sm); margin-bottom: 8px;
    padding-left: 12px; border-left: 2px solid var(--accent);
}
.series-part-card p { font-size: var(--fs-sm); color: var(--text-1); margin: 0; line-height: 1.5; }
.series-format {
    display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px;
    background: var(--bg-2); color: var(--text-2); margin-top: 8px; text-transform: uppercase;
}
.series-teaser {
    font-size: var(--fs-xs); color: var(--accent); margin-top: 8px; font-weight: 500;
}

/* === CAPTION PRO (BUILD 5) === */
.caption-pro-tabs { display: flex; flex-direction: column; gap: 12px; }
.caption-pro-card {
    background: var(--bg-1); border-radius: var(--radius-sm); padding: 14px;
    border: 1px solid var(--border-0);
}
.caption-pro-type {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--accent); margin-bottom: 6px;
}
.caption-pro-text {
    font-size: var(--fs-sm); color: var(--text-0); line-height: 1.6; cursor: pointer;
    padding: 8px; border-radius: var(--radius-sm); transition: background 0.2s;
}
.caption-pro-text:hover { background: var(--bg-2); }
.caption-pro-meta { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.caption-pro-hashtags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* === BRAND KIT (BUILD 6) === */
.brandkit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 768px) { .brandkit-grid { grid-template-columns: 1fr; } }
.brandkit-section {
    background: var(--bg-0); border: 1px solid var(--border-0); border-radius: var(--radius-md);
    padding: 20px;
}
.brandkit-section h3 {
    font-size: var(--fs-md); color: var(--text-0); margin: 0 0 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border-0);
}
.brandkit-item { margin: 10px 0; }
.brandkit-item strong { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); }
.brandkit-item p { font-size: var(--fs-sm); color: var(--text-1); margin: 4px 0 0; line-height: 1.5; }
.color-swatches { display: flex; gap: 10px; margin: 10px 0; }
.color-swatch {
    width: 72px; height: 72px; border-radius: var(--radius-md); display: flex;
    align-items: flex-end; justify-content: center; padding-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.color-swatch span { font-size: 10px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.brandkit-dos-donts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .brandkit-dos-donts { grid-template-columns: 1fr; } }
.brandkit-dos-donts ul { padding-left: 16px; margin: 6px 0; }
.brandkit-dos-donts li { font-size: var(--fs-sm); color: var(--text-1); margin: 3px 0; }
.bio-template {
    font-size: var(--fs-sm); color: var(--text-1); background: var(--bg-1); padding: 8px;
    border-radius: var(--radius-sm); cursor: pointer; margin-top: 4px; transition: background 0.2s;
}
.bio-template:hover { background: var(--bg-2); }

/* === ENGAGEMENT PROMPTS (BUILD 7) === */
.engagement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.engagement-card {
    background: var(--bg-0); border: 1px solid var(--border-0); border-radius: var(--radius-md);
    padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.engagement-type-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600; background: var(--bg-2); color: var(--accent);
    align-self: flex-start;
}
.engagement-card h3 { font-size: var(--fs-md); color: var(--text-0); margin: 0; }
.engagement-card p { font-size: var(--fs-sm); color: var(--text-1); margin: 0; line-height: 1.5; }
.engagement-options { display: flex; flex-direction: column; gap: 4px; }
.engagement-option {
    padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg-1);
    font-size: var(--fs-sm); color: var(--text-1); border: 1px solid var(--border-0);
}
.engagement-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; }

/* === STORYBOARD (BUILD 8) === */
.storyboard-timeline { display: flex; flex-direction: column; gap: 0; }
.storyboard-scene {
    display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-0);
}
.storyboard-scene:last-child { border-bottom: none; }
.scene-timing {
    min-width: 60px; font-size: 11px; font-weight: 700; color: var(--accent);
    font-variant-numeric: tabular-nums; padding-top: 2px;
}
.scene-body { flex: 1; }
.scene-description { font-size: var(--fs-sm); color: var(--text-0); line-height: 1.5; }
.scene-meta { display: flex; gap: 6px; margin-top: 4px; }
.scene-tag {
    padding: 2px 8px; border-radius: 8px; font-size: 10px; background: var(--bg-2);
    color: var(--text-2); text-transform: capitalize;
}
.scene-overlay, .scene-script, .scene-audio {
    font-size: 11px; color: var(--text-2); margin-top: 4px; font-style: italic;
}

/* === CALENDAR WEEK VIEW (BUILD 9) === */
.calendar-week-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
    background: var(--border-0); border: 1px solid var(--border-0); border-radius: var(--radius-md);
    overflow: hidden; min-height: 400px;
}
.week-day-col {
    background: var(--bg-0); display: flex; flex-direction: column;
    min-height: 360px; transition: background 0.15s;
}
.week-day-col.today { background: var(--accent-light, rgba(0,122,255,0.04)); }
.week-day-col.drag-over { background: var(--accent-light, rgba(0,122,255,0.1)); }
.week-day-header {
    padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border-0);
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.week-day-name { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-3); }
.week-day-num { font-size: 16px; font-weight: 700; color: var(--text-0); }
.week-day-num.today-num {
    background: var(--accent); color: #fff; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.week-day-events { padding: 6px; flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.week-event {
    padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.week-event:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.week-event-format { font-size: 10px; font-weight: 600; }
.week-event-title { font-size: 11px; font-weight: 500; color: var(--text-0); margin-top: 2px; line-height: 1.3; }
.week-event-pillar { font-size: 9px; font-weight: 600; text-transform: uppercase; margin-top: 3px; }
.week-empty-slot {
    padding: 8px; text-align: center; font-size: 11px; color: var(--text-3);
    cursor: pointer; border: 1px dashed var(--border-1); border-radius: var(--radius-sm);
    margin-top: auto; transition: border-color 0.2s;
}
.week-empty-slot:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 768px) {
    .calendar-week-grid { grid-template-columns: repeat(2, 1fr); }
    .week-day-col { min-height: 160px; }
}

/* Calendar drag-to-reschedule */
.calendar-event[draggable="true"] { cursor: grab; }
.calendar-event[draggable="true"]:active { cursor: grabbing; opacity: 0.6; }
.cal-agenda-item[draggable="true"] { cursor: grab; }
.cal-agenda-item[draggable="true"]:active { cursor: grabbing; opacity: 0.6; }

/* Calendar pillar legend */
.cal-pillar-legend {
    display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 0; margin-top: 4px;
}
.cal-legend-item {
    display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2);
}
.cal-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Calendar content with week layout */
.cal-content-week { display: flex; gap: 16px; }
@media (max-width: 768px) { .cal-content-week { flex-direction: column; } }

/* Pro badge small (for inline feature badges) */
.pro-badge-sm {
    font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 6px;
    background: var(--bg-2); color: var(--text-3); margin-left: 4px; vertical-align: middle;
}

/* === CONTENT REMIX (BUILD 10) === */
.remix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.remix-card {
    background: var(--bg-1); border: 1px solid var(--border-0); border-radius: var(--radius-md);
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.remix-angle-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600; background: var(--bg-2); color: var(--text-0);
    align-self: flex-start;
}
.remix-card h4 { font-size: var(--fs-sm); font-weight: 600; color: var(--text-0); margin: 0; }
.remix-hooks { display: flex; flex-direction: column; gap: 3px; }
.remix-hook {
    font-size: 11px; color: var(--text-2); padding-left: 8px;
    border-left: 2px solid var(--accent);
}

/* === EMPTY STATES === */
.empty-state {
    text-align: center; padding: 48px 20px; color: var(--text-2);
}
.empty-state p { margin-bottom: 16px; }
.empty-state .btn { margin: 0 auto; }

/* ===================================================
   NEW FEATURE STYLES — Shared
   =================================================== */
.feature-view { padding: 0; }
.feature-header { margin-bottom: 24px; }
.feature-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-0); margin: 0 0 4px; }
.feature-header p { font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 16px; }
.feature-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.feature-card {
    background: var(--bg-1); border-radius: var(--radius); padding: var(--pad-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-0);
}
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.feature-empty {
    text-align: center; padding: 48px 20px; color: var(--text-2);
}
.feature-empty p { margin-bottom: 16px; }
.feature-spinner {
    display: flex; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-2);
    font-size: var(--fs-sm);
}
.feature-spinner::after {
    content: ''; width: 24px; height: 24px; border: 3px solid var(--bg-2);
    border-top-color: var(--accent); border-radius: 50%; animation: featureSpin .8s linear infinite; margin-left: 10px;
}
@keyframes featureSpin { to { transform: rotate(360deg); } }
/* Skeleton loading */
.feature-skeleton { padding: 20px 0; }
.skeleton-line {
    height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-0) 50%, var(--bg-2) 75%);
    background-size: 200% 100%; animation: skeleton-shimmer 1.5s ease-in-out infinite; margin-bottom: 12px;
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.feature-tag {
    display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: var(--fs-xs);
    background: var(--accent-bg); color: var(--accent); font-weight: 600;
}
.feature-section-title {
    font-size: var(--fs-base); font-weight: 700; color: var(--text-0); margin: 24px 0 12px;
}

/* === Feature: Voice Scorer === */
.score-gauges { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin: 20px 0; }
.score-gauge {
    width: 100px; text-align: center;
}
.score-gauge-ring {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 8px;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--bg-2) 0);
    display: flex; align-items: center; justify-content: center;
}
.score-gauge-inner {
    width: 60px; height: 60px; border-radius: 50%; background: var(--bg-1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700; color: var(--text-0);
}
.score-gauge-label { font-size: var(--fs-xs); color: var(--text-2); }
.overall-score {
    text-align: center; font-size: 2.5rem; font-weight: 800; color: var(--accent); margin: 16px 0;
}
.score-history-item {
    display: flex; justify-content: space-between; align-items: center; padding: 10px 0;
    border-bottom: 1px solid var(--border-0);
}
.score-history-item:last-child { border-bottom: none; }

/* === Feature: Writer === */
.writer-source-picker { display: flex; gap: 8px; margin-bottom: 12px; }
.writer-source-btn {
    padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-0);
    background: var(--bg-1); cursor: pointer; font-size: var(--fs-sm); transition: all .2s;
}
.writer-source-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.writer-format-selector { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.writer-format-btn {
    padding: 4px 12px; border-radius: 16px; border: 1px solid var(--border-0);
    background: var(--bg-1); cursor: pointer; font-size: var(--fs-xs); transition: all .2s;
}
.writer-format-btn.active { background: var(--text-0); color: #fff; border-color: var(--text-0); }
.writer-output {
    background: var(--bg-0); border-radius: var(--radius); padding: var(--pad-lg);
    white-space: pre-wrap; font-size: var(--fs-sm); line-height: 1.6;
    border: 1px solid var(--border-0); margin-top: 16px; position: relative;
}
.writer-output-actions {
    display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end;
}

/* === Feature: Recycler === */
.recycler-list { display: flex; flex-direction: column; gap: 12px; }
.recycler-idea {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; background: var(--bg-1); border-radius: var(--radius);
    border: 1px solid var(--border-0); cursor: pointer; transition: all .2s;
}
.recycler-idea:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.recycler-idea-text { flex: 1; font-size: var(--fs-sm); }
.recycler-idea-age { font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; margin-left: 12px; }
.recycler-variants { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.recycler-variant {
    padding: 16px; background: var(--bg-0); border-radius: var(--radius);
    border: 1px solid var(--border-0);
}
.recycler-variant-label { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); margin-bottom: 6px; }

/* === Feature: Repurposer === */
.repurpose-tab-group { display: flex; gap: 4px; border-bottom: 2px solid var(--border-0); margin-bottom: 16px; overflow-x: auto; }
.repurpose-tab {
    padding: 8px 16px; border: none; background: none; cursor: pointer; font-size: var(--fs-sm);
    color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap;
    transition: all .2s;
}
.repurpose-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.repurpose-output {
    background: var(--bg-0); border-radius: var(--radius); padding: var(--pad-lg);
    white-space: pre-wrap; font-size: var(--fs-sm); line-height: 1.6;
    border: 1px solid var(--border-0);
}
.repurpose-platform-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.repurpose-platform-check {
    display: flex; align-items: center; gap: 4px; padding: 4px 10px;
    border-radius: 16px; border: 1px solid var(--border-0); background: var(--bg-1);
    cursor: pointer; font-size: var(--fs-xs); transition: all .2s;
}
.repurpose-platform-check.checked { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === Feature: Smart Scheduler === */
.heatmap-grid {
    display: grid; grid-template-columns: 60px repeat(24, 1fr); gap: 2px;
    overflow-x: auto; margin: 16px 0;
}
.heatmap-cell {
    aspect-ratio: 1; border-radius: 4px; cursor: pointer; transition: all .15s;
    min-width: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 9px; color: transparent;
}
.heatmap-cell:hover { color: var(--text-0); transform: scale(1.2); z-index: 1; }
.heatmap-cell.active { outline: 2px solid var(--accent); outline-offset: -1px; }
.heatmap-label {
    display: flex; align-items: center; font-size: var(--fs-xs); color: var(--text-2);
    padding-right: 6px;
}
.heatmap-hour-labels { display: contents; }
.heatmap-hour-label {
    text-align: center; font-size: 9px; color: var(--text-2); padding-bottom: 4px;
}
.heatmap-legend {
    display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-2);
}
.heatmap-legend-swatch {
    width: 14px; height: 14px; border-radius: 3px;
}

/* === Feature: Audience Intel === */
.audience-intel-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.audience-intel-card {
    background: var(--bg-1); border-radius: var(--radius); padding: var(--pad-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-0);
}
.audience-intel-card h3 {
    font-size: var(--fs-base); font-weight: 700; color: var(--text-0); margin: 0 0 12px;
}
.audience-intel-card ul { list-style: none; padding: 0; margin: 0; }
.audience-intel-card li {
    font-size: var(--fs-sm); color: var(--text-2); padding: 4px 0;
    border-bottom: 1px solid var(--border-0);
}
.audience-intel-card li:last-child { border-bottom: none; }
.audience-intel-card .action-items {
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-0);
}
.audience-intel-card .action-items li { color: var(--accent); font-weight: 500; }

/* === Feature: Trend Radar === */
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.trend-card {
    background: var(--bg-1); border-radius: var(--radius); padding: var(--pad-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-0); transition: all .2s;
}
.trend-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.trend-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.trend-card-name { font-weight: 700; font-size: var(--fs-base); color: var(--text-0); }
.trend-fire { color: #f59e0b; letter-spacing: -2px; }
.trend-platforms { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0; }
.trend-platform-tag {
    font-size: var(--fs-xs); padding: 2px 8px; border-radius: 12px;
    background: var(--bg-2); color: var(--text-2);
}
.trend-angle { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; margin-top: 8px; }
.trend-cooldown { font-size: var(--fs-xs); color: var(--text-2); margin-left: 8px; }

/* === Feature: Collab Matchmaker === */
.collab-grid { display: flex; flex-direction: column; gap: 16px; }
.collab-card {
    background: var(--bg-1); border-radius: var(--radius); padding: var(--pad-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-0);
}
.collab-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.collab-type { font-weight: 700; color: var(--text-0); }
.collab-overlap {
    font-size: var(--fs-xs); padding: 2px 10px; border-radius: 12px;
    background: #dcfce7; color: #16a34a; font-weight: 600;
}
.collab-detail { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 8px; line-height: 1.5; }
.collab-outreach {
    background: var(--bg-0); border-radius: var(--radius-sm); padding: 12px;
    font-size: var(--fs-sm); color: var(--text-2); white-space: pre-wrap; line-height: 1.5;
    border: 1px solid var(--border-0); margin-top: 8px;
}
.collab-filter-group { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.collab-filter-btn {
    padding: 4px 12px; border-radius: 16px; border: 1px solid var(--border-0);
    background: var(--bg-1); cursor: pointer; font-size: var(--fs-xs); transition: all .2s;
}
.collab-filter-btn.active { background: var(--text-0); color: #fff; border-color: var(--text-0); }

/* === Feature: Revenue Tracker === */
.revenue-table {
    width: 100%; border-collapse: collapse; font-size: var(--fs-sm);
}
.revenue-table th {
    text-align: left; padding: 10px 12px; font-weight: 600; color: var(--text-2);
    border-bottom: 2px solid var(--border-0); font-size: var(--fs-xs); text-transform: uppercase;
    letter-spacing: 0.5px;
}
.revenue-table td {
    padding: 10px 12px; border-bottom: 1px solid var(--border-0); color: var(--text-0);
}
.revenue-table tr:last-child td { border-bottom: none; }
.revenue-amount { font-weight: 700; color: #16a34a; }
.revenue-source-badge {
    font-size: var(--fs-xs); padding: 2px 8px; border-radius: 12px;
    background: var(--bg-2); color: var(--text-2);
}
.revenue-total-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px; background: linear-gradient(135deg, #16a34a, #22c55e);
    border-radius: var(--radius); color: #fff; margin-bottom: 16px;
}
.revenue-total-bar .label { font-size: var(--fs-sm); opacity: 0.9; }
.revenue-total-bar .amount { font-size: 1.5rem; font-weight: 800; }
.revenue-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }
.revenue-insight-card {
    background: var(--bg-0); border-radius: var(--radius-sm); padding: 14px;
    border: 1px solid var(--border-0);
}
.revenue-insight-card h4 { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text-0); }
.revenue-insight-card p { margin: 0; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }

/* === Feature: Growth Simulator === */
.growth-inputs {
    display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; align-items: flex-end;
}
.growth-input-group { display: flex; flex-direction: column; gap: 4px; }
.growth-input-group label { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.growth-input-group input[type="number"],
.growth-input-group input[type="range"] {
    padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-0);
    font-size: var(--fs-sm); background: var(--bg-1); width: 120px;
}
.growth-chart-container {
    position: relative; width: 100%; height: 320px; background: var(--bg-1);
    border-radius: var(--radius); border: 1px solid var(--border-0); overflow: hidden;
}
.growth-chart-container canvas { width: 100% !important; height: 100% !important; }
.growth-legend {
    display: flex; gap: 20px; justify-content: center; margin-top: 12px; font-size: var(--fs-xs);
}
.growth-legend-item { display: flex; align-items: center; gap: 6px; }
.growth-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.growth-accelerators { margin-top: 20px; }
.growth-accelerator {
    display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-0);
    font-size: var(--fs-sm); color: var(--text-2);
}
.growth-accelerator:last-child { border-bottom: none; }
.growth-accelerator-num {
    width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-xs); font-weight: 700; flex-shrink: 0;
}

/* Feature view fade-in */
.feature-view { animation: featureFadeIn .3s ease; }
@keyframes featureFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Revenue modal */
.revenue-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9999;
    display: flex; align-items: center; justify-content: center; animation: featureFadeIn .2s;
}
.revenue-modal {
    background: var(--bg-1); border-radius: var(--radius-lg); padding: var(--pad-xl);
    width: 90%; max-width: 480px; box-shadow: var(--shadow-lg);
}
.revenue-modal h3 { margin: 0 0 16px; font-size: 1.1rem; }
.revenue-modal .form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.revenue-modal .form-row label { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.revenue-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 768px) {
    .feature-grid { grid-template-columns: 1fr; }
    .audience-intel-sections { grid-template-columns: 1fr; }
    .trend-grid { grid-template-columns: 1fr; }
    .heatmap-grid { font-size: 8px; }
    .growth-inputs { flex-direction: column; }
    .revenue-table { font-size: var(--fs-xs); }
    .revenue-table th, .revenue-table td { padding: 8px 6px; }
    .score-gauges { gap: 10px; }
}
