/* ============================================
   CASE STUDY V2 — restrained neo-brutalism
   Loaded after case-study.css. Quiet, neutral stage for the work;
   colour lives only in small labels.
   ============================================ */

/* ---------- Hero ---------- */
.back-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2B2B2B;
}

.back-link + .case-hero { padding-top: 32px; }

.case-date {
  padding: 4px 10px;
  background: var(--label-yellow);
  border: 2px solid #2B2B2B;
  border-radius: 6px;
  color: #2B2B2B;
  font-weight: 700;
}

.case-hero-tags .tag {
  padding: 4px 12px;
  background: #fff;
  border-width: 1.5px;
  border-radius: 999px;
  box-shadow: none;
  font-size: 11px;
  color: #2B2B2B;
}

/* Project facts → one bordered row */
.inspect-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 40px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.inspect-item {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding: 20px 24px;
  background: transparent;
  border-right: var(--border-width) solid #2B2B2B;
}

.inspect-item:last-child { border-right: none; }

.inspect-key { font-size: 11px; }

.inspect-value {
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  line-height: 1.4;
}

/* ---------- Cover ---------- */
.case-cover .figma-image {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
}

.thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-cover .thumb-img { border-radius: calc(var(--radius-card) - 3px); }

/* Neutral placeholders (no more saturated blocks) */
.thumb-placeholder,
.thumb-yms, .thumb-legal, .thumb-way, .thumb-service, .thumb-lso,
.img-placeholder {
  background-color: #F7F7F4;
  background-image: radial-gradient(circle, #D8D8D2 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--ink);
}

.figma-image .img-placeholder { border: none; border-radius: 10px; }

/* ---------- Body: title left, content right ---------- */
.case-body {
  max-width: none;
  margin: 0;
  counter-reset: case-section;
}

.case-section {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 64px;
  padding: 56px 0;
  border-top: var(--border-width) solid #2B2B2B;
}

.case-section:first-child {
  border-top: none;
  padding-top: 0;
}

.case-section-head-inner {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.case-stage {
  padding: 3px 8px;
  border: 2px solid #2B2B2B;
  border-radius: 6px;
  background: var(--stage-bg, var(--label-green));
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.case-section-content > :first-child { margin-top: 0; }
.case-section-content > :last-child { margin-bottom: 0; }
.case-section-content p { max-width: 68ch; }

.case-body .figma-image {
  border-radius: 12px;
  overflow: visible;
}

/* Quotes: white cards with hard shadow */
.quote-card {
  background: #fff;
  border-width: var(--border-width);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.quote-card-label {
  display: inline-block;
  padding: 2px 8px;
  border: 1.5px solid #2B2B2B;
  border-radius: 6px;
  background: var(--label-cyan);
  color: #2B2B2B;
  font-size: 11px;
}

.quote-card p { font-style: normal; }

.weakness-item { border-radius: 12px; }

/* Values: one bordered strip */
.value-grid {
  gap: 0;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.value-card {
  border: none;
  border-right: var(--border-width) solid #2B2B2B;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.value-card:last-child { border-right: none; }

.value-number {
  background: var(--label-orange);
  border-width: 2px;
  border-radius: 6px;
}

/* Challenge frames */
.challenge-block {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
}

.challenge-label {
  color: #2B2B2B;
  text-decoration: underline;
  text-decoration-color: var(--selection-blue);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* ---------- More projects: bordered grid ---------- */
.more-projects-grid {
  gap: 0;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.project-card {
  border: none;
  box-shadow: none;
  transition: background 0.2s ease;
}

.project-card:nth-child(odd) { border-right: var(--border-width) solid #2B2B2B; }

.project-card:hover {
  transform: none;
  box-shadow: none;
  background: #FAFAF7;
}

.project-thumb {
  aspect-ratio: 4 / 3;
  margin: 24px 24px 0;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
}

.project-thumb .thumb-img { transition: transform 0.5s var(--ease); }
.project-card:hover .thumb-img { transform: scale(1.03); }

.project-info h3 { font-weight: 600; }

.project-tags .tag {
  padding: 4px 10px;
  border-width: 1.5px;
  border-radius: 999px;
  box-shadow: none;
  font-size: 10px;
  color: #2B2B2B;
}

/* ---------- Closing CTA: left-aligned row ---------- */
.cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: var(--section-padding);
  padding: 56px 0 var(--section-padding);
  border-top: var(--border-width) solid #2B2B2B;
  text-align: left;
}

.cta-section h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cta-section .btn {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .case-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0;
  }
  .case-section-head-inner { position: static; }
  .cta-section { flex-direction: column; align-items: flex-start; }

  .inspect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inspect-item:nth-child(2n) { border-right: none; }
  .inspect-item:nth-child(-n + 2) { border-bottom: var(--border-width) solid #2B2B2B; }

  .case-cover .figma-image { aspect-ratio: 4 / 3; }

  .value-card { border-right: none; border-bottom: var(--border-width) solid #2B2B2B; }
  .value-card:last-child { border-bottom: none; }

  .project-card:nth-child(odd) { border-right: none; border-bottom: var(--border-width) solid #2B2B2B; }
  .project-card:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  .project-thumb .thumb-img { transition: none; }
}

/* ============================================
   STORY COMPONENTS — shared by every case study
   ============================================ */

/* Stage colours (one per storytelling stage) */
.case-section[data-stage="start"]    { --stage-bg: var(--label-yellow); }
.case-section[data-stage="discover"] { --stage-bg: var(--label-cyan); }
.case-section[data-stage="found"]    { --stage-bg: var(--label-green); }
.case-section[data-stage="deep"]     { --stage-bg: var(--label-orange); }
.case-section[data-stage="breadth"]  { --stage-bg: #fff; }
.case-section[data-stage="outcome"]  { --stage-bg: var(--label-pink); }

/* Story map: the 0 → 1 outline at the top of the body */
.story-map {
  margin-bottom: 56px;
}

.story-map-title {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-map ol {
  display: grid;
  grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr));
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.story-map li + li { border-left: var(--border-width) solid #2B2B2B; }

.story-map a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px 18px;
  color: #2B2B2B;
  transition: background 0.2s ease;
}

.story-map a:hover { background: var(--label-yellow); }

.story-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.story-step-name { font-size: 15px; font-weight: 600; }
.story-step-sub  { font-size: 13px; color: var(--ink-light); line-height: 1.4; }

/* Lead sentence of a section */
.case-section-content .lead {
  font-size: 19px;
  line-height: 1.6;
  color: #2B2B2B;
  font-weight: 500;
}

/* Before / after */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 28px 0;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.compare-col { padding: 24px; }
.compare-col + .compare-col { border-left: var(--border-width) solid #2B2B2B; }
.compare-col--before { background: #F2F2EE; }

.compare-label,
.block-label {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare-col--after .compare-label {
  padding: 2px 8px;
  border: 1.5px solid #2B2B2B;
  border-radius: 6px;
  background: var(--label-green);
}

.compare ul,
.mvp ul { display: grid; gap: 10px; }

.compare li,
.mvp li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-light);
}

.compare li::before,
.mvp li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #2B2B2B;
  background: #fff;
}

.compare-col--after li::before { background: #2B2B2B; }

/* Finding → decision map */
.insight-map {
  margin: 28px 0;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  align-items: center;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.5;
}

.insight-row + .insight-row { border-top: 1.5px solid #2B2B2B; }

.insight-row--head {
  padding-top: 12px;
  padding-bottom: 12px;
  background: #F2F2EE;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.insight-arrow { text-align: center; font-weight: 700; }
.insight-decision { color: #2B2B2B; font-weight: 500; }

.insight-decision.is-missing {
  color: var(--ink-muted);
  font-weight: 400;
  font-style: italic;
}

/* Journey strip */
.journey {
  display: grid;
  grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.journey-step {
  position: relative;
  padding: 18px;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
}

.journey-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  background: var(--bg);
  z-index: 1;
}

.journey-when {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.journey-step strong { display: block; font-size: 16px; margin-bottom: 4px; }
.journey-step p { font-size: 14px; margin: 0; line-height: 1.5; }

/* MVP scope */
.mvp {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  margin: 28px 0;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
}

.mvp > div { padding: 22px 24px; }
.mvp > div + div { border-left: var(--border-width) solid #2B2B2B; background: #F2F2EE; }

/* Deep dive steps */
.deep-dive {
  margin: 28px 0;
  border-left: 3px solid #2B2B2B;
  counter-reset: dive;
}

.deep-step {
  position: relative;
  padding: 0 0 28px 28px;
  counter-increment: dive;
}

.deep-step:last-child { padding-bottom: 0; }

.deep-step::before {
  content: counter(dive);
  position: absolute;
  left: -15px;
  top: -2px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--label-orange);
  border: 2px solid #2B2B2B;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.deep-step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.deep-step p { margin-bottom: 12px; }

/* Showcase */
.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.showcase-item {
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
  overflow: hidden;
}

.showcase-item .img-placeholder {
  margin: 0;
  aspect-ratio: 4 / 3;
  border: none;
  border-bottom: var(--border-width) solid #2B2B2B;
  border-radius: 0;
}

.showcase-item h3 { margin: 16px 18px 6px; font-size: 16px; font-weight: 600; }
.showcase-item p { margin: 0 18px 18px; font-size: 14px; line-height: 1.55; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 28px 0;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat { padding: 22px 24px; }
.stat + .stat { border-left: var(--border-width) solid #2B2B2B; }

.stat-value {
  display: block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-light); line-height: 1.4; }

/* Who did what */
.contrib {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.contrib > div {
  padding: 20px 22px;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
}

.contrib > div:first-child { box-shadow: var(--shadow); }
.contrib p { margin: 0; font-size: 15px; }

/* Timeline (iterations / redesigns) */
.versions {
  display: grid;
  grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.version {
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
  overflow: hidden;
}

.version .img-placeholder {
  margin: 0;
  aspect-ratio: 4 / 3;
  border: none;
  border-bottom: var(--border-width) solid #2B2B2B;
  border-radius: 0;
}

.version-body { padding: 16px 18px; }
.version-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.version-body p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }

.fig-caption {
  margin: -20px 0 28px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Draft notes for Meng — remove (or set display:none) before publishing */
.draft-note {
  margin: 24px 0;
  padding: 16px 18px;
  background: #FFF7D6;
  border: 2px dashed #B8860B;
  border-radius: 12px;
}

.draft-note-label {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #8A6500;
}

.case-body .draft-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #5C4400;
  max-width: none;
}

.case-body .draft-note p + p { margin-top: 6px; }

/* Flip to hide every draft note at once */
body.hide-drafts .draft-note { display: none; }

@media (max-width: 768px) {
  .story-map ol { grid-template-columns: 1fr; }
  .story-map li + li { border-left: none; border-top: var(--border-width) solid #2B2B2B; }
  .compare, .mvp, .contrib { grid-template-columns: 1fr; }
  .compare-col + .compare-col,
  .mvp > div + div { border-left: none; border-top: var(--border-width) solid #2B2B2B; }
  .insight-row { grid-template-columns: 1fr; gap: 4px; }
  .insight-arrow { text-align: left; }
  .insight-row--head { display: none; }
  .journey, .versions { grid-template-columns: 1fr; }
  .journey-step:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -14px; transform: translateX(-50%); }
  .stat + .stat { border-left: none; border-top: var(--border-width) solid #2B2B2B; }
}

/* ---------- Real images ---------- */
.case-img { display: block; width: 100%; height: auto; border-radius: 10px; }
.img-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.case-section-content > .img-pair { margin: 28px 0; }
.case-section-content > .img-pair .case-img { border: var(--border-width) solid #2B2B2B; }
.showcase-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
  border-bottom: var(--border-width) solid #2B2B2B;
  background: #F4F4F4;
}

/* ---------- TL;DR strip under the hero ---------- */
.tldr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 48px;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tldr > div { padding: 20px 22px; }
.tldr > div + div { border-left: var(--border-width) solid #2B2B2B; }
.tldr-label {
  display: inline-block;
  padding: 2px 8px;
  border: 1.5px solid #2B2B2B;
  border-radius: 6px;
  background: var(--label-green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-body .tldr p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; }

/* ---------- Outcome in four parts ---------- */
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0; }
.outcome-card { background: #fff; border: var(--border-width) solid #2B2B2B; border-radius: 12px; padding: 20px 22px; }
.outcome-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.case-body .outcome-card > p { margin: 0; font-size: 15px; line-height: 1.55; }
.outcome-card .draft-note { margin: 12px 0 0; }

@media (max-width: 768px) {
  .tldr { grid-template-columns: 1fr; }
  .tldr > div + div { border-left: none; border-top: var(--border-width) solid #2B2B2B; }
  .outcome-grid { grid-template-columns: 1fr; }
}

/* Numbered decisions inside a section */
.case-section-content .decision-title { margin: 48px 0 12px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.case-section-content .lead + .decision-title { margin-top: 28px; }

/* ---------- Real screenshots ---------- */
.shot {
  margin: 28px 0;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
  overflow: hidden;
  background: #F2F2F0;
  box-shadow: var(--shadow);
}
.shot img { display: block; width: 100%; height: auto; }
.shot + .fig-caption { margin-top: -16px; }
.shot--narrow { max-width: 460px; }
.deep-step .shot { margin: 16px 0; }

.version-media,
.showcase-media {
  aspect-ratio: 4 / 3;
  border-bottom: var(--border-width) solid #2B2B2B;
  background: #F2F2F0;
  overflow: hidden;
}
.version-media img,
.showcase-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.showcase-media .img-placeholder { margin: 0; height: 100%; aspect-ratio: auto; border: none; border-radius: 0; }

/* ---------- Larger cards: version timeline + 2-up showcase ---------- */
.versions--rows {
  grid-template-columns: 1fr;
  gap: 20px;
}

.versions--rows .version {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  box-shadow: var(--shadow);
}

.versions--rows .version-media {
  aspect-ratio: 16 / 10;
  border-bottom: none;
  border-right: var(--border-width) solid #2B2B2B;
}

.versions--rows .version-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
}

.versions--rows .version-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border: 2px solid #2B2B2B;
  border-radius: 6px;
  background: var(--label-cyan);
  font-size: 12px;
}

.versions--rows .version-body p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.showcase--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.showcase--2 .showcase-media { aspect-ratio: 16 / 10; }

@media (max-width: 768px) {
  .versions--rows .version { grid-template-columns: 1fr; }
  .versions--rows .version-media { border-right: none; border-bottom: var(--border-width) solid #2B2B2B; }
  .showcase--2 { grid-template-columns: 1fr; }
}

/* Placeholder images inside the larger cards keep the same 16:10 frame */
.showcase--2 .showcase-item > .img-placeholder,
.versions--rows .version > .img-placeholder { aspect-ratio: 16 / 10; }
.versions--rows .version > .img-placeholder { border-bottom: none; border-right: var(--border-width) solid #2B2B2B; }
@media (max-width: 768px) {
  .versions--rows .version > .img-placeholder { border-right: none; border-bottom: var(--border-width) solid #2B2B2B; }
}

/* Odd number of cards: the last one spans the full row as a wide card */
@media (min-width: 769px) {
  .showcase--2 .showcase-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center;
  }
  .showcase--2 .showcase-item:last-child:nth-child(odd) > :first-child {
    grid-row: 1 / span 2;
    height: 100%;
    border-bottom: none;
    border-right: var(--border-width) solid #2B2B2B;
  }
  .showcase--2 .showcase-item:last-child:nth-child(odd) h3 { align-self: end; margin-top: 0; }
  .showcase--2 .showcase-item:last-child:nth-child(odd) p { align-self: start; }
}

/* NDA notice on confidential case studies */
.case-body .nda-note { margin: 0 0 32px; padding: 16px 20px; max-width: none; background: #fff; border: var(--border-width) solid #2B2B2B; border-radius: 12px; font-size: 15px; line-height: 1.6; }
.case-body .nda-note a { text-decoration: underline; }
.case-section-content .nda-note { margin: 32px 0 0; }

/* Short case studies: simple bullet list */
.case-section-content .short-list { margin: 0 0 32px; padding-left: 20px; }
.case-section-content .short-list li { margin: 0 0 10px; line-height: 1.6; max-width: 68ch; }

/* Secondary text link inside case studies (e.g. "Watch the demo video") */
.case-body .text-link { font-family: var(--font-body); font-weight: 600; color: #2B2B2B; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color 0.2s; }
.case-body .text-link:hover { text-decoration-color: var(--label-orange); }

/* ---------- Service App: phone screenshots in a row ---------- */
.phone-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 190px)); gap: 18px; margin: 20px 0 32px; }
.phone-row .shot, .phone-shot { margin: 0; border-radius: 16px; background: #fff; }
.phone-shot--single { max-width: 220px; justify-self: center; align-self: center; }
.deep-step .phone-row { margin: 16px 0 0; }
@media (max-width: 600px) { .phone-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

/* Service App: how the two ends of the system connect, with who designed each part */
.system-map { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; margin: 28px 0 32px; background: #fff; border: var(--border-width) solid #2B2B2B; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.system-side { padding: 20px 22px; }
.system-side ul { list-style: none; margin: 12px 0 0; padding: 0; }
.system-side li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1.5px solid #E6E6E1; font-size: 15px; line-height: 1.4; }
.system-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.system-links { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 20px 16px; border-left: 1.5px solid #2B2B2B; border-right: 1.5px solid #2B2B2B; background: #F2F2EE; font-size: 13px; font-weight: 600; text-align: center; max-width: 170px; }
.system-foot { grid-column: 1 / -1; margin: 0; padding: 12px 22px; border-top: 1.5px solid #2B2B2B; font-size: 14px; }
.owner { flex: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border: 1.5px solid #2B2B2B; border-radius: 999px; }
.owner--me { background: var(--label-yellow); }
.owner--sean { background: color-mix(in srgb, var(--label-cyan) 35%, #fff); }
@media (max-width: 768px) {
  .system-map { grid-template-columns: 1fr; }
  .system-links { max-width: none; border: none; border-top: 1.5px solid #2B2B2B; border-bottom: 1.5px solid #2B2B2B; }
}
.case-body .system-foot { max-width: none; }
.phone-shot--single { max-width: 180px; }
/* Odd number of outcome cards: the last one spans the full row */
.outcome-grid .outcome-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Jump nav: vertical rail on the left (js/case-nav-v2.js) ----------
   A column of short lines in the left margin, one per section; the current one is longer
   and darker. Where the margin is wide enough, the section names show next to the lines.
   On narrower screens, hover or keyboard focus opens them in a card. */
.case-jump {
  position: fixed; left: 12px; top: 50%; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 8px; border: var(--border-width) solid transparent; border-radius: 12px; background: transparent;
  transform: translate(-8px, -50%); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s, background .15s, border-color .15s, box-shadow .15s;
}
.case-jump.is-visible { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.case-jump a {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 4px; border-radius: 8px; text-decoration: none; color: #2B2B2B;
  font-family: var(--font-body); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.case-jump a::before {
  content: ""; flex: none; width: 16px; height: 2px; border-radius: 2px; background: #A8A8A2;
  transition: width .15s, background .15s;
}
.case-jump a.is-current::before { width: 28px; height: 3px; background: #2B2B2B; }
.case-jump a:hover::before { background: #2B2B2B; }
.case-jump .case-jump-label { max-width: 0; overflow: hidden; opacity: 0; color: #6B6B66; transition: opacity .15s; }
.case-jump a.is-current .case-jump-label { color: #2B2B2B; font-weight: 700; }
.case-jump:hover, .case-jump:focus-within { background: #fff; border-color: #2B2B2B; box-shadow: var(--shadow); }
.case-jump:hover .case-jump-label, .case-jump:focus-within .case-jump-label { max-width: 220px; opacity: 1; }
.case-jump a:hover .case-jump-label { color: #2B2B2B; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--label-orange); }
.case-jump a:focus-visible { outline: 2px solid #2B2B2B; outline-offset: 2px; }
/* Wide screens: the left margin has room, so the names are always visible */
@media (min-width: 1500px) {
  .case-jump .case-jump-label { max-width: 160px; opacity: 1; font-size: 13px; }
  .case-jump:hover, .case-jump:focus-within { background: transparent; border-color: transparent; box-shadow: none; }
}
@media (max-width: 1100px) { .case-jump { display: none; } }
@media (prefers-reduced-motion: reduce) { .case-jump, .case-jump a::before, .case-jump .case-jump-label { transition: none; } }
@media print { .case-jump { display: none; } }

/* ---------- Way to Drive: data charts and comparisons (built as HTML, not images) ---------- */
.chart-card { margin: 28px 0 32px; padding: 24px 26px 20px; background: #fff; border: var(--border-width) solid #2B2B2B; border-radius: 16px; box-shadow: var(--shadow); }
.chart-card .chart-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 4px; }
.chart-card h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.chart-card .chart-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5A5A5A; white-space: nowrap; }
.chart-card .chart-sub { margin: 0 0 14px; font-size: 14px; color: #5A5A5A; }
.chart-card .chart-group { margin: 16px 0 0; padding-bottom: 6px; border-bottom: 1.5px solid #E6E6E1; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5A5A5A; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 112px; align-items: center; gap: 16px; padding: 8px 0; }
.bar-row > span { font-size: 15px; line-height: 1.35; }
.bar-track { height: 16px; background: #F2F2EE; border-radius: 4px; }
.bar-fill { height: 100%; background: #2B2B2B; border-radius: 0 4px 4px 0; }
.bar-fill--soft { background: #9A9A94; }
.bar-val { text-align: right; font-size: 15px; font-weight: 700; white-space: nowrap; }
.bar-val small { margin-left: 6px; font-size: 12.5px; font-weight: 400; color: #5A5A5A; }
.chart-card .chart-take { margin: 16px 0 0; padding-top: 12px; border-top: 1.5px solid #2B2B2B; font-size: 15px; max-width: none; }
@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr 96px; gap: 6px 12px; }
  .bar-row > span { grid-column: 1 / -1; }
}

.comp-wrap { margin: 28px 0 32px; overflow-x: auto; background: #fff; border: var(--border-width) solid #2B2B2B; border-radius: 16px; box-shadow: var(--shadow); }
.comp-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.comp-table th, .comp-table td { padding: 12px 12px; border-bottom: 1.5px solid #E6E6E1; text-align: center; vertical-align: middle; }
.comp-table thead th { background: #F2F2EE; border-bottom: 1.5px solid #2B2B2B; font-size: 13px; font-weight: 600; line-height: 1.35; }
.comp-table thead th small { display: block; margin-bottom: 3px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5A5A5A; }
.comp-table th[scope="row"], .comp-table thead th:first-child { text-align: left; }
.comp-table th[scope="row"] b { display: block; font-size: 15px; }
.comp-table th[scope="row"] span { font-size: 12.5px; font-weight: 400; color: #5A5A5A; }
.comp-table .note { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; color: #5A5A5A; }
.comp-table .span-note { font-size: 13px; color: #5A5A5A; }
.comp-table tr.is-us th, .comp-table tr.is-us td { background: color-mix(in srgb, var(--label-yellow) 28%, #fff); border-bottom: none; }
.mark { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.mark--yes { background: #2B2B2B; color: #fff; }
.mark--part { border: 2px solid #2B2B2B; background: linear-gradient(90deg, #2B2B2B 50%, #fff 50%); }
.mark--no { color: #A8A8A2; font-size: 18px; }
.comp-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 12px 16px; border-top: 1.5px solid #2B2B2B; font-size: 13px; }
.comp-foot .k { display: inline-flex; gap: 8px; align-items: center; }
.comp-foot .take { margin-left: auto; font-size: 14px; font-weight: 600; }

.ab-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 24px; margin: 16px 0 32px; }
.ab-pair figure { margin: 0; }
.ab-pair .ab-label { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border: 1.5px solid #2B2B2B; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fff; }
.ab-pair figure:last-child .ab-label { background: var(--label-green); }
.awards-list { margin: 0 0 24px; padding: 0; list-style: none; border-top: 1.5px solid #2B2B2B; }
.awards-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1.5px solid #E6E6E1; font-size: 15px; }
.awards-list li b { font-weight: 600; }
.awards-list li .award-year { color: #5A5A5A; white-space: nowrap; }
.pull-quote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 4px solid #2B2B2B; font-size: 20px; line-height: 1.45; font-weight: 500; max-width: 40ch; }
.pull-quote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; font-weight: 400; color: #5A5A5A; }
/* Keep wide tables from stretching the layout on small screens; four phones sit in one row */
.case-section-content { min-width: 0; }
.comp-wrap { max-width: 100%; }
.phone-row:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .phone-row:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phone screenshots already carry their own device frame and rounded corners:
   show them whole — no extra border, no clipping, no background. */
.phone-row .shot.phone-shot, .phone-shot, .ab-pair .phone-shot {
  border: none; border-radius: 0; box-shadow: none; background: transparent; overflow: visible;
}
.phone-shot img { display: block; width: 100%; height: auto; }
.ab-pair .phone-shot img { filter: drop-shadow(0 2px 6px rgba(43,43,43,.12)); }
/* Detail pages: no file-name tag ("JPG · COVER") on top of images; captions sit below instead */
.case-cover .image-file-label, .case-body .image-file-label { display: none; }
/* Pull quote: a card with a large quotation mark and one highlighted phrase */
.case-body blockquote.pull-quote {
  position: relative; max-width: none; margin: 32px 0; padding: 28px 32px 24px 88px;
  background: #fff; border: var(--border-width) solid #2B2B2B; border-radius: 16px; box-shadow: var(--shadow);
  font-style: normal;
}
.case-body blockquote.pull-quote::before {
  content: "“"; position: absolute; left: 26px; top: 14px;
  font-family: var(--font-display); font-size: 72px; line-height: 1; color: #2B2B2B;
}
.case-body blockquote.pull-quote p { margin: 0; max-width: 34ch; font-size: 22px; line-height: 1.45; font-weight: 500; }
.case-body blockquote.pull-quote mark {
  background: color-mix(in srgb, var(--label-yellow) 45%, #fff); color: inherit; padding: 0 3px; border-radius: 2px;
}
.case-body blockquote.pull-quote cite {
  display: block; margin-top: 14px; font-family: var(--font-mono); font-style: normal; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: #5A5A5A;
}
@media (max-width: 640px) {
  .case-body blockquote.pull-quote { padding: 56px 20px 20px; }
  .case-body blockquote.pull-quote::before { left: 18px; top: 10px; font-size: 56px; }
  .case-body blockquote.pull-quote p { font-size: 19px; }
}
