/* Case study page: a centred article. Label, title and subheading, one large
   photograph, then a single reading column down the middle. On wide screens
   the margins carry the programme facts (left) and a purple reading line
   (right). Inter set light and tight like the homepage. */
.cs-page {
  --cs-ink: #251b30;
  --cs-text: #4d4a58;
  --cs-muted: #64647d;
  --cs-purple: #5f3c91;
  --cs-line: rgba(37, 27, 48, .13);
  --cs-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cs-gutter: clamp(1.25rem, 5vw, 4rem);
  --cs-max: 60rem;
  --cs-column: 47rem;
  background: #fff;
  color: var(--cs-ink);
}
.cs-page main,
.cs-page .site-footer { background: #fff; }
.cs-page .site-footer { --footer-ground: #fff; }
.cs-page :focus-visible { outline: 2px solid var(--cs-purple); outline-offset: 4px; }
.cs-skip { position: fixed; z-index: 100; top: -6rem; left: 1rem; padding: .8rem 1.2rem; background: var(--cs-purple); color: #fff; }
.cs-skip:focus { top: 1rem; }

.cs { padding: clamp(6.5rem, 10vw, 8.5rem) 0 clamp(5rem, 9vw, 8rem); font-family: var(--cs-sans); }
.cs h1, .cs h2, .cs h3 { font-family: var(--cs-sans) !important; }
/* Titles, subheadings and quotes follow the shared site typography. */
.cs .cs-head h1,
.cs .cs-sub,
.cs .cs-quote blockquote p { font-family: var(--font-display, var(--cs-sans)) !important; }
.cs figure { margin: 0; }
.cs figure img { display: block; width: 100%; height: 100%; object-fit: cover; background: #e9e4ee; }
.cs-wrap { box-sizing: content-box; max-width: var(--cs-max); margin-inline: auto; padding-inline: var(--cs-gutter); }

/* Title, centred */
.cs-head { text-align: center; }
.cs-back { display: flex; width: fit-content; margin-right: auto; align-items: center; gap: .55rem; min-height: 36px; color: var(--cs-muted); font-size: .92rem; font-weight: 500; text-decoration: none; }
.cs-back span { transition: transform .25s ease; }
.cs-back:hover { color: var(--cs-purple); }
.cs-back:hover span { transform: translateX(-4px); }
.cs-label { margin: clamp(1.6rem, 3vw, 2.4rem) 0 0; color: var(--cs-purple); font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.cs-head h1 { max-width: 16ch; margin: 1rem auto 0; color: var(--cs-ink); font-size: clamp(2.5rem, 4.6vw, 4.1rem); font-weight: 400; line-height: 1.08; letter-spacing: 0; text-wrap: balance; }
.cs-sub { max-width: 36rem; margin: 1.3rem auto 0; color: var(--cs-ink); font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-weight: 600; line-height: 1.35; letter-spacing: 0; text-wrap: balance; }

/* The large photograph under the title */
.cs-hero { margin: clamp(2.2rem, 4.5vw, 3.5rem) auto 0 !important; }
.cs-hero img { aspect-ratio: 16 / 9; }

/* The story: a centred column about four-fifths of the photograph's width,
   with the page's side margins (outside the photograph) for the programme
   details on the left and the reading line on the right. */
.cs-body { display: grid; grid-template-columns: minmax(0, 1fr) min(var(--cs-max), 100% - 2 * var(--cs-gutter)) minmax(0, 1fr); }
.cs-text { grid-column: 2; grid-row: 1; width: 100%; max-width: var(--cs-column); justify-self: center; }
.cs-text section, .cs-text h2 { scroll-margin-top: 6rem; }

/* The opening sentence: larger and in brand purple, so it reads as the
   standfirst before the story begins */
.cs-lead { margin: clamp(3rem, 6vw, 4.5rem) 0 0; padding-bottom: clamp(2.2rem, 4vw, 3rem); border-bottom: 1px solid var(--cs-line); color: var(--cs-purple); font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 400; line-height: 1.42; letter-spacing: -.022em; text-wrap: pretty; }
.cs-text section { margin-top: clamp(3rem, 6vw, 4.5rem); }
.cs-text h2 { margin: 0 0 1.1rem; color: var(--cs-ink); font-size: clamp(1.5rem, 2.1vw, 1.9rem); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; }
.cs-text h3 { margin: 1.6rem 0 .45rem; color: var(--cs-ink); font-size: 1rem; font-weight: 600; line-height: 1.4; }
.cs-text section p { margin: 0 0 1.15em; color: var(--cs-text); font-size: clamp(.98rem, 1.05vw, 1.04rem); line-height: 1.75; }
.cs-text section ul { display: grid; gap: .55rem; margin: 0 0 1.3em; padding: 0 0 0 1.2rem; color: var(--cs-text); font-size: clamp(.98rem, 1.05vw, 1.04rem); line-height: 1.65; }
.cs-text section li::marker { color: var(--cs-purple); }

/* Photographs inside the story */
.cs-image { margin-top: clamp(3rem, 6vw, 4.5rem) !important; }
.cs-image img { aspect-ratio: 3 / 2; }

/* A participant's words */
.cs-quote { margin-top: clamp(3rem, 6vw, 4.5rem) !important; padding-left: clamp(1.2rem, 2.5vw, 2rem); border-left: 2px solid var(--cs-purple); }
.cs-quote blockquote { margin: 0; }
.cs-quote blockquote p { margin: 0; color: var(--cs-ink); font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 400; line-height: 1.45; letter-spacing: 0; }
.cs-quote figcaption { margin-top: 1.1rem; color: var(--cs-purple); font-size: .95rem; font-weight: 600; }

/* Three headline figures */
.cs-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); margin: clamp(3rem, 6vw, 4.5rem) 0 0; padding: 0; list-style: none; }
.cs-figures li { min-width: 0; padding-top: 1.1rem; border-top: 1px solid var(--cs-line); }
.cs-figures b { display: block; color: var(--cs-purple); font-size: clamp(2.1rem, 3.6vw, 3.1rem); font-weight: 300; line-height: 1; letter-spacing: -.045em; }
.cs-figures span { display: block; margin-top: .6rem; color: var(--cs-text); font-size: .88rem; line-height: 1.45; }

/* Left margin: the programme details.
   It stays where it is; only the reading line follows the page. */
.cs-facts { grid-column: 1; grid-row: 1; align-self: start; width: min(13rem, 100% - 2.5rem); margin-top: clamp(3rem, 6vw, 4.5rem); padding-left: clamp(1.5rem, 2.5vw, 2.5rem); }
.cs-facts dl { margin: 0; }
.cs-facts dl div { padding: .8rem 0; border-top: 1px solid var(--cs-line); }
.cs-facts dt { color: var(--cs-muted); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.cs-facts dd { margin: .3rem 0 0; color: var(--cs-ink); font-size: .88rem; line-height: 1.4; }

/* Right margin: a thin line that fills purple as the story is read */
.cs-progress { grid-column: 3; grid-row: 1; justify-self: center; align-self: start; position: sticky; top: 7rem; width: 2px; height: min(18rem, 40vh); margin-top: clamp(3rem, 6vw, 4.5rem); background: var(--cs-line); }
.cs-progress span { display: block; height: 100%; background: var(--cs-purple); transform: scaleY(0); transform-origin: top; }

/* Below this width the margins are too narrow to hold anything: the details
   sit above the story, and the reading line goes. */
@media (max-width: 1320px) {
  .cs-body { grid-template-columns: min(var(--cs-column), 100% - 2 * var(--cs-gutter)); justify-content: center; }
  .cs-text, .cs-facts { grid-column: 1; grid-row: auto; }
  .cs-facts { width: auto; padding-left: 0; }
  .cs-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
  .cs-progress { display: none; }
}

@media (max-width: 560px) {
  .cs-hero img { aspect-ratio: 4 / 3; }
  .cs-figures b { font-size: 2rem; }
  .cs-figures span { font-size: .82rem; }
}
