﻿/* Shared Flow Story read spine (cards, path filter, stage blocks, gutters).
   Used by BusinessFlowStoryReadCanvas and Flow Story view/edit cards. */

/* from StoryView.razor.css lines 1-175 */
.bf-story-path-view-banner {
    margin-bottom: 0.35rem;
    border-color: color-mix(in srgb, var(--mud-palette-divider) 88%, var(--mud-palette-primary) 12%) !important;
    background: color-mix(in srgb, var(--mud-palette-surface) 95%, var(--mud-palette-primary) 5%) !important;
}

.bf-story-path-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 1rem;
    margin: 0 0 0.65rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--mud-palette-divider) 85%, var(--mud-palette-primary) 15%);
    border-radius: var(--nucleus-surface-radius, 4px);
    background: color-mix(in srgb, var(--mud-palette-surface) 92%, var(--mud-palette-primary) 8%);
}

.bf-story-path-filter__pins {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.bf-story-path-filter__label {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.bf-story-path-filter__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 16rem;
    padding: 0.15rem 0.4rem;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 35%, var(--mud-palette-lines-default));
    border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-surface) 88%, var(--mud-palette-primary) 12%);
    color: var(--mud-palette-text-primary);
    font-size: 0.75rem;
    line-height: 1.25;
    cursor: pointer;
}

.bf-story-path-filter__chip:hover {
    border-color: var(--mud-palette-primary);
}

.bf-story-path-filter__chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bf-story-path-view-banner--compact {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

.bf-story-path-view-banner--compact .mud-alert-message {
    width: 100%;
}

.bf-story-path-view-banner__line1 {
    margin: 0 0 0.15rem;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.35;
    color: var(--mud-palette-text-primary);
}

.bf-story-path-view-banner__line2 {
    margin: 0 0 0.2rem;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--mud-palette-text-secondary);
}

.bf-story-path-view-banner__line3 {
    margin: 0 0 0.15rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--mud-palette-text-disabled);
}

.bf-story-path-view-banner__actions {
    margin-top: 0.35rem;
}

.business-flow-story-step__path-chip {
    height: 1.35rem !important;
    font-size: 0.62rem !important;
}

.business-flow-story-step--path-target .business-flow-story-step__hit {
    border-left-color: color-mix(in srgb, var(--mud-palette-primary) 55%, var(--mud-palette-info)) !important;
}

.business-flow-story-step--path-reassess .business-flow-story-step__hit {
    border-left-color: color-mix(in srgb, var(--mud-palette-warning) 70%, var(--mud-palette-primary)) !important;
}

.business-flow-story-step--path-return .business-flow-story-step__hit {
    border-left-color: color-mix(in srgb, var(--mud-palette-info) 45%, var(--mud-palette-secondary)) !important;
}

.business-flow-story-step--path-excluded .business-flow-story-step__surface {
    background: color-mix(in srgb, var(--mud-palette-background) 88%, var(--mud-palette-surface) 12%);
    border-color: color-mix(in srgb, var(--mud-palette-lines-default) 35%, transparent);
    box-shadow: none;
}

.business-flow-story-step--path-excluded .business-flow-story-step__hit {
    opacity: 0.42;
    filter: saturate(0.35);
    align-items: center;
}

.business-flow-story-step__hit--excluded {
    padding: 0.22rem 0.65rem;
    min-height: 0;
}

.business-flow-story-step--path-excluded .business-flow-story-step__num {
    width: 1.1rem;
    height: 1.1rem;
    min-width: 1.1rem;
    margin-top: 0;
    font-size: 0.65rem;
}

.business-flow-story-step--path-excluded .business-flow-story-step__title-row {
    align-items: center;
    gap: 0.25rem 0.55rem;
}

.business-flow-story-step--path-excluded .business-flow-story-step__title {
    font-weight: 400;
    font-size: 0.88rem;
    line-height: 1.25;
    color: var(--mud-palette-text-disabled);
}

.business-flow-story-step--path-excluded .business-flow-story-step__title-trail {
    max-width: none;
    gap: 0.35rem 0.5rem;
}

.business-flow-story-step--path-excluded .bf-story-type-chip {
    opacity: 0.7;
}

.business-flow-story-step__path-excluded-label {
    margin: 0;
    flex-shrink: 0;
    font-size: 0.68rem;
    line-height: 1.2;
    color: var(--mud-palette-text-disabled);
    font-style: italic;
    white-space: nowrap;
}

.business-flow-story-step--path-excluded .business-flow-story-step__hit:hover {
    background: color-mix(in srgb, var(--mud-palette-action-hover-default) 25%, transparent);
}

.business-flow-story-step__path-chip--muted {
    opacity: 0.92;
}


/* from StoryView.razor.css lines 295-331 */
.business-flow-story-section--flow-summary .business-flow-story-h2 {
    margin-bottom: 0.32rem;
}

.business-flow-story-steps-wrap {
    width: 100%;
    min-width: 0;
}

.business-flow-story-step-hint {
    margin: 0.15rem 0 0.85rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--mud-palette-text-secondary);
}

/* from StoryView.razor.css lines 428-453 */
.business-flow-story-steps-main {
    min-width: 0;
    position: relative;
    overflow: visible;
}

.business-flow-story-steps-main--gutter-left {
    /* Must match JS gutterOffset (~20px) + laneGap (~10px) with room to spare */
    padding-left: calc(1.5rem + (var(--bf-story-path-lanes-left, 1) * 0.7rem));
}

.business-flow-story-steps-main--gutter-right {
    padding-right: calc(1.5rem + (var(--bf-story-path-lanes-right, 1) * 0.7rem));
}

@media (max-width: 959.98px) {
    .business-flow-story-steps-main--gutter-left,
    .business-flow-story-steps-main--gutter-right {
        padding-left: 0;
        padding-right: 0;
    }

    .business-flow-story-steps-main .bf-story-path-connectors {
        display: none;
    }
}

/* from StoryView.razor.css lines 455-546 */
.business-flow-story-section {
    margin-bottom: 1.75rem;
}

.business-flow-story-section:last-child {
    margin-bottom: 0;
}

.business-flow-story-section--flow-summary {
    margin-bottom: 0.65rem;
}

.business-flow-story-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 0.85rem;
}

@media (min-width: 720px) {
    .business-flow-story-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem 1rem;
    }
}

.business-flow-story-summary-grid__label {
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.12rem;
}

.business-flow-story-summary-grid__value {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.42;
    color: var(--mud-palette-text-primary);
}

.business-flow-story-summary-trigger {
    margin-top: 0.45rem;
    padding-top: 0.42rem;
    border-top: 1px dashed color-mix(in srgb, var(--mud-palette-divider) 85%, transparent);
}

.business-flow-story-summary-trigger__label {
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.12rem;
}

.business-flow-story-summary-trigger__value {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.42;
    color: var(--mud-palette-text-primary);
}

.business-flow-story-h2 {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 0.55rem;
}

.business-flow-story-h2--steps {
    margin-bottom: 0.2rem;
}

.business-flow-story-prose {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--mud-palette-text-primary);
}

/* from StoryView.razor.css lines 576-896 */
.business-flow-story-step-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.business-flow-story-step {
    margin: 0;
    padding: 0;
    --bf-story-step-gutter-x: 0.8rem;
    --bf-story-step-num-size: 1.35rem;
    --bf-story-step-num-gap: 0.55rem;
    --bf-story-step-title-inset: calc(
        var(--bf-story-step-gutter-x) + var(--bf-story-step-num-size) + var(--bf-story-step-num-gap)
    );
}

.business-flow-story-step__surface {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--nucleus-surface-radius, 4px);
    background: var(--mud-palette-surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.business-flow-story-step--selected .business-flow-story-step__surface {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 48%, var(--mud-palette-lines-default));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
}

/* Parallel is a spine grouping, not a work object — dashed frame, no lift. */
.business-flow-story-step--stype-parallel .business-flow-story-step__surface {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--mud-palette-lines-default) 92%, transparent);
    background: var(--mud-palette-surface);
    box-shadow: none;
}

.business-flow-story-step--stype-parallel.business-flow-story-step--selected .business-flow-story-step__surface {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--mud-palette-primary) 48%, var(--mud-palette-lines-default));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
}

.business-flow-story-step__hit {
    display: flex;
    align-items: flex-start;
    gap: var(--bf-story-step-num-gap);
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.65rem var(--bf-story-step-gutter-x);
    margin: 0;
    border-radius: var(--nucleus-surface-radius, 4px);
    color: inherit;
    font: inherit;
}

.business-flow-story-step__hit:hover {
    background: color-mix(in srgb, var(--mud-palette-action-hover-default) 55%, transparent);
}

.business-flow-story-step--selected .business-flow-story-step__hit {
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
}

@supports not (background: color-mix(in srgb, red, blue)) {
    .business-flow-story-step--selected .business-flow-story-step__hit {
        background: var(--mud-palette-background-grey);
    }
}

.bf-story-stage-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.business-flow-story-step__enabled-by {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-flow-story-step__num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--bf-story-step-num-size);
    height: var(--bf-story-step-num-size);
    margin-top: 0.1rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-lines-default) 80%, transparent);
    background: transparent;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    min-width: var(--bf-story-step-num-size);
    padding-top: 0;
}

.business-flow-story-step--selected .business-flow-story-step__num {
    color: #fff;
    border-color: transparent;
    background: var(--mud-palette-primary);
}

.business-flow-story-step__body {
    flex: 1 1 auto;
    min-width: 0;
}

.business-flow-story-step__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem 0.75rem;
    width: 100%;
    min-width: 0;
}

.business-flow-story-step__title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    flex: 1 1 auto;
    min-width: 0;
}

.business-flow-story-step__path-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.45rem;
}

.business-flow-story-step__type-chip {
    height: 1.45rem !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.02em;
}

.business-flow-story-step__type-chip--trail {
    flex-shrink: 0;
    opacity: 0.88;
}

.business-flow-story-step__title-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem 0.45rem;
    flex-shrink: 0;
    max-width: min(52%, 22rem);
}

.business-flow-story-step__dept-meta {
    font-size: 0.68rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--mud-palette-text-secondary) !important;
    opacity: 0.92;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-flow-story-step__spine-gov-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
}

.business-flow-story-step__spine-gov-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.04rem 0.38rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-lines-default) 55%, transparent);
    background: color-mix(in srgb, var(--mud-palette-surface) 88%, var(--mud-palette-background-grey));
    font: inherit;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    line-height: 1.25;
}

.business-flow-story-step__spine-gov-pill--href {
    text-decoration: none;
}

.business-flow-story-step__spine-gov-pill:hover {
    color: var(--mud-palette-primary);
    border-color: color-mix(in srgb, var(--mud-palette-primary) 32%, var(--mud-palette-lines-default));
}

.business-flow-story-step__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--mud-palette-text-primary);
    flex: 0 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-flow-story-step--selected .business-flow-story-step__title {
    font-weight: 600;
}

@media (max-width: 599.98px) {
    .business-flow-story-step__title-line {
        flex-wrap: wrap;
    }

    .business-flow-story-step__title-trail {
        max-width: 100%;
        justify-content: flex-start;
    }
}

.business-flow-story-step__narrative {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--mud-palette-text-secondary);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-flow-story-step__meta {
    margin-top: 0.28rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--mud-palette-text-disabled);
}

.business-flow-story-meta-muted {
    color: var(--mud-palette-text-disabled);
}

.business-flow-story-step__sep {
    margin: 0 0.3rem;
    color: var(--mud-palette-lines-default);
}

.business-flow-story-step__link {
    font-weight: 500;
    color: var(--mud-palette-primary) !important;
}

button.business-flow-story-step__story-link {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: var(--mud-palette-primary);
}

button.business-flow-story-step__story-link:hover {
    color: var(--mud-palette-primary-darken);
}

.business-flow-story-step__external-doc {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 0.05rem;
    padding: 0.1rem;
    line-height: 1;
    color: var(--mud-palette-text-disabled);
    text-decoration: none;
    border-radius: 4px;
}

.business-flow-story-step__external-doc:hover {
    color: var(--mud-palette-primary);
    background: var(--mud-palette-action-hover-default);
}

.business-flow-story-step__flags {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.55rem;
    font-size: 0.72rem;
    color: var(--mud-palette-text-disabled);
}

.business-flow-story-step__flag::after {
    content: "Â·";
    margin-left: 0.45rem;
    color: var(--mud-palette-text-disabled);
}

.business-flow-story-step__flag:last-child::after {
    content: none;
    margin: 0;
}

@media (max-width: 959.98px) {
    .business-flow-story-steps-layout--split {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .business-flow-story-rail {
        width: 100%;
        max-width: 100%;
        min-height: 0;
    }
}

/* from StoryView.razor.css lines 1105-1166 */
.business-flow-story-step__surface > .bf-story-outcomes,
.business-flow-story-step__surface > .bf-parallel-block {
    flex: 0 0 auto;
    width: 100%;
    padding: 0.4rem var(--bf-story-step-gutter-x, 0.8rem) 0.55rem var(--bf-story-step-title-inset, 0.8rem);
}

.business-flow-story-step__surface > .bf-story-read-canvas__procedures,
.business-flow-story-step__surface > .bf-story-read-canvas__this-path {
    padding-left: var(--bf-story-step-title-inset, 0.8rem);
    padding-right: var(--bf-story-step-gutter-x, 0.8rem);
}

.business-flow-story-step__surface > .bf-story-read-canvas__this-path {
    margin-left: var(--bf-story-step-title-inset, 0.8rem);
    margin-right: var(--bf-story-step-gutter-x, 0.8rem);
    padding-left: 0;
    padding-right: 0;
}

.business-flow-story-step .bf-story-outcomes__spine-row {
    background: var(--mud-palette-background);
}

.business-flow-story-step .bf-story-outcomes__spine-row:hover {
    background: color-mix(in srgb, var(--mud-palette-action-hover-default) 28%, var(--mud-palette-background));
}

.business-flow-story-step .bf-story-outcomes__spine-row--selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 7%, var(--mud-palette-background));
}

.business-flow-story-step__toolbar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.1rem;
    padding: 0.5rem 0.15rem 0.5rem 0;
    flex: 0 0 auto;
}

.business-flow-story-add-step {
    margin: 0.65rem 0 0 0.2rem;
}

/* Decision outcomes live inside the step card surface (collapsed block in OutcomesBlock). */
.business-flow-story-step--has-outcomes .business-flow-story-step__surface,
.business-flow-story-step--has-parallel .business-flow-story-step__surface {
    overflow: hidden;
}

.business-flow-story-step--has-outcomes .business-flow-story-step__hit,
.business-flow-story-step--has-parallel .business-flow-story-step__hit {
    border-radius: 8px 8px 0 0;
}

.business-flow-story-step__trail-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    max-width: 100%;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--mud-palette-text-secondary);
    line-height: 1.25;
}

.business-flow-story-step__trail-dept,
a.business-flow-story-step__trail-dept {
    color: var(--mud-palette-text-secondary) !important;
    font-weight: 600 !important;
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-flow-story-step__trail-type {
    color: var(--mud-palette-text-disabled);
    font-weight: 600;
}

.business-flow-story-step__trail-sep {
    color: var(--mud-palette-text-disabled);
    font-weight: 500;
    padding: 0 0.12rem;
}


/* from StoryView.razor.css lines 1263-1413 */
.bf-story-stage-block {
    list-style: none;
    margin: 0 0 1.15rem;
    padding: 0;
}

.bf-story-stage-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin: 0 0 0.55rem;
}

.bf-story-stage-block__head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem 0.35rem;
    flex: 0 0 auto;
}

.bf-story-stage-block__add-step {
    min-width: 0;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.bf-story-stage-block__step-count {
    flex: 0 0 auto;
}

.bf-story-stage-block__menu {
    flex: 0 0 auto;
    margin-left: -0.15rem;
}

.bf-story-stage-block__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--mud-palette-text-primary);
}

.bf-story-stage-block__desc {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
    max-width: 42rem;
}

.bf-story-stage-block__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bf-story-add-in-stage {
    list-style: none;
    margin: 0.15rem 0 0;
}

.bf-story-add-in-stage__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: 1.5px dashed color-mix(in srgb, var(--mud-palette-primary) 45%, var(--mud-palette-divider));
    border-radius: var(--nucleus-surface-radius, 4px);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
    color: var(--mud-palette-primary);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.bf-story-add-in-stage__btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--mud-palette-primary) 9%, transparent);
}

.bf-story-add-in-stage__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bf-story-type-chip {
    flex: 0 0 auto;
    height: 1.2rem !important;
    min-height: 1.2rem !important;
    padding: 0 0.4rem !important;
    font-size: 0.65rem !important;
    font-weight: 550 !important;
    letter-spacing: 0.01em;
    opacity: 0.9;
    background: transparent !important;
    color: var(--mud-palette-text-secondary) !important;
}

.bf-story-type-chip--decision {
    color: color-mix(in srgb, var(--mud-palette-info) 70%, var(--mud-palette-text-primary)) !important;
}

.bf-story-artefact-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem;
    max-width: 100%;
}

.business-flow-story-step__title-trail .bf-story-artefact-pills {
    max-width: min(100%, 18rem);
}

.bf-story-artefact-pills--inspector {
    max-width: none;
    justify-content: flex-start;
}

.bf-story-artefact-pill {
    display: inline-flex;
    align-items: center;
    max-width: 12.5rem;
    padding: 0.06rem 0.38rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-lines-default) 70%, transparent);
    background: color-mix(in srgb, var(--mud-palette-background-grey) 55%, transparent);
    font-size: 0.64rem;
    font-weight: 550;
    color: var(--mud-palette-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bf-story-artefact-pill--in,
.bf-story-artefact-pill--out {
    background: color-mix(in srgb, var(--mud-palette-background-grey) 55%, transparent);
    color: var(--mud-palette-text-secondary);
}

.bf-story-read-canvas--compact .business-flow-story-steps-wrap {
    margin-top: 0;
}

.bf-story-read-canvas--compact .bf-story-stage-block {
    margin-bottom: 0.65rem;
}

.bf-story-read-canvas--compact .bf-story-stage-block__title {
    font-size: 0.92rem;
}

.bf-story-read-canvas--compact .business-flow-story-exception-summary {
    margin-bottom: 0.75rem;
}

.bs-selected-stage .bf-story-read-canvas .business-flow-story-steps-main--gutter-left {
    padding-left: calc(0.55rem + (var(--bf-story-path-lanes-left, 0) * 0.7rem));
}

.bs-selected-stage .bf-story-read-canvas .business-flow-story-steps-main--gutter-right {
    padding-right: calc(0.55rem + (var(--bf-story-path-lanes-right, 0) * 0.7rem));
}


