/* Step progress outline: desktop aside + mobile stacked panel above roadmap. */
.roadmap-step-progress-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
    max-width: min(100%, 1500px);
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.roadmap-step-progress-main .roadmap-svg-wrapper {
    margin-left: 0;
    margin-right: 0;
}

.roadmap-step-progress-aside {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
}

.roadmap-step-progress-legend {
    margin: 0 0 0.65rem 0;
    padding: 0 0 0.65rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.roadmap-step-progress-legend-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
}

.roadmap-step-progress-legend-row:last-child {
    margin-bottom: 0;
}

.roadmap-step-progress-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.roadmap-step-progress-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.roadmap-step-progress-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.roadmap-step-progress-item {
    margin: 0 0 0.35rem 0;
    padding: 0.4rem 0.5rem 0.4rem 0.65rem;
    border-left: 3px solid #cbd5e1;
    border-radius: 0.25rem;
    color: #334155;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.roadmap-step-progress-item:hover {
    background: #f1f5f9;
}

.roadmap-step-progress-item .roadmap-step-progress-num {
    font-weight: 700;
    margin-right: 0.35rem;
    color: #64748b;
}

.roadmap-step-progress-item--done {
    border-left-color: #16a34a;
    color: #14532d;
}

.roadmap-step-progress-item--done .roadmap-step-progress-num { color: #16a34a; }

.roadmap-step-progress-item--in_progress {
    border-left-color: #ca8a04;
    color: #854d0e;
}

.roadmap-step-progress-item--in_progress .roadmap-step-progress-num { color: #ca8a04; }

.roadmap-step-progress-item--skipped {
    border-left-color: #ea580c;
    color: #9a3412;
}

.roadmap-step-progress-item--skipped .roadmap-step-progress-num { color: #ea580c; }

.roadmap-step-progress-main {
    flex: 1;
    min-width: 0;
    overflow: visible;
}

/* Tablet / phone: keep outline visible, stack above roadmap. */
@media (max-width: 1024px) {
    .roadmap-step-progress-layout {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    /* Let mobile ordering place selector above tracker, tracker above roadmap. */
    .roadmap-step-progress-main {
        display: contents;
    }

    .pathway-selector-container {
        order: 1;
    }

    .roadmap-step-progress-aside {
        order: 2;
        display: block;
        width: 100%;
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    .roadmap-step-progress-title {
        margin-bottom: 0.35rem;
        font-size: 0.85rem;
    }

    .roadmap-step-progress-legend {
        margin-bottom: 0.45rem;
        padding-bottom: 0.45rem;
        font-size: 0.66rem;
    }

    .roadmap-step-progress-legend-row {
        gap: 0.3rem;
        margin-bottom: 0.15rem;
    }

    .roadmap-step-progress-legend-swatch {
        width: 8px;
        height: 8px;
    }

    .roadmap-step-progress-item {
        margin-bottom: 0.25rem;
        padding: 0.3rem 0.4rem 0.3rem 0.55rem;
        font-size: 0.78rem;
        line-height: 1.25;
    }

    #roadmap-container.roadmap-container {
        order: 3;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-top: 0;
    }
}
