/* ==========================================================================
   Case studies: the index (filters and cards) and the case study page. Blue Dial.
   Tokens, type and shared components come from redesign.css; no colour value lives here.
   Behaviour of the filters: assets/js/rd-case-studies.js.
   ========================================================================== */

/* ---------- Title band ---------- */
/* Tags under the client line: platform, industry, stage. */
.rd-cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }

/* Index: the count of case studies beside the opening line. */
.rd-cs-total { padding-left: 32px; border-left: 1px solid var(--rd-line); }
.rd-cs-total .rd-figure { margin-bottom: 16px; }

/* ---------- Index: filters ----------
   The shared rd-filter (redesign.css) with native radio buttons (rd-filter__chip). Tab moves between groups, arrow keys within one. */
.rd-filter[hidden], .rd-cs-list[hidden], .rd-cs-item[hidden], .rd-filter__empty[hidden] { display: none; }
.rd-cs-filters__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.rd-cs-filters__foot .rd-filter__status { margin: 0; }

/* ---------- Index: cards ----------
   A hairline grid of twelve linked cells: tags, title, the client in one line, one figure. */
.rd-cs-list { list-style: none; margin: 0; padding: 0; }
.rd-cs-item { display: flex; }
.rd-cs-card { flex: 1; }
.rd-cs-card__figure { display: block; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--rd-line); }
.rd-cs-card__num { display: block; margin-bottom: 8px; font-size: 48px; line-height: 48px; color: var(--rd-ink); }

/* Heading kept for screen readers where the site map gives a section no headline. */
.rd-cs-sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; white-space: nowrap; opacity: 0; }

/* ---------- Case study page ----------
   Each part: label and headline, then text on the left and its one picture or diagram on the right. */
.rd-cs-part__head { margin-bottom: 40px; }
.rd-cs-part__head .rd-h2 { max-width: 920px; }
.rd-cs-text { max-width: 560px; }
.rd-cs-text > * + * { margin-top: 24px; }
.rd-cs-text p { color: var(--rd-muted); }
/* Diagrams use the shared rd-diagram (redesign.css). */
.rd-cs-figures { margin-top: 56px; }

/* Next step: the link to the stage's service page sits in the sentence. */
.rd-cta .rd-eyebrow { margin-bottom: 16px; }

@media (max-width: 1080px) {
    .rd-cs-total { padding-left: 0; padding-top: 32px; border-left: 0; border-top: 1px solid var(--rd-line); }
}

@media (max-width: 860px) {
    .rd-cs-filters__foot { flex-direction: column; align-items: flex-start; }
    .rd-cs-part__head { margin-bottom: 24px; }
    .rd-cs-card__num { font-size: 40px; line-height: 40px; }
    .rd-cs-figures { margin-top: 32px; }
}
