:root {
    /* Base Palette - keeping it dark & premium but adding personality */
    --bg-body: #09090b; /* Zinc 950 */
    --bg-surface: #18181b; /* Zinc 900 */
    --bg-card: rgba(30, 30, 35, 0.7);
    --bg-card-hover: rgba(40, 40, 45, 0.9);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f4f4f5; /* Zinc 100 */
    --text-secondary: #a1a1aa; /* Zinc 400 */
    --text-tertiary: #52525b; /* Zinc 600 */
    
    /* Fun & Personal Accents */
    --accent-primary: #60a5fa; /* Blue 400 */
    --accent-pop: #f472b6; /* Pink 400 */
    --accent-lemon: #facc15; /* Yellow 400 */
    --accent-mint: #34d399; /* Emerald 400 */
    
    --chart-1: #8b5cf6; /* Violet */
    --chart-2: #ec4899; /* Pink */
    --chart-3: #10b981; /* Emerald */
    --chart-4: #f59e0b; /* Amber */
    --chart-5: #3b82f6; /* Blue */

    --success: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;
    
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 3rem;
    
    --radius-sm: 6px;
    --radius-md: 16px;
    --radius-round: 9999px;
    
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    /* Subtle noise texture or mesh gradient */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.08), transparent 40%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--accent-primary); }

.layout-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper { flex: 1; }

/* Header & Controls */
.site-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.brand-logo { height: 40px; width: auto; border-radius: var(--radius-sm); }
.header-controls { display: flex; gap: var(--space-md); align-items: center; }

.view-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 3px;
    border-radius: var(--radius-sm);
    display: flex;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--text-primary);
    color: var(--bg-body);
}

/* Hero Section */
.hero {
    margin: var(--space-xl) 0;
    animation: fadeUp 0.6s var(--ease-spring) forwards;
}

.hero-kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-pop);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.stale-badge {
    background: var(--warn);
    color: var(--bg-body);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    margin-left: 8px;
    display: none;
}

.stale-badge.visible {
    display: inline-block;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-sm);
}

.hero-company-sub {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
}

/* Quick Jump Chips (Mobile Only) */
.quick-jumps-wrapper {
    display: none; /* hidden on desktop */
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.quick-jumps-wrapper::-webkit-scrollbar { display: none; }

.quick-jumps {
    display: flex;
    gap: var(--space-sm);
}

.chip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-round);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chip-btn.active {
    background: var(--accent-primary);
    color: var(--bg-body);
    border-color: var(--accent-primary);
}

.chip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    backdrop-filter: blur(10px);
}

.compact-panel {
    padding: var(--space-md);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
}

/* === STORAGE REDESIGN STYLES === */

/* Hero Donut Chart */
.storage-hero {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.donut-chart-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

/* CSS Conic Gradient Chart */
.donut-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Gradient set via inline style in JS */
    background: conic-gradient(var(--accent-primary) 0% 0%, var(--bg-surface) 0% 100%); 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.donut-hole {
    width: 75%;
    height: 75%;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.donut-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.donut-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 2px;
}

.storage-hero-text {
    flex: 1;
}

.storage-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.stat-box {
    background: rgba(255,255,255,0.03);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.stat-box-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 2px;
}

.stat-box-val {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Breakdown Bars */
.storage-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.bucket-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
}

.bucket-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.bucket-details {
    flex: 1;
}

.bucket-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.bucket-name {
    color: var(--text-primary);
    font-weight: 500;
}

.bucket-size {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.progress-track {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-round);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-round);
    background: var(--accent-primary);
    /* width set in JS */
}

/* Colors for buckets */
.bucket-item:nth-child(1) .bucket-icon { color: var(--chart-1); background: rgba(139, 92, 246, 0.15); }
.bucket-item:nth-child(1) .progress-bar { background: var(--chart-1); }

.bucket-item:nth-child(2) .bucket-icon { color: var(--chart-2); background: rgba(236, 72, 153, 0.15); }
.bucket-item:nth-child(2) .progress-bar { background: var(--chart-2); }

.bucket-item:nth-child(3) .bucket-icon { color: var(--chart-3); background: rgba(16, 185, 129, 0.15); }
.bucket-item:nth-child(3) .progress-bar { background: var(--chart-3); }

.bucket-item:nth-child(4) .bucket-icon { color: var(--chart-4); background: rgba(245, 158, 11, 0.15); }
.bucket-item:nth-child(4) .progress-bar { background: var(--chart-4); }

.bucket-item:nth-child(5) .bucket-icon { color: var(--chart-5); background: rgba(59, 130, 246, 0.15); }
.bucket-item:nth-child(5) .progress-bar { background: var(--chart-5); }


/* === SPACE BURN & RUNWAY STYLES === */
/* v2 Polish */

.spaceburn-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.burn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.burn-stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.burn-stat.trend-critical { border-color: var(--danger); background: rgba(239, 68, 68, 0.05); }
.burn-stat.trend-warn { border-color: var(--warn); background: rgba(245, 158, 11, 0.05); }
.burn-stat.trend-good { border-color: var(--success); background: rgba(16, 185, 129, 0.05); }

.burn-label {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.burn-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.burn-value .unit { font-size: 0.7rem; color: var(--text-secondary); font-weight: 400; }

.trend-critical .burn-value { color: var(--danger); }
.trend-warn .burn-value { color: var(--warn); }
.trend-good .burn-value { color: var(--success); }

/* Culprit Row */
.culprit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.culprit-icon { font-size: 1.2rem; }
.culprit-info { flex: 1; }
.culprit-title { font-size: 0.8rem; color: var(--text-primary); }
.culprit-desc { font-size: 0.7rem; color: var(--text-tertiary); }
.culprit-val { font-family: var(--font-mono); font-weight: 600; color: var(--danger); font-size: 0.9rem; }

/* Runway Gauge */
.runway-block {
    margin-top: var(--space-xs);
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.runway-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.runway-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.runway-val-big {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.runway-val-big small { font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; }

.runway-track {
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-round);
    position: relative;
    margin-bottom: 8px;
    overflow: hidden;
}

.runway-fill {
    height: 100%;
    border-radius: var(--radius-round);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.runway-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.5);
    z-index: 2;
}

.runway-legend {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: right;
}
.runway-legend strong { color: var(--text-secondary); }

/* Action Card */
.reco-card {
    margin-top: var(--space-md);
    border: 1px dashed var(--border-highlight);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: rgba(255,255,255,0.01);
}

.reco-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.reco-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-pop);
}

.reco-badge-urgent {
    font-size: 0.6rem;
    background: var(--danger);
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 700;
}

.reco-body {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.reco-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 6px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}
.reco-footer strong { color: var(--success); }


/* Other existing components (minimized for brevity but preserved) */
.lane-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-round);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-warn { background: rgba(245, 158, 11, 0.2); color: var(--warn); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table th { text-align: left; color: var(--text-tertiary); padding: 8px; border-bottom: 1px solid var(--border-subtle); }
.data-table td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.03); }

/* Animation */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Visibility toggles */
.director-only, .operator-only { display: none; }
body.view-director .director-only { display: block; }
body.view-operator .operator-only { display: block; }

/* Responsive */
@media (max-width: 900px) {
    .dashboard-grid { 
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .hero h1 { font-size: 3rem; }
    
    .quick-jumps-wrapper { display: block; }

    /* Action Queue Mobile - Compact Stacking */
    .action-item {
        display: grid;
        grid-template-columns: auto 1fr auto; 
        gap: 8px;
        padding: 10px;
    }
    
    /* Meta tags wrapping */
    .action-meta {
        margin-top: 4px;
        gap: 4px;
    }
    
    .action-tag {
        font-size: 0.6rem;
    }

    /* Accordion Behavior for Mobile Panels */
    .panel {
        padding: 0; /* Reset padding for accordion */
        overflow: hidden;
        transition: all 0.3s var(--ease-spring);
    }
    
    .panel.collapsed .panel-content {
        display: none;
    }
    
    .panel-header {
        padding: var(--space-md); /* Header keeps padding */
        margin-bottom: 0;
        cursor: pointer;
        /* Increase tap target */
        min-height: 50px;
    }
    
    .panel-header::after {
        content: '+';
        font-family: var(--font-mono);
        font-weight: bold;
        color: var(--text-secondary);
        font-size: 1.2rem;
        margin-left: auto;
        padding-left: 10px;
        transition: transform 0.3s ease;
    }
    
    .panel:not(.collapsed) .panel-header::after {
        content: '−'; /* Minus sign */
    }
    
    .panel-content {
        padding: 0 var(--space-md) var(--space-md) var(--space-md);
        animation: slideDown 0.3s ease;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .panel-content .data-table {
        min-width: 640px;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* Ensure Strategic Priorities and Storage are visible by default or prioritized visually */
    #storage-panel { order: -1; } /* Move storage to top of flex stack on mobile if needed via CSS, but we'll use Chips to jump */
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === ACTION QUEUE STYLES === */

.action-queue-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.action-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-sm);
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    align-items: start;
    transition: background 0.2s ease;
}

.action-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Priority Indicator (Left bar + Number) */
.action-priority-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.action-priority-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-round);
    background: var(--bg-surface);
    color: var(--text-tertiary);
    border: 1px solid var(--border-subtle);
}

.action-priority-badge.priority-1 {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.action-priority-badge.priority-2 {
    color: var(--warn);
    border-color: rgba(245, 158, 11, 0.3);
}

.action-priority-badge.priority-3 {
    color: var(--success);
}

/* Main Content */
.action-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.action-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.action-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 6px;
}

/* Meta Tags Row */
.action-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.action-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.action-tag.tag-gain {
    color: var(--accent-mint);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
    font-weight: 600;
}

.action-tag.tag-effort {
    color: var(--text-secondary);
}

.action-tag.tag-risk.risk-high { color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.action-tag.tag-risk.risk-med { color: var(--warn); }
.action-tag.tag-risk.risk-low { color: var(--text-tertiary); }

/* Right Column (Status/Action) */
.action-status-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.action-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-subtle);
}

.action-status-dot.status-doing {
    background: var(--accent-primary);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

.action-status-dot.status-done {
    background: var(--success);
}

.action-status-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Footer Summary */
.action-queue-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.footer-stat strong {
    color: var(--text-primary);
}

.footer-stat.highlight {
    color: var(--accent-mint);
}

/* === RELIABILITY CARD STYLES === */

.reliability-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.reliability-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.reliability-state.state-unblocked {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success);
}

.reliability-state.state-blocked {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

.reliability-state-icon {
    font-size: 1.2rem;
}

.reliability-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.reliability-row:last-child {
    border-bottom: none;
}

.reliability-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reliability-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.reliability-subagent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: var(--space-sm);
}

.reliability-subagent {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.reliability-subagent-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.reliability-subagent-status.active {
    background: var(--success);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.reliability-subagent-status.standby {
    background: var(--text-tertiary);
}

/* === CHANGE LOG STYLES === */

.change-log-list {
    display: flex;
    flex-direction: column;
    gap: 0; /* Removing gap for connected timeline look */
    position: relative;
    padding-left: 8px; /* Space for the timeline line */
}

/* Timeline vertical line */
.change-log-list::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 24px; /* Aligns with dot center: 4px(margin) + 8px(pad) + 8px(dot-margin) + 5px(radius) - 1px(half-line) */
    width: 2px;
    background: var(--border-subtle);
    border-radius: 2px;
    z-index: 0;
}

.change-log-item {
    display: flex;
    gap: var(--space-md);
    padding: 12px 8px; /* Some horizontal padding for hover effect */
    position: relative;
    transition: background 0.2s ease;
    border-radius: var(--radius-sm);
    margin-left: 4px; /* Slight offset from edge */
}

.change-log-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Timeline Dot */
.change-log-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px; 
    background: var(--bg-surface);
    border: 2px solid var(--text-tertiary);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
    margin-left: 8px; /* Push from item padding */
}

/* Type-based dot colors */
.change-log-item.type-shipped .change-log-dot { border-color: var(--success); background: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }
.change-log-item.type-fixed .change-log-dot { border-color: var(--accent-primary); background: var(--bg-surface); }
.change-log-item.type-failed .change-log-dot { border-color: var(--danger); background: var(--danger); }

/* Content */
.change-log-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.change-log-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.change-log-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.change-log-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.change-log-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.change-log-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    margin-top: 4px;
    min-height: 20px;
}

.change-log-owner {
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Rollback Ref */
.change-log-rollback {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--warn);
    background: rgba(245, 158, 11, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.change-log-rollback:hover {
    opacity: 1;
}

/* Type Badge - Minimal */
.change-badge-mini {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 6px;
}
.change-badge-mini.type-shipped { color: var(--success); background: rgba(16, 185, 129, 0.1); }
.change-badge-mini.type-fixed { color: var(--accent-primary); background: rgba(96, 165, 250, 0.1); }
.change-badge-mini.type-failed { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

/* Empty state */
.change-log-empty {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-style: italic;
}
/* Patch CSS to append to main-v7.css */

/* 1. Hero Readability & Clutter Reduction */
.hero { margin: var(--space-md) 0 var(--space-lg); }
.hero h1 { background: linear-gradient(to right, #ffffff, #d1d5db); letter-spacing: -0.02em; }
.hero-company-sub { margin-bottom: var(--space-md); }

/* 3. Secondary text contrast */
:root {
    --text-secondary: #a1a1aa; /* Zinc 400 -> maybe bump to #d4d4d8 (Zinc 300) for contrast? Let's check contrast. */
}
/* Override root vars: */
:root {
    --text-secondary: #cbd5e1; /* Lighter secondary text for better contrast on dark bg */
    --text-tertiary: #94a3b8;
}

/* 4. Accordion hierarchy / iconography polish */
.panel-header { font-weight: 700; letter-spacing: 0.02em; }
.panel:not(.collapsed) .panel-header { border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--space-md); }

/* Mobile overrides */
@media (max-width: 900px) {
    /* 2. Mobile header / navigation */
    .site-header {
        position: sticky;
        top: 0;
        background: var(--bg-body);
        z-index: 100;
        border-bottom: 1px solid var(--border-subtle);
        padding: var(--space-sm) 0;
        margin-bottom: var(--space-md);
        margin-left: calc(-1 * var(--space-lg));
        margin-right: calc(-1 * var(--space-lg));
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
        height: auto;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .header-controls {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }
    
    /* 5. Mobile fixes for cramped stat boxes / overflow cues / touch targets */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-sm);
    }
    
    .stat-item {
        padding: var(--space-md) var(--space-sm);
        text-align: center;
    }
    
    .stat-val { font-size: 1.5rem; }
    
    /* Touch targets */
    a, button, .chip-btn, .toggle-btn {
        min-height: 44px; /* iOS standard touch target */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Overflow cues */
    .panel-content {
        box-shadow: inset -10px 0 10px -10px rgba(255,255,255,0.05); /* Cue for horizontal scroll */
    }
}
