/* Case-page shared components: section TOC + body blocks */

/* ---------- layout: fixed left sidebar + body ---------- */

.case-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  column-gap: clamp(2rem, 4vw, 3rem);
}

.case-toc {
  border-right: 1px solid var(--hairline);
}

.case-toc-inner {
  position: sticky;
  top: 5.5rem;
}

.case-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.case-toc-list a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 44px;
  padding-block: 0.5rem;
  color: var(--ink);
  white-space: nowrap;
}

.case-toc-list a:hover .case-toc-title {
  opacity: 0.55;
}

.case-toc-num {
  color: var(--ink);
}

.case-toc-title {
  color: var(--ink);
  transition: opacity 0.25s ease;
}

.case-toc-list a.is-active .case-toc-num {
  color: #1a7f4b;
}

/* ---------- body ---------- */

.case-body {
  min-width: 0;
}

.case-section {
  scroll-margin-top: 4.5rem;
}

.case-section h2 {
  font-weight: 800;
}

.case-sec-index {
  margin-right: 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.case-section h3 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.case-sub {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

.case-sub:first-of-type {
  margin-top: 0;
}

/* problem cards */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-block: clamp(2rem, 5vw, 3rem);
}

.problem-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 6px;
}

.problem-card-eyebrow {
  margin: 0 0 0.875rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

.case-section .problem-card-title {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}

.problem-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #555555;
  max-width: 55ch;
}

.problem-card-mark {
  display: block;
  width: 64px;
  height: auto;
  margin-top: auto;
  padding-top: 1.5rem;
}

@media (max-width: 820px) {
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* product direction comparison */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  margin-block: clamp(2rem, 5vw, 3rem);
}

.compare-cap {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

.compare-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.65rem;
  font-family: var(--mono);
  font-size: 13px;
  color: #1a1a1a;
}

.compare-node {
  white-space: nowrap;
}

.compare-node--lost,
.compare-node--end {
  color: var(--case-accent, #6161FF);
}

.compare-arrow {
  flex: 0 0 auto;
  width: 22px;
  height: 1px;
  background: rgba(26, 26, 26, 0.15);
  position: relative;
}

.compare-arrow--break {
  width: 26px;
  background: transparent;
}

.compare-arrow--break::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 1px;
  background: var(--case-accent, #6161FF);
}

.compare-arrow--break::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 5px;
  height: 1px;
  background: var(--case-accent, #6161FF);
}

.compare-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--case-accent, #6161FF);
}

.compare-note {
  margin: 1.15rem 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: #666666;
}

@media (max-width: 820px) {
  .compare {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* decision blocks */
.case-section .decision-title {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}

.decision-rows {
  display: grid;
  row-gap: 22px;
}

.decision-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  column-gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start;
}

.decision-label {
  margin: 0;
  padding-top: 0.3rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

.decision-body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: #1a1a1a;
}

.decision-chain {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--case-accent, #6161FF);
}

.decision-rule {
  border: 0;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: clamp(2.25rem, 4vw, 3rem) 0 0;
}

.diagram-svg {
  width: min(65%, 340px);
  height: auto;
}

@media (max-width: 560px) {
  .decision-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

/* structure diagram (Decision 1) */
.structure-diagram {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.12);
  margin-block: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
  display: flex;
  flex-direction: column;
}

.structure-head {
  position: relative;
  height: 18px;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.sd-title {
  position: absolute;
  top: 0;
  font-family: var(--mono);
  font-size: clamp(8px, 2.6vw, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
  white-space: nowrap;
}

.structure-svg {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.structure-svg text {
  font-family: var(--mono);
}

/* ---------- prose helpers ---------- */

.prose .lbl {
  color: var(--ink);
}

.prose .lbl--lead {
  font-weight: 700;
}

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  max-width: var(--measure);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose li::marker {
  color: var(--muted);
}

.distill-note {
  margin: 2.25rem 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* text flows (diagram-in-text) */

.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem 3rem;
  margin-block: 1.5rem 2.5rem;
}

.flow {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
}

.flow-cap {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.flow-line {
  margin: 0;
  color: var(--ink);
}

/* ---------- media placeholders ---------- */

.media-ph {
  display: grid;
  place-items: center;
  width: 100%;
  margin-block: clamp(2rem, 5vw, 3rem);
  padding: 1.5rem;
  background: var(--ph-bg);
  border: 1px solid var(--hairline);
  text-align: center;
}

.media-ph--169 {
  aspect-ratio: 16 / 9;
}

.media-ph--43 {
  aspect-ratio: 4 / 3;
}

.media-ph--916 {
  aspect-ratio: 9 / 16;
  max-width: 320px;
  margin-inline: auto;
}

.media-ph-tag {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.media-ph-cap {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.case-img {
  display: block;
  width: 90%;
  height: auto;
  margin-block: clamp(3rem, 7vw, 4.5rem);
}

/* ---------- design system bento ---------- */

.ds-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-block: clamp(2rem, 5vw, 3rem);
}

.ds-cell {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.ds-cell--w2 {
  grid-column: span 2;
}

.ds-cell--w4 {
  grid-column: span 4;
}

.ds-cell--w6 {
  grid-column: span 6;
}

.ds-tag {
  flex: 0 0 auto;
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

.ds-media {
  flex: 1 1 auto;
  min-height: 0;
}

.ds-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ds-media--banner {
  aspect-ratio: 2000 / 974;
}

.ds-media--square {
  aspect-ratio: 1 / 1;
}

.ds-media--sheet {
  aspect-ratio: 5767 / 3097;
}

@media (max-width: 820px) {
  .ds-bento {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ds-cell--w2,
  .ds-cell--w4,
  .ds-cell--w6 {
    grid-column: auto;
  }
}

/* case video + caption */

.case-video {
  margin-block: clamp(2rem, 5vw, 3rem) 0.9rem;
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.case-video video {
  display: block;
  width: 100%;
  height: auto;
}

.case-video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 3vw, 32px);
  max-width: 600px;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.case-video-pair figure {
  margin: 0;
}

.case-video-pair .case-video {
  margin-top: 0;
}

.media-cap {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

/* opt-in: let long TOC titles wrap in the desktop sidebar */

@media (min-width: 821px) {
  .case-toc--wrap .case-toc-list a {
    white-space: normal;
    padding-right: 1rem;
  }
}

/* ---------- mobile: bottom fixed bar ---------- */

@media (max-width: 820px) {
  .case-layout {
    display: block;
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }

  .case-toc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    background: var(--bg);
    border-right: 0;
    border-top: 1px solid var(--hairline);
  }

  .case-toc-inner {
    position: static;
  }

  .case-toc-list {
    display: flex;
    overflow-x: auto;
    padding: 0;
    scrollbar-width: none;
  }

  .case-toc-list::-webkit-scrollbar {
    display: none;
  }

  .case-toc-list li {
    flex: 0 0 auto;
  }

  .case-toc-list a {
    min-height: 48px;
    padding: 0 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-toc-title {
    transition: none;
  }
}

/* numbered list with circled numbers */

.prose .circle-list {
  list-style: none;
  counter-reset: circle;
  margin: 0 0 1.4rem;
  padding: 0;
}

.prose .circle-list li {
  position: relative;
  counter-increment: circle;
  margin-bottom: 0.9rem;
  padding-left: 2.4rem;
}

.prose .circle-list li::before {
  content: counter(circle);
  position: absolute;
  left: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--case-accent, #6161FF);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--case-accent, #6161FF);
}

/* wide diagram figure: full column width, caption, opens full size */

.case-figure {
  margin: clamp(3rem, 7vw, 4.5rem) 0;
}

.case-figure a {
  display: block;
  cursor: zoom-in;
}

.case-img--wide {
  width: 100%;
  margin: 0 0 0.9rem;
}

/* opening story block before a section's main text */

.case-story {
  margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

/* ---------- per-case theme colour ---------- */

.case-theme--essencube {
  --case-accent: #107C75;
}

/* ---------- image lightbox ---------- */

.lightbox-open,
.lightbox-open body {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 998; /* below the custom cursor dot (999) */
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, 0.86);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox-stage {
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
}

.lightbox-img {
  display: block;
  max-width: 96vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  background: #fafaf7;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #f5f5f0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:focus-visible {
  outline: 2px solid #f5f5f0;
  outline-offset: 2px;
}

/* phones: wide diagrams keep a readable height and pan sideways */
@media (max-width: 820px) {
  .lightbox {
    place-items: center start;
  }

  .lightbox-stage {
    width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lightbox-img {
    max-width: none;
    max-height: none;
    height: min(70vh, 577px);
  }
}

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

/* ---------- product audit: problem cards with reference media ---------- */

.problem-grid--audit .problem-card {
  padding: 24px;
}

/* reserve two title lines so the media and lists line up across columns */
@media (min-width: 821px) {
  .case-section .problem-grid--audit .problem-card-title {
    min-height: 2.4em;
  }
}

.audit-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  margin: 0.5rem 0 1.25rem;
  cursor: zoom-in;
}

.audit-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.audit-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 14px;
  line-height: 1.6;
  color: #555555;
}

.audit-list li {
  margin-bottom: 0.3rem;
}

.audit-list li::marker {
  color: var(--case-accent, #6161FF);
}

@media (max-width: 820px) {
  .audit-media {
    aspect-ratio: 1 / 1;
    max-height: 360px;
  }
}

/* ---------- vertical layer stack (system architecture) ---------- */

.layer-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 34rem;
}

.layer-stack li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-left: 3px solid var(--case-accent, #6161FF);
  background: #ffffff;
}

.layer-stack li + li {
  position: relative;
  margin-top: 1.9rem;
}

/* arrow between layers */
.layer-stack li + li::before {
  content: "↓";
  position: absolute;
  left: 1.1rem;
  top: -1.65rem;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.4;
  color: var(--case-accent, #6161FF);
}

.layer-name {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--case-accent, #6161FF);
}

.layer-parts {
  font-size: 15px;
  line-height: 1.55;
  color: #1a1a1a;
}

@media (max-width: 520px) {
  .layer-stack li {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }
}

/* ---------- step tags (horizontal flow) ---------- */

.tag-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.4rem;
}

.tag-flow[hidden] {
  display: none;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--case-accent, #6161FF) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--case-accent, #6161FF) 7%, #ffffff);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--case-accent, #6161FF);
  white-space: nowrap;
}

.tag-arrow {
  font-size: 13px;
  color: #888888;
}

/* center the row label on the first line of tags */
.tag-row {
  padding-top: 0;
}

.decision-row:has(.tag-row) .decision-label {
  padding-top: 0.55rem;
}

/* white-background renders: multiply so the white takes on the page colour */
.case-img--blend {
  mix-blend-mode: multiply;
}

/* tall image preview: show the top part, fade out, click for the full image */
.tall-preview {
  position: relative;
  display: block;
  max-width: 640px;
  margin-inline: auto;
  max-height: 720px;
  overflow: hidden;
  cursor: zoom-in;
}

.tall-preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(247, 248, 250, 0), var(--bg, #f7f8fa));
  pointer-events: none;
}

.tall-preview + .media-cap {
  margin-top: 0.9rem;
}

/* lightbox: tall images keep their width and scroll vertically */
.lightbox--tall {
  place-items: start center;
  overflow-y: auto;
}

.lightbox--tall .lightbox-stage {
  max-height: none;
  overflow: visible;
  padding: 3.5rem 0 2rem;
}

.lightbox--tall .lightbox-img {
  max-height: none;
  max-width: 96vw;
  height: auto;
}

/* full-column image, so centred artwork shares the column's centre line */
.case-img--full {
  width: 100%;
}

/* two visuals in a row read as one group: tighten the gap between them */
.case-img + .case-figure {
  margin-top: 1.5rem;
}

.case-img:has(+ .case-figure) {
  margin-bottom: 0;
}

/* bulleted list inside a decision row */
.decision-list {
  margin: 0;
  padding-left: 1.1rem;
}

.decision-list li {
  margin-bottom: 0.55rem;
}

.decision-list li:last-child {
  margin-bottom: 0;
}

.decision-list li::marker {
  color: var(--case-accent, #6161FF);
}

.decision-list .lbl {
  font-weight: 700;
}

/* ---------- side-by-side media: phone recording + wide image ---------- */

.media-pair {
  --pair-gap: clamp(1.5rem, 4vw, 3rem);
  /* phone column = one phone of a two-phone pair, so every recording is the same size */
  --phone-w: calc((620px - var(--pair-gap)) / 2);
  display: grid;
  grid-template-columns: var(--phone-w) minmax(0, 320px);
  justify-content: center;
  gap: var(--pair-gap);
  align-items: end;
  margin-block: clamp(2rem, 5vw, 3rem);
}

.media-pair figure {
  margin: 0;
}

.media-pair video,
.media-pair img {
  display: block;
  width: 100%;
  height: auto;
}

.media-pair a {
  display: block;
  cursor: zoom-in;
}

.media-pair .media-cap {
  margin-top: 0.9rem;
  text-align: center;
}

@media (max-width: 820px) {
  .media-pair {
    --pair-gap: 1rem;
    grid-template-columns: 1fr 1fr;
  }
}

/* two phone recordings side by side */
.media-pair--phones {
  grid-template-columns: 1fr 1fr;
  max-width: 620px;
  margin-inline: auto;
  align-items: start;
}

/* align the media bottoms even when one caption wraps to more lines:
   media share row 1 (bottom-aligned), captions share row 2 */
.media-pair {
  grid-template-rows: auto auto;
  row-gap: 0;
  align-items: stretch;
}

.media-pair > figure {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}

.media-pair > figure > :first-child {
  align-self: end;
}

.media-pair > figure > .media-cap {
  align-self: start;
}

/* phone + image pair: the image sits at the phone's vertical centre;
   captions stay together on the shared bottom row */
.media-pair:not(.media-pair--phones) > figure:not(.media-pair-phone) > :first-child {
  align-self: center;
}

/* note following a row list */
.decision-rows + .outcome-note {
  margin-top: 1.75rem;
}

.circle-list .lbl {
  font-weight: 700;
}

/* ---------- comparison table (rows = attributes, columns = options) ---------- */

.cmp-table-wrap {
  margin-block: clamp(2rem, 5vw, 3rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmp-table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.cmp-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.cmp-table th,
.cmp-table td {
  padding: 0.85rem 1rem 0.85rem 0;
  border-top: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.cmp-table thead th {
  border-top: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}

.cmp-table tbody th {
  width: 7.5rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
  padding-top: 1.05rem;
}

.cmp-table td {
  color: var(--ink);
}

/* phones: keep the attribute column pinned while the commands scroll */
@media (max-width: 820px) {
  .cmp-table tbody th,
  .cmp-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg);
    width: 6rem;
  }
}

/* OhMyMD: no brand colour given yet, use the site accent */
.case-theme--ohmymd {
  --case-accent: var(--accent);
}

.case-theme--mynurse {
  --case-accent: #007E7C;
}

/* tall preview with a soft shadow: the crop + fade live on an inner span,
   so the drop shadow follows the image and fades out with it */
.tall-preview--shadow {
  overflow: visible;
  max-height: none;
  filter:
    drop-shadow(0 1px 2px rgba(26, 26, 26, 0.06))
    drop-shadow(0 12px 32px rgba(26, 26, 26, 0.08));
}

.tall-preview--shadow::after {
  content: none;
}

.tall-preview-crop {
  display: block;
  max-height: 720px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 140px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 140px), transparent);
}

/* two-up card grid (e.g. product principles) */
.problem-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.principle-card .problem-card-desc + .problem-card-desc {
  margin-top: 0.6rem;
}

@media (max-width: 820px) {
  .problem-grid--two {
    grid-template-columns: 1fr;
  }
}

/* ---------- principle cards: modelled on ohmy.md's home feature cards ---------- */

.principle-card {
  padding: clamp(28px, 3.2vw, 38px);
  background: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
}

.principle-card + .principle-card {
  background: #ffffff;
}

.principle-card .problem-card-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  font-size: 12px;
  letter-spacing: 0.11em;
  color: #a8a8a8;
}

.principle-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.case-section .principle-card .problem-card-title {
  margin-bottom: 0.9rem;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.principle-card .problem-card-desc {
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.6;
  color: #7a7a7a;
}

/* the "→" conclusions read a step darker than the description */
.principle-card .problem-card-desc ~ .problem-card-desc {
  color: #4a4a4a;
}

/* the section's thesis line: a step smaller than a decision title */
.case-section .bet-statement {
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.35;
  max-width: 38em;
}

/* 2×2 grid of product screenshots, each with a short caption */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 1.75rem);
  margin-block: clamp(2rem, 5vw, 3rem);
}

.shot-grid figure {
  margin: 0;
}

.shot-grid a {
  display: block;
  cursor: zoom-in;
}

.shot-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(26, 26, 26, 0.06),
    0 1px 2px rgba(26, 26, 26, 0.06),
    0 10px 28px rgba(26, 26, 26, 0.07);
}

.shot-grid .media-cap {
  margin-top: 0.9rem;
}

@media (max-width: 820px) {
  .shot-grid {
    grid-template-columns: 1fr;
  }
}

/* single centred screenshot (e.g. a form), same card treatment as the grid */
.shot-grid--single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

@media (max-width: 820px) {
  .shot-grid--single {
    grid-template-columns: 1fr;
  }
}
