/* =====================================================
   HONESTLY, E — Life Arcs Panel (Ellen the Archivist)
   Ellen's right-column shell — replaces timeline when Ellen
   is the active companion. Mirrors Cookbook / Quilt /
   Inquiry / Health Journey pattern.

   Ellen is THE ARCHIVIST. She stewards the structured
   life-story layer — the 6 canonical Life Arc territories
   (origins → legacy) shipped backend in
   src/services/life-arc.js. Per the Ellen Archivist design
   memory: territories with status badges + "begin interview"
   per arc. Custom subscriber-defined arcs (Arc of Divorce,
   Arc of Education) deferred to v2.

   Per companion-surface-awareness principle: piece 1 of 4 (UI).
   Brand accent: --ellen-color #B07B7B (rose).
   ===================================================== */

.life-arcs-panel {
    display: none;
    width: var(--timeline-width, 280px);
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow: hidden;
}

.ellen-active .life-arcs-panel {
    display: flex;
}

.ellen-active .timeline-sidebar {
    display: none;
}

.ellen-active .timeline-fab {
    display: none !important;
}

/* -----------------------------------------------------
   Header
   ----------------------------------------------------- */
.life-arcs-panel-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.life-arcs-panel-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.life-arcs-panel-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.45;
}

/* -----------------------------------------------------
   Scroll area + territory list
   ----------------------------------------------------- */
.life-arcs-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem;
}

/* Territory card */
.life-arc-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.95rem;
    margin-bottom: 0.65rem;
    background: var(--bg-card);
    transition: all var(--transition-fast);
    border-left: 3px solid var(--ellen-color, #B07B7B);
}

.life-arc-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.life-arc-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.life-arc-card-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.25;
}

.life-arc-card-status {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-family: var(--font-sans);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.life-arc-card-status.unexplored {
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.life-arc-card-status.touched {
    color: var(--ellen-color, #B07B7B);
    background: rgba(176, 123, 123, 0.12);
}

.life-arc-card-status.covered {
    color: white;
    background: var(--ellen-color, #B07B7B);
}

.life-arc-card-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

.life-arc-card-btn {
    display: inline-block;
    background: none;
    border: 1px solid var(--ellen-color, #B07B7B);
    color: var(--ellen-color, #B07B7B);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.life-arc-card-btn:hover {
    background: var(--ellen-color, #B07B7B);
    color: white;
}

/* Footer note (custom arcs hint) */
.life-arcs-panel-footer {
    padding: 0.85rem;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
    text-align: center;
}

/* -----------------------------------------------------
   Responsive — collapse panel on mobile
   ----------------------------------------------------- */
@media (max-width: 1024px) {
    .ellen-active .life-arcs-panel {
        display: none;
    }
    .ellen-active .timeline-sidebar {
        display: flex;
    }
}
