/* ─────────────────────────────────────────
   Case study — shared
───────────────────────────────────────── */



/* Hero */
.cs-hero {
  padding: 80px 160px 0;
  display: grid;
  grid-template-columns: 1fr 405px;
  gap: 48px;
  align-items: start;
}

.cs-hero-left {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.cs-headline {
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  color: var(--pitch);
}

.cs-hero-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* Meta card */
.cs-meta-card {
  background: #ede9dc;
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 136px;
}

.cs-meta-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-meta-label {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: var(--pitch);
}

.cs-meta-value {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-tag {
  background: rgba(26, 24, 25, 0.10);
  color: var(--pitch);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Hero image */
.cs-hero-image-section {
  margin-top: 48px;
}

.cs-hero-image-bg {
  background: var(--chalk);
  border-radius: 24px;
  width: 1216px;
  margin: 0 auto;
  padding: 34px 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-hero-image {
  display: block;
  width: 1120px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.cs-caption {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--flint);
  text-align: center;
  max-width: 950px;
  margin: 0 auto;
}

.cs-caption--narrow {
  max-width: 654px;
}

/* Content sections */
.cs-content-section {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.cs-copy-block {
  width: 650px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-section-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--pitch);
}

.cs-copy-block p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

.cs-copy-block p.cs-section-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
}

/* "How this evolved" — a pinned aside on a linen panel. Its 650px text
   column aligns with .cs-copy-block; the linen bleeds 24px wider each side. */
.cs-evolved {
  width: 730px;
  max-width: 100%;
  background: var(--linen);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cs-evolved-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pitch);
}
.cs-evolved-pin {
  flex-shrink: 0;
}
.cs-evolved-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--pitch);
}
/* "View tradeoffs & iterations" link — opens the panel. Text + arrow.
   Resting: underlined pitch text. Hover: ember color, the underline bar
   wipes in left-to-right, and the arrow nudges out and back. */
.panel-link {
  align-self: flex-start;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.panel-link-text {
  position: relative;
}
.panel-link-text::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--pitch);
}
.panel-link-text::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: var(--ember);
  transition: width 0.25s ease;
}
.panel-link:hover {
  color: var(--ember);
}
.panel-link:hover .panel-link-text::after {
  width: 100%;
  right: auto;
  left: 0;
}
.panel-link-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}
.panel-link:hover .panel-link-arrow {
  animation: panel-arrow-bounce 0.4s ease;
}
@keyframes panel-arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
.panel-link:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 4px;
}
.cs-evolved > p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

.cs-image-block {
  width: 100%;
  max-width: 1216px;
}

.cs-image-block img {
  display: block;
  width: 100%;
  height: auto;
}

/* Image/onboarding row + caption pair: 8px between media and caption,
   48px between caption and the next element (content section gap is 40px) */
.cs-image-caption-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* Nara hero — H1 above, body + meta card side by side below */
.cs-hero-nara {
  padding: 80px 160px 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.cs-hero-nara .cs-headline {
  max-width: 667px;
}

.cs-hero-nara-row {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.cs-hero-nara-row .cs-hero-body {
  width: 667px;
  flex-shrink: 0;
}

.cs-hero-nara-row .cs-meta-card {
  margin-top: 0;
  width: 405px;
  flex-shrink: 0;
}

/* Phone hero — 3 phones in a row inside chalk card */
.cs-hero-image-bg--phones {
  flex-direction: column;
  padding: 48px 48px 48px;
  gap: 24px;
}

.cs-phones-hero-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 9px;
}

.cs-phone-img {
  width: 366px;
  height: auto;
  display: block;
}

/* Phone content row — 2 large phones side by side */
.cs-phones-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: flex-start;
}

.cs-phone-large {
  width: 393px;
  height: auto;
  display: block;
}

/* ButcherBox hero card — desktop + overlapping mobile */
.cs-bb-hero-card {
  padding: 64px 48px 48px;
}

.cs-bb-images {
  position: relative;
  width: 100%;
}

.cs-bb-desktop {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0px 16px 48px 0px rgba(0, 0, 0, 0.16);
}

.cs-bb-mobile {
  position: absolute;
  width: 250px;
  height: auto;
  right: 0;
  top: 354px;
  box-shadow: 0px 16px 48px 0px rgba(0, 0, 0, 0.16);
}

/* Nara content flow — single flex column with 49px gap between all items */
.cs-content-flow {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 49px;
}

/* Watch card */
.cs-watch-card {
  width: 1216px;
  margin: 0 auto;
}

.cs-watch-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
}

.cs-watch-img {
  width: 258px;
  height: auto;
  display: block;
}

/* ButcherBox numbered list */
.cs-numbered-list {
  list-style: decimal;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* ButcherBox 3-phone row */
.cs-bb-phones-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 1218px;
  max-width: 100%;
}

.cs-bb-phones-row img {
  width: 406px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* Grapevine onboarding 3-image row */
.cs-onboarding-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.cs-onboarding-row img {
  width: 383px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* Closing copy */
.cs-closing-copy {
  margin: 80px auto 0;
  width: 650px;
}

.cs-closing-copy p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

.cs-closing-para {
  width: 650px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   Case study v2 — Primer (condensed headline,
   tagline, metric cards, consistent content flow)
───────────────────────────────────────── */
.cs2-hero {
  padding: 80px 0 0;
}

.cs2-hero-and-image {
  max-width: 1215px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

.cs2-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
  padding: 0 80px;
}

.cs2-headline {
  font-stretch: condensed;
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  color: var(--pitch);
}

.cs2-title-desc-metrics {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.cs2-title-desc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.cs2-tagline {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--pitch);
}

.cs2-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs2-body p {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--pitch);
}

.cs2-metrics {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cs2-metric {
  background: var(--linen);
  border-radius: 16px;
  padding: 16px 32px;
  display: flex;
  flex-direction: column;
  flex: 1 0 0;
  min-width: 0;
}

.cs2-metric-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cs2-metric-value {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--pitch);
  white-space: nowrap;
}

.cs2-metric-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.cs2-metric-label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--pitch);
}

/* Hero image — wide breakout card */
.cs2-hero-image-card {
  background: var(--chalk);
  border-radius: 24px;
  width: 100%;
  height: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cs2-hero-image-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2240 / 1344;
  object-fit: cover;
}

.cs2-hero-caption {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--flint);
  text-align: center;
  max-width: 950px;
}

/* Content flow — consistent 48px gap between every block */
.cs2-flow {
  margin-top: 48px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.cs2-image-group {
  width: 100%;
}

.cs2-image-group img,
.cs2-flow-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Flow figure: an image (or media row) paired with a caption below it */
.cs2-figure {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Pull the caption up into the image's transparent shadow tail (~22–30px)
   so it sits closer to the visible card */
.cs2-figure .cs2-cap {
  margin-top: -12px;
}

/* A paragraph block following an image+caption gets 16px more top spacing */
.cs2-flow .cs2-figure + .cs-copy-block {
  margin-top: 16px;
}

.cs2-figure > img {
  display: block;
  width: 100%;
  height: auto;
}

/* Autoplay/loop demo video — full-width like the figure images, with the
   Primer card shadow applied in CSS (the recording has square corners) */
.cs2-video {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.25);
}

/* The caption's -12px pull is meant for images whose shadow is baked into a
   transparent tail; the video's shadow is real CSS, so give the caption room */
.cs2-figure:has(.cs2-video) .cs2-cap {
  margin-top: 32px;
}

.cs2-cap {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--flint);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* Problem statements — set apart from feature copy in a Linen card.
   32px margin + the 48px flow gap = 80px of separation above and below each card. */
.cs2-problem-card {
  background: var(--linen);
  border-radius: 32px;
  padding: 64px;
  width: 778px; /* 650px content + 64px padding each side */
  max-width: 100%;
  margin-top: 32px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs2-problem-eyebrow {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.28px;
  text-transform: uppercase;
  color: var(--pitch);
}

.cs2-problem-title {
  font-stretch: condensed;
  font-size: 32px; /* H2 */
  font-weight: 700;
  line-height: 1.4;
  color: var(--pitch);
}

.cs2-problem-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs2-problem-body p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* Copy stays left-aligned within the 650px content area */
.cs2-problem-eyebrow,
.cs2-problem-title,
.cs2-problem-body {
  text-align: left;
}

/* Copy blocks inside cs2-flow (Primer, Nara) inherit the base treatment
   used by Grapevine/ButcherBox: 24px section titles and a uniform 24px
   gap between title and paragraphs. No per-flow overrides. */

/* Generic 1215px centering wrapper (for hero blocks that aren't
   merged into a single gap-driven flex column, e.g. Nara) */
.cs2-center-1215 {
  max-width: 1215px;
  margin: 0 auto;
  width: 100%;
}

.cs2-hero-image-wrap {
  margin-top: 64px;
}

/* Narrower content flow (Nara: 826px instead of Primer's 1024px) */
.cs2-flow--narrow {
  max-width: 826px;
}

/* Two centered phone screenshots side by side */
.cs2-phone-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.cs2-phone-row img {
  width: 384px;
  max-width: 45%;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* Inline semibold span */
.cs-body-semibold {
  font-weight: 600;
}

/* Side-by-side image pair (e.g. two phone screenshots) */
.cs2-image-pair {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

.cs2-image-pair img {
  flex: 1 0 0;
  min-width: 0;
  display: block;
  width: 100%;
  height: auto;
}

/* Research learning + design outcome sub-blocks inside a section.
   The section title and each sub-block are children of .cs-copy-block (24px
   gap); inside a sub-block the label hugs its paragraphs at 8px. */
.cs2-research-outcome {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs2-research-outcome .cs2-ro-label {
  font-weight: 600;
  color: var(--pitch);
}

/* Media group: an image, image pair, or watch grid with a caption below it */
.cs2-media {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cs2-media-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Wide media (e.g. the cards home shot) breaks out past the narrow column */
.cs2-media--wide {
  width: 1110px;
  max-width: calc(100vw - 32px);
}

/* Two-phone composites cap at their natural width and centre */
.cs2-media-img--sm {
  max-width: 826px;
}

/* Apple Watch 2x2 composite is smaller */
.cs2-media-img--watch {
  max-width: 556px;
}

/* Apple Watch 2x2 image grid */
.cs2-watch-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 556px;
  margin: 0 auto;
}

.cs2-watch-row {
  display: flex;
  gap: 40px;
  justify-content: center;
}

.cs2-watch-row img {
  width: 258px;
  height: auto;
  display: block;
}

/* Hero image — multi-phone row (desktop) vs single phone (mobile) */
.cs2-hero-phones-row {
  display: flex;
  gap: 9px;
  width: 100%;
}

.cs2-hero-phones-row img {
  flex: 1 0 0;
  min-width: 0;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1119 / 2052;
  object-fit: cover;
}

.cs2-hero-phones-row--mobile {
  display: none;
}

/* Case-study hero lockup — display tagline (H2) with the paragraph and a
   vertical metric-card stack beside it. Shared across every case study hero. */
.cs2-hero--split .cs2-title-desc-metrics {
  gap: 24px;
}

.cs2-tagline--display {
  font-stretch: condensed;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 760px;
}

.cs2-lead-row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

.cs2-lead-row .cs2-body {
  flex: 1 1 0;
  min-width: 0;
}

.cs2-metrics--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  flex-shrink: 0;
  width: max-content;
}

.cs2-metrics--stack .cs2-metric {
  flex: 0 0 auto;
  width: 100%;
}

/* Problem card variant with an outcomes list (teacher problem) */
.cs2-problem-card--outcomes {
  gap: 32px;
}

.cs2-problem-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs2-outcomes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs2-outcomes-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.12px;
  text-transform: uppercase;
  color: var(--pitch);
}

.cs2-outcomes-list {
  list-style: disc;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs2-outcomes-list li {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

@media (max-width: 768px) {
  .cs2-hero-phones-row--desktop {
    display: none;
  }
  .cs2-hero-phones-row--mobile {
    display: flex;
  }

  .cs2-metric {
    padding: 16px;
  }

  .cs2-phone-row {
    gap: 16px;
  }
  .cs2-phone-row img {
    max-width: 48%;
  }

  .cs2-image-pair {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .cs2-image-pair img {
    width: 280px;
    flex: none;
  }

  .cs2-watch-grid {
    width: 100%;
    gap: 0;
  }
  .cs2-watch-row {
    gap: 0;
    width: 100%;
  }
  .cs2-watch-row img {
    width: 50%;
    flex: 1 0 0;
    height: auto;
  }
}

@media (max-width: 768px) {
  .cs2-hero {
    padding: 40px 16px 0;
  }
  .cs2-hero-and-image {
    gap: 32px;
  }
  .cs2-hero-inner {
    gap: 24px;
    padding: 0;
  }
  .cs2-title-desc-metrics {
    gap: 24px;
  }
  .cs2-title-desc {
    gap: 16px;
  }
  .cs2-headline {
    font-size: 48px;
  }
  .cs2-tagline {
    font-size: 22px;
  }
  .cs2-body p {
    font-size: 18px;
  }
  .cs2-metrics {
    flex-direction: column;
    align-items: stretch;
  }
  .cs2-metric {
    width: 100%;
    flex: 1 0 auto;
  }
  .cs2-metric-value,
  .cs2-metric-row p {
    font-size: 18px;
  }

  .cs2-hero-image-card {
    width: 100%;
    height: auto;
    padding: 32px 16px;
  }

  .cs2-flow {
    margin-top: 32px;
    max-width: none;
    padding: 0 16px;
    gap: 48px;
  }
  .cs2-flow .cs-copy-block {
    width: 100%;
  }
  .cs2-flow .cs-section-title {
    font-size: 22px;
  }
  .cs2-flow .cs-copy-block p {
    font-size: 18px;
  }

  .cs2-problem-card {
    padding: 32px 24px;
    border-radius: 24px;
  }
  .cs2-problem-title {
    font-size: 32px;
  }
  .cs2-problem-body p {
    font-size: 18px;
  }

  /* Legacy cs- content sections (ButcherBox, Grapevine) */
  .cs-hero-image-section {
    margin-top: 32px;
    padding: 0 16px;
  }
  .cs-hero-image-bg {
    width: 100%;
    padding: 24px 16px;
  }
  .cs-caption {
    max-width: 100%;
  }

  .cs-content-section {
    margin-top: 32px;
    padding: 0 16px;
    gap: 32px;
  }
  .cs-copy-block,
  .cs-closing-copy,
  .cs-closing-para {
    width: 100%;
  }
  .cs-section-title {
    font-size: 22px;
  }
  .cs-copy-block p,
  .cs-closing-copy p,
  .cs-numbered-list {
    font-size: 18px;
  }

  .cs-bb-phones-row,
  .cs-onboarding-row {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px;
  }
  .cs-bb-phones-row img,
  .cs-onboarding-row img {
    width: 240px;
  }
}

@media (max-width: 768px) {
  /* Primer hero — collapse the paragraph/metrics split into a stack */
  .cs2-tagline--display {
    font-size: 28px;
  }
  .cs2-lead-row {
    flex-direction: column;
    gap: 24px;
  }
  .cs2-metrics--stack {
    width: 100%;
  }
  .cs2-outcomes-list li {
    font-size: 18px;
  }
}

/* ─────────────────────────────────────────
   Slide-out panel
───────────────────────────────────────── */
.panel-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
.panel-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 880px;
  max-width: 100%;
  background: var(--plaster);
  border-left: 1px solid var(--shale);
  box-shadow:
    -10px 0 21px 0 rgba(0, 0, 0, 0.10),
    -39px 0 39px 0 rgba(0, 0, 0, 0.09),
    -88px 0 53px 0 rgba(0, 0, 0, 0.05),
    -156px 0 62px 0 rgba(0, 0, 0, 0.01);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
  z-index: 201;
  display: flex;
  flex-direction: column;
}
.panel.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px 24px 64px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.panel-header.scrolled {
  background: var(--plaster);
  border-bottom-color: var(--shale);
}
.panel-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--pitch);
}
.panel-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--pitch);
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}
.panel-close:hover {
  opacity: 0.6;
}
.panel-close:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  background: var(--plaster);
  padding: 32px 64px 64px;
}

/* Panel content — "Tradeoffs & iterations" timeline */
.panel-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.panel-divider {
  width: 100%;
  height: 1px;
  background: var(--shale);
}
.panel-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-block p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}
.panel-block .panel-date {
  font-weight: 600;
  line-height: 1.5;
}
.panel-shot {
  display: block;
  width: 100%;
  height: auto;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.10),
    0 9px 9px rgba(0, 0, 0, 0.09),
    0 21px 13px rgba(0, 0, 0, 0.05);
}

/* Lock page scroll while the panel is open */
:root.panel-open {
  overflow: hidden;
}

/* Below 880px, the panel is 95% of the screen width */
@media (max-width: 879px) {
  .panel {
    width: 95%;
  }
}

/* Mobile body size (18px) for the "How this evolved" card + panel text.
   Placed at end so it wins over the panel base rules above. */
@media (max-width: 768px) {
  .cs-evolved > p,
  .panel-title,
  .panel-date,
  .panel-block p {
    font-size: 18px;
  }
  .panel-header {
    padding: 20px 20px 20px 24px;
  }
  .panel-body {
    padding: 24px 24px 48px;
  }
}
