/* =========================================================
   PROGRESS BAR — compact, shurink-friendly connector
========================================================= */

.progress-bar,
.progress-item,
.progress-circle,
.progress-label {
    font-family: 'Inter', 'Roboto', system-ui, sans-serif;
    font-weight: 700;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.3px;
}

:root {
    --pb-green: #1fbf85;
    --pb-ink: #0b1117;
    --pb-border: #1f3a33;
    --pb-text-idle: #7c9a92;
    --pb-size: 40px;
    --pb-connector-max: 64px;
}

/* =========================================================
   BAR
========================================================= */

.progress-bar {
    width: min(92%, 620px);
    margin: 0 auto 28px;
    padding: 10px 6px 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* =========================================================
   ROW — forced single line, never wrap
========================================================= */

.progress-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

/* =========================================================
   ITEM
========================================================= */

.progress-item {
    flex: 0 1 var(--pb-size);
    width: var(--pb-size);
    min-width: 0;
    max-width: var(--pb-size);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* =========================================================
   CIRCLE
========================================================= */

.progress-circle {
    width: var(--pb-size);
    height: var(--pb-size);
    min-width: var(--pb-size);
    min-height: var(--pb-size);
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid var(--pb-border);
    background: var(--pb-ink);
    color: var(--pb-text-idle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.progress-number {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.progress-circle.active {
    border-color: var(--pb-green);
    background: var(--pb-green);
    color: #06281d;
}

.progress-circle.completed {
    border-color: var(--pb-green);
    background: rgba(31, 191, 133, 0.22);
    color: var(--pb-green);
}

/* =========================================================
   CONNECTOR — shrinks aggressively, never forces width
========================================================= */

.progress-connector {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: var(--pb-connector-max);
    height: 2px;
    margin-left: 6px;
    margin-right: 6px;
    margin-top: calc((var(--pb-size) / 2) - 1px);
    background: var(--pb-border);
    border-radius: 2px;

    box-sizing: border-box;
    flex-shrink: 1;
}

.progress-connector.completed {
    background: var(--pb-green);
}

/* =========================================================
   LABEL
========================================================= */
.progress-label {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 200;
    /* Soft elastic width for 6 steps */
    flex: 0 1 auto;
    min-width: 70px;
    max-width: 110px;
    white-space: normal;         
    text-align: center;         
    word-break: keep-all;        
    overflow-wrap: break-word;   
    letter-spacing: 0.15px;
    color: var(--pb-text-idle);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* =========================================================
   SMALLER / PUSHED IN
========================================================= */

@media (max-width: 900px) {
    .progress-bar {
        width: min(92%, 580px);
        padding: 10px 4px 0;
    }

    :root {
        --pb-connector-max: 48px;
    }

    .progress-connector {
        margin-left: 4px;
        margin-right: 4px;
    }

    .progress-label {
        max-width: 90px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    :root {
        --pb-size: 32px;
        --pb-connector-max: 36px;
    }

    .progress-bar {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }

    .progress-number {
        font-size: 0.82rem;
    }

    .progress-connector {
        height: 2px;
        margin-left: 3px;
        margin-right: 3px;
    }

    .progress-label {
        max-width: 68px;
        font-size: 11px;
        margin-top: 5px;
    }
}

@media (max-width: 420px) {
    :root {
        --pb-size: 28px;
        --pb-connector-max: 22px;
    }

    .progress-bar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .progress-number {
        font-size: 0.75rem;
    }

    .progress-connector {
        margin-left: 2px;
        margin-right: 2px;
        height: 2px;
    }

    .progress-label {
        max-width: 54px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    :root {
        --pb-size: 26px;
        --pb-connector-max: 16px;
    }

    .progress-connector {
        margin-left: 2px;
        margin-right: 2px;
    }

    .progress-label {
        max-width: 50px;
        font-size: 9px;
    }
}