/* Vertical ascension timeline. Each row = one ascension run, with a
   coloured node on the left, an expandable button for details, and a
   nested phase breakdown loaded lazily from /dash-api/evolve/runs/{id}/phases. */

.lineage {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: var(--sp-5);
}
.lineage::before {
    /* Vertical timeline rail */
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}
.lineage__row {
    position: relative;
    margin-bottom: var(--sp-3);
}
.lineage__node {
    position: absolute;
    left: -22px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-text-dim);
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 1px var(--color-border);
}
.lineage__node--ok        { background: var(--color-success); }
.lineage__node--running   { background: var(--color-primary);  }
.lineage__node--fail      { background: var(--color-danger);   }
.lineage__node--rollback  { background: var(--color-warning);  }
.lineage__node--idle      { background: var(--color-text-dim); }

.lineage__head {
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: 100%;
    text-align: left;
    padding: var(--sp-2) var(--sp-3);
    background: transparent;
    color: var(--color-text);
    border-radius: var(--radius);
    transition: background var(--t-fast);
}
.lineage__head:hover { background: var(--color-surface-alt); }
.lineage__head[aria-expanded="true"] { background: var(--color-surface-alt); }

.lineage__when { color: var(--color-text-muted); font-size: var(--fs-xs); }

.lineage__detail {
    margin-top: var(--sp-2);
    padding: var(--sp-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.lineage__phases {
    margin-top: var(--sp-3);
}
.lineage__phase {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: var(--sp-2);
    align-items: center;
    padding: 4px var(--sp-2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
}
.lineage__phase:hover { background: var(--color-surface-alt); }
.lineage__phase-name { color: var(--color-text); }
.lineage__phase-dur  { color: var(--color-text-muted); font-family: var(--font-mono); font-size: var(--fs-xs); }
