/* Case study layout: a single column. The intro holds the facts; each story
   section sets its heading beside its text. Use with theme-dark.css. */

.cs {
  /* One inner padding for every outlined cell, so text in stacked boxes
     starts on the same vertical line. */
  --cell: 24px 28px;
  padding-top: 16px;
}

/* ---------- Intro ---------- */
.cs-intro {
  padding: 8px 0 48px;
}
.cs-intro .back-link {
  margin: 0 0 40px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.cs-intro .back-link:hover {
  color: var(--ink);
}
.cs-intro .eyebrow {
  margin-bottom: 20px;
}
.cs-intro h1 {
  max-width: 18ch;
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.05;
}
.cs-intro .case-subtitle {
  margin-top: 20px;
  color: var(--muted);
}
/* Facts in a hairline row, then the headline number. */
/* Same three columns and inset as the number cells below, so both rows
   line up. */
.cs-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 48px 0 0;
  border-top: 1px solid var(--line);
}
.cs-meta > div {
  padding: var(--cell);
}
.cs-meta dt {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-meta dd {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}
/* The three headline numbers, in outlined cells. */
.cs-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}
.cs-highlights > div {
  padding: var(--cell);
}
.cs-highlights > div + div {
  border-left: 1px solid var(--line);
}
.cs-highlights strong {
  display: block;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.cs-highlights span {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.cs-cover {
  margin: 0 0 24px;
}
.cs .cs-cover--natural .image-button {
  aspect-ratio: auto;
}
.cs .cs-cover--natural img {
  height: auto;
}
.cs-cover .image-button,
.cs-crop .image-button {
  aspect-ratio: 16 / 10;
}
.cs-cover img,
.cs-crop img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.cs .story-section.cs-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  gap: 40px clamp(32px, 4vw, 64px);
  margin: 0;
  padding: 88px 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.cs-section__head {
  grid-column: 1;
}
/* Subsections get extra room above, so each reads as its own part. */
.cs .cs-section > .cs-section__head:not(:first-child),
.cs .cs-section > .cs-section__head:not(:first-child) + * {
  margin-top: 32px;
}
.cs-section__body,
.cs-checks {
  grid-column: 2;
}
.cs-steps,
.cs-wide {
  grid-column: 1 / -1;
}
.cs-section__head .eyebrow {
  margin-bottom: 16px;
}
.cs-section__head h2 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}
/* The section's key message, as the first line of its description. */
.cs-section__body .cs-lead {
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.cs-section__head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cs-section__body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body-text);
}
.cs-section__body strong {
  color: var(--ink);
  font-weight: 500;
}
/* Images get extra room above and below, so they don't crowd the text. */
.cs-wide {
  margin: 32px 0;
}
.cs .evidence figcaption {
  margin-top: 14px;
}

/* Steps: outlined cells joined by arrows. */
/* One equal column per step, however many steps a project has. */
.cs-steps {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
}
.cs-steps li {
  position: relative;
  padding: var(--cell);
}
.cs-steps li + li {
  margin-top: 0;
  border-left: 1px solid var(--line);
}
.cs-steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -11px;
  z-index: 1;
  width: 22px;
  text-align: center;
  background: var(--paper);
  color: var(--muted);
  transform: translateY(-50%);
}
.cs-steps span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-steps strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 16px;
  font-weight: 500;
}
.cs-steps p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* Role: facts beside a checklist of responsibilities, in one outlined block. */
.cs-role {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  border: 1px solid var(--line);
}
.cs-role__facts {
  margin: 0;
  border-right: 1px solid var(--line);
}
.cs-role__facts > div {
  padding: var(--cell);
}
.cs-role__facts > div + div {
  border-top: 1px solid var(--line);
}
.cs-role__facts dt,
.cs-role__list > p {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-role__facts dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.cs-role__list {
  padding: var(--cell);
}
.cs-role__list > p {
  margin-bottom: 14px;
}
/* Checklists ignore the older .story-section list spacing. */
.cs .story-section .cs-checks {
  margin: 0;
  padding: 0;
}
.cs-role .cs-checks li {
  font-size: 14px;
}
.cs-role .cs-checks li + li {
  margin-top: 8px;
}

/* The brief: challenge, problem statement and goal, side by side. */
.cs-brief {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}
.cs-brief > div {
  padding: var(--cell);
}
.cs-brief > div + div {
  border-left: 1px solid var(--line);
}
.cs-brief span,
.cs-feature__head span,
.cs-quote cite {
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-brief p {
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}

.cs-brief--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cs-brief strong {
  display: block;
  margin-top: 12px;
  font-size: 17px;
  font-weight: 500;
}
.cs-brief strong + p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

/* Key features: name and summary on the left, a checklist on the right. */
.cs-feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  gap: 24px clamp(32px, 4vw, 64px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.cs-feature .cs-checks {
  grid-column: 2;
}
.cs-feature__head h3 {
  margin: 12px 0 6px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.cs-feature__head p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* A real quote from research. */
.cs-quote {
  grid-column: 2;
  margin: 0;
  padding: 4px 0 4px 24px;
  border-left: 1px solid var(--ink);
}
.cs-quote p {
  margin: 0 0 12px;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* Personas: set apart from the story on a tinted panel, two cards side by
   side, each led by a circular photo. */
.cs-personas {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.cs-personas > article {
  padding: var(--cell);
  border: 1px solid var(--line);
  background: var(--paper);
}
.cs-personas span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-personas__who {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.cs-personas__who img {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: center 25%;
}
.cs-personas__who .cs-personas__meta {
  margin: 0;
}
.cs-personas strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.cs-personas .cs-personas__meta {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.cs-personas blockquote {
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 1px solid var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}
.cs-personas__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0 0 20px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.cs-personas__facts dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-personas__facts dd {
  margin: 4px 0 0;
  font-size: 14px;
}
.cs-personas h4 {
  margin: 20px 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs .cs-personas ul {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-text);
}
.cs .cs-personas li + li {
  margin-top: 6px;
}
.cs-personas p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-text);
}

/* Numbered takeaways. */
.cs-takeaways {
  grid-column: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: takeaway;
}
.cs .cs-takeaways li {
  position: relative;
  margin: 0;
  padding-left: 44px;
  counter-increment: takeaway;
}
.cs .cs-takeaways li + li {
  margin-top: 24px;
}
.cs-takeaways li::before {
  content: counter(takeaway, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
.cs-takeaways strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
}
.cs-takeaways p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-text);
}

/* A single headline number: figure and note side by side. */
.cs-highlights--one {
  grid-template-columns: 1fr;
}
.cs-highlights--one > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  align-items: center;
}
.cs-highlights--one span {
  margin: 0;
  font-size: 14px;
}

/* A phone screenshot, kept narrow in the text column. */
.cs .cs-narrow {
  grid-column: 2;
  max-width: 360px;
  margin: 32px 0;
}
.cs .pair.cs-wide {
  margin: 32px 0;
}

/* Findings: what leaders said, beside what was designed in response. */
.cs-findings {
  grid-column: 2;
}
.cs-findings__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.cs-findings__row > :last-child {
  grid-column: 3;
}
.cs-findings__row:not(.cs-findings__labels)::before {
  content: "→";
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
}
.cs-findings__row > :first-child {
  grid-column: 1;
  grid-row: 1;
}
.cs-findings__row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
.cs-findings__row p:first-child {
  color: var(--ink);
}
.cs-findings__row p:last-child {
  color: var(--body-text);
}
.cs-findings__row strong {
  font-weight: 500;
  color: var(--ink);
}
/* Column labels start at the top, level with the subheading beside them. */
.cs-findings__labels {
  padding: 0 0 14px;
}
.cs-findings__labels span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.cs-section__body .cs-note {
  font-size: 14px;
  color: var(--muted);
}

/* Closing link back to the work grid. */
.cs-end {
  padding: 40px 0 96px;
  border-top: 1px solid var(--line);
}
.cs-end .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.cs-end a {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}
.cs-end a:hover {
  color: var(--muted);
}

/* Checklist. */
.cs-checks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-checks li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-text);
}
.cs-checks li + li {
  margin-top: 14px;
}
.cs-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ink);
}

@media (max-width: 960px) {
  .cs-brief--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cs-brief--four > div:nth-child(3) {
    border-left: 0;
  }
  .cs-brief--four > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .cs .story-section.cs-section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 64px 0;
  }
  .cs-section__head,
  .cs-section__body,
  .cs-checks,
  .cs-findings,
  .cs-quote,
  .cs-takeaways,
  .cs-feature .cs-checks {
    grid-column: 1;
  }
  .cs-feature {
    grid-template-columns: 1fr;
  }
  .cs .cs-narrow {
    grid-column: 1;
  }
  .cs-role {
    grid-column: 1;
  }
}
@media (max-width: 640px) {
  .cs-meta {
    grid-template-columns: 1fr;
  }
  .cs-meta > div {
    padding-block: 12px;
  }
  .cs-highlights {
    grid-template-columns: 1fr;
  }
  .cs-highlights--one > div {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cs-brief,
  .cs-personas {
    grid-template-columns: 1fr;
  }

  .cs-role {
    grid-template-columns: 1fr;
  }
  .cs-role__facts {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .cs-brief > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .cs-highlights > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .cs-findings__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cs-findings__row > :first-child,
  .cs-findings__row > :last-child {
    grid-column: 1;
    grid-row: auto;
  }
  .cs-findings__row::before {
    display: none;
  }
  .cs-findings__row p:last-child::before {
    content: "→ ";
    color: var(--muted);
  }
  .cs-findings__labels {
    display: none;
  }
  .cs-steps {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }
  .cs-steps li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .cs-steps li:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: auto;
    bottom: -12px;
    left: 24px;
    transform: none;
  }
}

/* Simplified architecture diagram: stacked rows of outlined boxes. */
.cs-arch {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  background: var(--card);
}
.cs-arch__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
  margin: 0 auto;
}
.cs-arch__row--four {
  max-width: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cs-arch__box {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}
.cs-arch__box--core {
  border-color: var(--pill);
}
.cs-arch__box span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-arch__box strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 500;
}
.cs-arch__box p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.cs-arch__arrow {
  margin: 6px 0;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 760px) {
  .cs-arch__row--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The cover sits right after the title, so it's in view when a page opens
   and the image transition from the home page lands where you can see it. */
.cs-intro .cs-cover {
  margin: 36px 0 0;
}

/* Journey maps: a timeline with one lane per person. Program manager steps
   sit above the line, Leader as Teacher steps below it. */
.cs-journey {
  --dot: 11px;
  --track: 56px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 150px repeat(4, minmax(0, 1fr));
  grid-template-rows: auto var(--track) auto;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
/* Lane labels, from the list's data attributes. */
.cs-journey::before,
.cs-journey::after {
  grid-column: 1;
  padding-right: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.cs-journey::before {
  content: attr(data-top);
  grid-row: 1;
  align-self: end;
}
.cs-journey::after {
  content: attr(data-bottom);
  grid-row: 3;
}
.cs-journey li {
  display: grid;
  grid-row: 1 / 4;
  grid-template-rows: subgrid;
  margin: 0;
}
.cs-journey li:nth-child(1) { grid-column: 2; }
.cs-journey li:nth-child(2) { grid-column: 3; }
.cs-journey li:nth-child(3) { grid-column: 4; }
.cs-journey li:nth-child(4) { grid-column: 5; }
/* The timeline, drawn one column at a time. */
.cs-journey li::before {
  content: "";
  grid-row: 2;
  grid-column: 1;
  align-self: center;
  border-top: 1px solid var(--pill);
}
.cs-journey--before li::before {
  border-top-style: dashed;
}
.cs-journey li:last-child::before {
  margin-right: 24px;
}
/* The step's point on the timeline. */
.cs-journey li::after {
  content: "";
  grid-row: 2;
  grid-column: 1;
  align-self: center;
  width: var(--dot);
  height: var(--dot);
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.cs-journey--after li::after {
  background: var(--ink);
}
.cs-journey li > div {
  position: relative;
  grid-column: 1;
  padding: 0 24px 0 22px;
}
.cs-journey .is-top > div {
  grid-row: 1;
  align-self: end;
}
.cs-journey .is-bottom > div {
  grid-row: 3;
}
/* A stem joins each step to its point. */
.cs-journey li > div::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2);
  height: calc((var(--track) - var(--dot)) / 2);
  border-left: 1px solid var(--pill);
}
.cs-journey .is-top > div::before {
  top: 100%;
}
.cs-journey .is-bottom > div::before {
  bottom: 100%;
}
.cs-journey .is-bottom > div {
  padding-top: 4px;
}
.cs-journey strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.cs-journey p {
  margin: 6px 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.cs-journey .is-top p {
  margin-bottom: 14px;
}
.cs-journey em {
  display: inline-block;
  padding: 3px 8px;
  border: 1px dashed var(--pill);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-journey--after em {
  border-style: solid;
  color: var(--ink);
}
.cs-journey .is-top em {
  margin-bottom: 14px;
}

/* On narrow screens the timeline runs down the page, and each step names
   its person. */
@media (max-width: 760px) {
  .cs-journey {
    display: block;
    position: relative;
  }
  .cs-journey::before,
  .cs-journey::after {
    content: none;
  }
  .cs-journey li {
    display: block;
    position: relative;
  }
  .cs-journey li + li {
    margin-top: 28px;
  }
  /* Each step draws the line down to the next one. */
  .cs-journey li::before {
    position: absolute;
    top: 6px;
    bottom: -34px;
    left: calc(var(--dot) / 2);
    align-self: auto;
    margin: 0;
    border-top: 0;
    border-left: 1px solid var(--pill);
  }
  .cs-journey--before li::before {
    border-left-style: dashed;
  }
  .cs-journey li:last-child::before {
    content: none;
  }
  .cs-journey li::after {
    position: absolute;
    top: 4px;
    left: 0;
    z-index: 1;
  }
  .cs-journey li > div,
  .cs-journey .is-bottom > div {
    padding: 0 0 0 28px;
  }
  .cs-journey li > div::before {
    content: none;
  }
  .cs-journey .sr-only {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 8px;
    clip: auto;
    display: block;
    overflow: visible;
    white-space: normal;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .cs-journey p,
  .cs-journey .is-top p {
    margin-bottom: 12px;
  }
  .cs-journey .is-top em {
    margin-bottom: 0;
  }
}
