/* "Kronologija priče": the strip on an article's page (the story's stages left to right, the article's own marked),
   the story's own page (its stages one under the other) and the list of stories. The site's blocky look: square marks,
   thin rules, the red accent; the buttons outlined, never solid black. */

/* ---- The strip on an article's page ---- */

.story-chain-strip {
    margin: 1rem 0 1.25rem;
    padding: 0.9rem 1rem 0.8rem;
    border: 1px solid var(--news-rule, #dfe3e8);
    border-top: 4px solid var(--news-accent, #b42318);
    background: #ffffff;
}

.story-chain-strip-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.75rem;
}

.story-chain-kicker {
    margin: 0;
    color: var(--news-accent, #b42318);
    font-family: var(--news-font-head);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.story-chain-strip-title {
    flex: 1 1 16rem;
    margin: 0;
    font-family: var(--news-font-head);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
}

.story-chain-strip-title a {
    color: var(--news-ink, #111827);
    text-decoration: none;
}

.story-chain-strip-title a:hover {
    color: var(--news-accent, #b42318);
}

.story-chain-position {
    margin: 0;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.story-chain-track {
    position: relative;
    display: flex;
    margin: 0.85rem 0 0.5rem;
    padding: 0 0 0.35rem;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.story-chain-step {
    position: relative;
    flex: 1 0 9.5rem;
    min-width: 9.5rem;
    scroll-snap-align: center;
}

/* The line through the marks: red from the first stage to the article's, grey on to the newest. */
.story-chain-step::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    right: 0;
    left: 0;
    border-top: 2px solid var(--news-rule-strong, #c9d0d8);
}

.story-chain-step:first-child::before {
    left: 0.5rem;
}

.story-chain-step:last-child::before {
    right: auto;
    width: 0.5rem;
}

.story-chain-step.is-past::before {
    border-top-color: var(--news-accent, #b42318);
}

.story-chain-step-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-right: 0.8rem;
    color: inherit;
    text-decoration: none;
}

.story-chain-dot {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--news-rule-strong, #c9d0d8);
    background: #ffffff;
}

.story-chain-step.is-past .story-chain-dot {
    border-color: var(--news-accent, #b42318);
    background: var(--news-accent, #b42318);
}

.story-chain-step.is-current .story-chain-dot {
    border-color: var(--news-accent, #b42318);
    background: var(--news-accent, #b42318);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.2);
}

.story-chain-when {
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
}

.story-chain-label {
    display: -webkit-box;
    overflow: hidden;
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

a.story-chain-step-body:hover .story-chain-label,
a.story-chain-step-body:focus-visible .story-chain-label {
    color: var(--news-accent, #b42318);
    text-decoration: underline;
}

.story-chain-here {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.12rem 0.4rem;
    color: #ffffff;
    background: var(--news-accent, #b42318);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.story-chain-reports {
    color: #667085;
    font-size: 0.72rem;
}

.story-chain-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 1rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--news-rule, #dfe3e8);
    font-size: 0.84rem;
}

.story-chain-nav-link {
    min-width: 0;
    max-width: 100%;
    color: var(--news-ink, #111827);
    font-weight: 700;
    text-decoration: none;
}

.story-chain-nav-link span {
    margin-right: 0.3rem;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.story-chain-nav-link:hover {
    color: var(--news-accent, #b42318);
}

.story-chain-all {
    margin-left: auto;
    padding: 0.32rem 0.7rem;
    border: 2px solid var(--news-accent, #b42318);
    color: var(--news-accent, #b42318);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.story-chain-all:hover,
.story-chain-all:focus-visible {
    color: #ffffff;
    background: var(--news-accent, #b42318);
}

@media (max-width: 575.98px) {
    .story-chain-strip {
        padding: 0.8rem 0.8rem 0.7rem;
    }

    .story-chain-step {
        flex-basis: 8.5rem;
        min-width: 8.5rem;
    }

    .story-chain-all {
        margin-left: 0;
    }
}

/* ---- The story's own page ---- */

.story-chain-shell {
    max-width: 52rem;
}

.story-chain-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.story-chain-crumbs a {
    color: #667085;
    text-decoration: none;
}

.story-chain-crumbs a + a::before {
    content: "/";
    margin-right: 0.5rem;
    color: #98a2b3;
}

.story-chain-header h1 {
    margin: 0.25rem 0 0.55rem;
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: clamp(1.6rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.12;
}

.story-chain-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0;
    color: #667085;
    font-size: 0.86rem;
    font-weight: 700;
}

.story-chain-lead {
    max-width: 46rem;
    margin: 0;
    color: var(--news-soft-ink, #374151);
}

.story-chain-timeline {
    margin: 1.6rem 0 0;
    padding: 0;
    list-style: none;
}

.story-chain-stage {
    position: relative;
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0 1rem;
    padding-bottom: 1.7rem;
}

.story-chain-stage::before {
    content: "";
    position: absolute;
    top: 2.4rem;
    bottom: 0;
    left: calc(1.2rem - 1px);
    border-left: 2px solid var(--news-rule-strong, #c9d0d8);
}

.story-chain-stage:last-child::before {
    display: none;
}

.story-chain-stage-mark span {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border: 2px solid var(--news-ink, #111827);
    color: var(--news-ink, #111827);
    background: #ffffff;
    font-family: var(--news-font-head);
    font-weight: 800;
}

.story-chain-stage.is-latest .story-chain-stage-mark span {
    border-color: var(--news-accent, #b42318);
    color: #ffffff;
    background: var(--news-accent, #b42318);
}

.story-chain-stage-body .story-chain-when {
    margin: 0.1rem 0 0;
}

.story-chain-stage-body h2 {
    margin: 0.15rem 0 0.45rem;
    font-family: var(--news-font-head);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
}

.story-chain-stage-body h2 a {
    color: var(--news-ink, #111827);
    text-decoration: none;
}

.story-chain-stage-body h2 a:hover {
    color: var(--news-accent, #b42318);
    text-decoration: underline;
}

.story-chain-summary {
    margin: 0 0 0.65rem;
    color: var(--news-soft-ink, #374151);
}

.story-chain-reports-list {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--news-rule, #dfe3e8);
    list-style: none;
}

.story-chain-reports-list li {
    display: flex;
    gap: 0.7rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--news-rule, #dfe3e8);
    font-size: 0.9rem;
}

.story-chain-portal {
    flex: 0 0 8.5rem;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.story-chain-reports-list a {
    min-width: 0;
    color: var(--news-ink, #111827);
    text-decoration: none;
}

.story-chain-reports-list a:hover {
    color: var(--news-accent, #b42318);
    text-decoration: underline;
}

.story-chain-note,
.story-chain-empty {
    margin-top: 1.2rem;
    color: #667085;
    font-size: 0.84rem;
}

@media (max-width: 575.98px) {
    .story-chain-stage {
        grid-template-columns: 2rem minmax(0, 1fr);
        gap: 0 0.75rem;
    }

    .story-chain-stage::before {
        top: 2rem;
        left: calc(1rem - 1px);
    }

    .story-chain-stage-mark span {
        width: 2rem;
        height: 2rem;
    }

    .story-chain-reports-list li {
        flex-direction: column;
        gap: 0.1rem;
    }

    .story-chain-portal {
        flex: none;
    }
}

/* ---- The list of stories ---- */

.story-chain-list {
    margin: 1.3rem 0 0;
    padding: 0;
    border-top: 1px solid var(--news-rule, #dfe3e8);
    list-style: none;
}

.story-chain-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 0 0.85rem 0.9rem;
    border-bottom: 1px solid var(--news-rule, #dfe3e8);
    border-left: 4px solid transparent;
    color: inherit;
    text-decoration: none;
}

.story-chain-list-item:hover,
.story-chain-list-item:focus-visible {
    border-left-color: var(--news-accent, #b42318);
}

.story-chain-list-title {
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.25;
}

.story-chain-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.85rem;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ---- The overview on the story's own page and its steps ---- */

.story-chain-strip.is-overview {
    margin-top: 1.2rem;
    border-top-width: 1px;
}

.story-chain-strip.is-overview .story-chain-kicker {
    font-size: 0.74rem;
}

.story-chain-stage {
    scroll-margin-top: 5.5rem;
}

.story-chain-shell .article-map {
    margin-top: 0.5rem;
}

/* The overview marks the newest step in red, as the timeline under it does. */
.story-chain-strip.is-overview .story-chain-step.is-latest .story-chain-dot {
    border-color: var(--news-accent, #b42318);
    background: var(--news-accent, #b42318);
}
