.publishing-flow-section {
    background: #fafbfc;
}

.publishing-flow-heading {
    justify-content: center;
    margin-bottom: 2.5rem;
    text-align: center;
}

.publishing-flow-heading p {
    margin-inline: auto;
}

.publishing-flow-list {
    display: grid;
    max-width: 78rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2.5rem 1rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.publishing-flow-step {
    --flow-color: #2f4c96;
    --flow-label-color: #fff;
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 14rem;
    flex-direction: column;
    align-items: center;
    color: var(--flow-color);
    text-align: center;
}

.publishing-flow-step:nth-child(2),
.publishing-flow-step:nth-child(7) {
    --flow-color: #e8b449;
    --flow-label-color: #102239;
}

.publishing-flow-step:nth-child(3),
.publishing-flow-step:nth-child(8) {
    --flow-color: #4da99a;
}

.publishing-flow-step:nth-child(4),
.publishing-flow-step:nth-child(9) {
    --flow-color: #9b3d75;
}

.publishing-flow-step:nth-child(5) {
    --flow-color: #ee8386;
}

.publishing-flow-step:nth-child(6) {
    --flow-color: #3379a3;
}

.publishing-flow-step:nth-child(1) { grid-area: 1 / 1; }
.publishing-flow-step:nth-child(2) { grid-area: 1 / 2; }
.publishing-flow-step:nth-child(3) { grid-area: 1 / 3; }
.publishing-flow-step:nth-child(4) { grid-area: 1 / 4; }
.publishing-flow-step:nth-child(5) { grid-area: 1 / 5; }
.publishing-flow-step:nth-child(6) { grid-area: 2 / 5; }
.publishing-flow-step:nth-child(7) { grid-area: 2 / 4; }
.publishing-flow-step:nth-child(8) { grid-area: 2 / 3; }
.publishing-flow-step:nth-child(9) { grid-area: 2 / 2; }

.publishing-flow-step:nth-child(2),
.publishing-flow-step:nth-child(4),
.publishing-flow-step:nth-child(7),
.publishing-flow-step:nth-child(9) {
    padding-top: 2.4rem;
}

.publishing-flow-pin {
    position: relative;
    z-index: 1;
    display: grid;
    width: 7.25rem;
    height: 7.25rem;
    flex: 0 0 auto;
    place-items: center;
    border: 0.28rem solid currentColor;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0.4rem 1rem rgb(16 34 57 / 7%);
}

.publishing-flow-pin::before {
    position: absolute;
    inset: 0.3rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
    opacity: 0.65;
}

.publishing-flow-pin::after {
    position: absolute;
    bottom: -1.2rem;
    left: 50%;
    border-top: 1.25rem solid currentColor;
    border-right: 0.75rem solid transparent;
    border-left: 0.75rem solid transparent;
    content: "";
    transform: translateX(-50%);
}

.publishing-step-icon {
    width: 3.4rem;
    height: 3.4rem;
}

.publishing-flow-label {
    display: flex;
    width: min(100%, 11rem);
    min-height: 3.2rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 0.6rem;
    background: var(--flow-color);
    color: var(--flow-label-color);
    box-shadow: 0 0.45rem 1rem rgb(16 34 57 / 9%);
}

.publishing-flow-index {
    align-self: flex-start;
    padding-top: 0.08rem;
    font-size: 0.67rem;
    font-weight: 850;
    opacity: 0.78;
}

.publishing-flow-label h3 {
    margin: 0;
    color: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.28;
    text-wrap: balance;
}

.publishing-flow-arrow {
    position: absolute;
    z-index: 2;
    display: block;
    width: 3.3rem;
    height: 3.3rem;
    color: #283e77;
    pointer-events: none;
}

.publishing-flow-arrow svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.publishing-flow-step:nth-child(1) .publishing-flow-arrow,
.publishing-flow-step:nth-child(3) .publishing-flow-arrow {
    top: 2.8rem;
    left: calc(100% - 0.7rem);
}

.publishing-flow-step:nth-child(2) .publishing-flow-arrow,
.publishing-flow-step:nth-child(4) .publishing-flow-arrow {
    top: 4.5rem;
    left: calc(100% - 0.7rem);
    transform: scaleY(-1);
}

.publishing-flow-step:nth-child(5) .publishing-flow-arrow {
    top: 100%;
    left: 50%;
    height: 2.5rem;
    transform: translateX(-50%);
}

.publishing-flow-step:nth-child(6) .publishing-flow-arrow,
.publishing-flow-step:nth-child(8) .publishing-flow-arrow {
    top: 2.8rem;
    right: calc(100% - 0.7rem);
    transform: scaleX(-1);
}

.publishing-flow-step:nth-child(7) .publishing-flow-arrow {
    top: 4.5rem;
    right: calc(100% - 0.7rem);
    transform: scale(-1, -1);
}

@media (max-width: 1199.98px) {
    .publishing-flow-list {
        max-width: 44rem;
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .publishing-flow-step:nth-child(n) {
        min-height: 5.5rem;
        grid-area: auto;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding-top: 0;
        text-align: left;
    }

    .publishing-flow-pin {
        width: 4.6rem;
        height: 4.6rem;
    }

    .publishing-flow-pin::after {
        display: none;
    }

    .publishing-step-icon {
        width: 2.3rem;
        height: 2.3rem;
    }

    .publishing-flow-label {
        width: auto;
        max-width: none;
        flex: 1;
        justify-content: flex-start;
        margin-top: 0;
        padding: 0.7rem 0.9rem;
    }

    .publishing-flow-label h3 {
        font-size: 0.9rem;
    }

    .publishing-flow-step:nth-child(n) .publishing-flow-arrow {
        top: 100%;
        right: auto;
        left: 2.3rem;
        width: 2rem;
        height: 2rem;
        transform: translateX(-50%);
    }

    .publishing-flow-arrow svg {
        display: none;
    }

    .publishing-flow-arrow::before {
        display: block;
        color: #283e77;
        content: "↓";
        font-size: 1.65rem;
        font-weight: 800;
        line-height: 1;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .publishing-flow-heading {
        text-align: left;
    }

    .publishing-flow-list {
        gap: 1.7rem;
    }

    .publishing-flow-step:nth-child(n) {
        gap: 0.65rem;
    }

    .publishing-flow-pin {
        width: 3.8rem;
        height: 3.8rem;
    }

    .publishing-step-icon {
        width: 1.9rem;
        height: 1.9rem;
    }

    .publishing-flow-step:nth-child(n) .publishing-flow-arrow {
        left: 1.9rem;
        height: 1.7rem;
    }

    .publishing-flow-label h3 {
        font-size: 0.82rem;
    }
}
