.case-page {
  --sans: "Rubik", Arial, sans-serif;
  --mono: "Martian Mono", Menlo, Consolas, monospace;
  --sheet: #eeece3;
  --ink: #1c211d;
  --body-ink: #3c423a;
  --muted: #60665a;
  --rule: #c0c2b4;
  --dark-rule: #535b50;
  --accent: #e7a842;
  --accent-ink: #6c4714;
  --wash: #e5ddc8;
  --art-bed: #b58c44;
  --gutter: clamp(18px, 5.4vw, 92px);
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
.case-page[data-tone="mint"] {
  --accent: #8dbfa5;
  --accent-ink: #2f5f48;
  --wash: #d7e3d8;
  --art-bed: #799d8c;
}
.case-page[data-tone="clay"] {
  --accent: #d79377;
  --accent-ink: #804329;
  --wash: #e7d6ca;
  --art-bed: #b9806c;
}
.case-page *, .case-page *::before, .case-page *::after {box-sizing: border-box}
.case-page [hidden] {display: none !important}
.case-page :where(h1, h2, h3, h4, p, ol, ul, figure, blockquote) {margin: 0}
.case-page :where(a, button, summary) {-webkit-tap-highlight-color: transparent}
.case-page :where(a) {color: inherit; text-decoration-color: var(--dark-rule); text-underline-offset: .15em}
.case-page :where(a:focus-visible, summary:focus-visible, button:focus-visible, video:focus-visible) {
  outline: 2px solid var(--accent-ink);
  outline-offset: 4px;
}
.case-page ::selection {color: var(--ink); background: var(--accent)}
.case-page .wrap {width: min(100%, 1540px); margin-inline: auto; padding-inline: var(--gutter)}
.case-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 63px;
}
.case-nav::after, .case-footer::before {
  content: "";
  position: absolute;
  right: var(--gutter);
  left: var(--gutter);
  height: 1px;
  background: var(--dark-rule);
}
.case-nav::after {bottom: 0}
.case-nav .identity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 570 clamp(16px, 1.35vw, 22px)/1.15 var(--sans);
  letter-spacing: -.04em;
  text-decoration: none;
}
.case-nav .identity > :is(svg, img) {display: block; max-width: 27px; height: 24px; object-fit: contain}
.case-nav nav, .case-footer nav {display: flex; align-items: center; flex-wrap: wrap; gap: 8px clamp(14px, 2vw, 32px)}
.case-nav nav a, .case-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font: 470 clamp(10px, .76vw, 12px)/1.5 var(--mono);
  text-decoration: none;
  color: var(--body-ink);
}
.case-nav a:hover, .case-footer a:hover, .story-nav a:hover {color: var(--accent-ink); text-decoration: underline}
.case-hero {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5.2vw, 90px);
  padding-block: clamp(42px, 5.8vw, 94px) clamp(42px, 5.5vw, 86px);
}
.case-heading {min-width: 0}
.case-type {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-ink);
  font: 530 clamp(9px, .8vw, 12px)/1.5 var(--mono);
  letter-spacing: .065em;
  text-transform: uppercase;
}
.case-type::before {
  content: "";
  flex: 0 0 17px;
  height: 10px;
  border-block: 2px solid currentColor;
}
.case-heading h1 {
  font-size: clamp(43px, 5.65vw, 88px);
  line-height: .99;
  font-weight: 540;
  letter-spacing: -.07em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  margin: clamp(16px, 1.7vw, 25px) 0 clamp(15px, 1.8vw, 29px);
}
.case-deck {
  max-width: 45ch;
  color: var(--body-ink);
  font-size: clamp(16px, 1.45vw, 23px);
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -.017em;
  text-wrap: pretty;
}
.case-art {min-width: 0; align-self: center}
.case-art > .poster, .case-art > .case-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.43 / 1;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background-color: var(--art-bed);
}
.case-art > .case-image, .case-art .poster > .case-image {object-fit: cover; object-position: center}
.case-art .poster > .case-image {display: block; width: 100%; height: 100%}
.case-art .figure-caption, .flow-figure figcaption, .media-pair figcaption {
  margin-top: 8px;
  color: var(--muted);
  font: 420 clamp(9px, .72vw, 11px)/1.6 var(--mono);
  letter-spacing: -.025em;
}
.story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, .31fr) minmax(0, 1fr);
  gap: clamp(25px, 6vw, 110px);
  padding-block: clamp(40px, 4.8vw, 77px) clamp(58px, 7.2vw, 115px);
}
.story::before {
  position: absolute;
  content: "";
  top: 0;
  right: var(--gutter);
  left: var(--gutter);
  height: 1px;
  background: var(--dark-rule);
}
.story-nav {
  position: sticky;
  top: 23px;
  align-self: start;
  display: grid;
  padding-left: 13px;
  border-left: 2px solid var(--accent);
}
.story-nav a {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  font: 460 clamp(10px, .82vw, 13px)/1.45 var(--mono);
  text-decoration: none;
}
.story-nav a[aria-current] {color: var(--ink)}
.case-body {width: min(100%, 930px); min-width: 0}
.chapter {scroll-margin-top: 28px}
.chapter + .chapter {
  padding-top: clamp(30px, 3.6vw, 58px);
  margin-top: clamp(30px, 3.6vw, 58px);
  border-top: 1px solid var(--rule);
}
.chapter > h2 {
  margin-bottom: clamp(12px, 1.7vw, 25px);
  font-size: clamp(31px, 3.7vw, 57px);
  font-weight: 525;
  letter-spacing: -.058em;
  line-height: 1.04;
  text-wrap: balance;
}
.chapter > p, .walkthrough details > p, .chapter > ul:not(.fact-list) {
  max-width: 63ch;
  color: var(--body-ink);
  font-size: clamp(16px, 1.24vw, 20px);
  font-weight: 400;
  line-height: 1.59;
  letter-spacing: -.012em;
}
.chapter > p + p {margin-top: .8em}
.chapter :where(a[href]):hover {color: var(--accent-ink)}
.case-body :where(.flow-figure, .fact-list, .walkthrough, .media-pair, .pullquote) {
  margin-block: clamp(20px, 2.5vw, 38px);
}
.chapter > :last-child {margin-bottom: 0}
.flow-figure {border-block: 1px solid var(--dark-rule); padding-block: clamp(16px, 1.5vw, 25px)}
.flow {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 0;
  list-style: none;
}
.flow li {
  position: relative;
  min-width: 0;
  padding: 18px clamp(8px, 1.3vw, 20px) 0 0;
}
.flow li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--accent-ink);
  border-radius: 50%;
  background-color: var(--sheet);
  z-index: 1;
}
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 3px;
  right: -2px;
  height: 1px;
  background: var(--rule);
}
.flow li:last-child::before {background-color: var(--accent-ink)}
.flow b, .flow small {display: block; overflow-wrap: anywhere}
.flow b {font-size: clamp(13px, 1.25vw, 18px); line-height: 1.22; letter-spacing: -.022em; font-weight: 550}
.flow small {margin-top: 4px; color: var(--muted); font-size: clamp(11px, .98vw, 15px); line-height: 1.46}
.fact-list {
  padding: 0;
  border-top: 1px solid var(--dark-rule);
  list-style: none;
}
.fact-list > li {
  position: relative;
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.46;
  color: var(--body-ink);
}
.fact-list > li::before {
  content: "";
  position: absolute;
  top: calc(12px + .56em);
  left: 2px;
  width: 9px;
  height: 2px;
  background: var(--accent-ink);
}
.fact-list b, .fact-list strong {color: var(--ink); font-weight: 550}
.walkthrough {border-top: 1px solid var(--dark-rule)}
.walkthrough details {border-bottom: 1px solid var(--rule)}
.walkthrough summary {
  position: relative;
  display: block;
  padding: 16px 37px 16px 0;
  font-size: clamp(17px, 1.36vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.025em;
  cursor: pointer;
  list-style: none;
}
.walkthrough summary::-webkit-details-marker {display: none}
.walkthrough summary::before, .walkthrough summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 49%;
  width: 14px;
  height: 1.5px;
  background: var(--accent-ink);
}
.walkthrough summary::after {transform: rotate(90deg)}
.walkthrough details[open] > summary::after {display: none}
.walkthrough summary:hover {color: var(--accent-ink)}
.walkthrough details > p {padding: 0 25px 16px 0; font-size: clamp(15px, 1.1vw, 18px)}
.pullquote {
  padding: clamp(17px, 2vw, 32px) clamp(18px, 2.5vw, 39px);
  border-left: 3px solid var(--accent-ink);
  background: var(--wash);
  color: var(--ink);
  font-size: clamp(20px, 2.1vw, 32px);
  font-weight: 440;
  line-height: 1.28;
  letter-spacing: -.045em;
  text-wrap: pretty;
}
.media-pair {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(12px, 1.4vw, 22px)}
.media-pair figure {min-width: 0}
.media-pair :is(img, video) {display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background-color: #202421}
.source-link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.action-link {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-block: 10px 2px;
  padding: 10px 15px;
  color: var(--sheet);
  background: var(--ink);
  font: 450 clamp(11px, .87vw, 13px)/1.4 var(--mono);
  text-decoration: none;
}
.chapter .action-link[href]:hover {color: var(--sheet); background: var(--accent-ink)}
.case-page :where(.source-link, .action-link):is([aria-disabled="true"], :not([href])) {
  color: var(--muted);
  background: transparent;
  cursor: default;
  text-decoration: none;
}
.case-page .action-link:is([aria-disabled="true"], :not([href])) {border: 1px dashed var(--rule)}
.case-footer {position: relative; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; min-height: 68px; padding-block: 10px; color: var(--muted); font: 430 11px/1.55 var(--mono)}
.case-footer::before {top: 0}

@media (max-width: 840px) {
  .case-page {--gutter: clamp(20px, 4vw, 36px)}
  .case-hero {gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr)}
  .case-heading h1 {font-size: clamp(40px, 5.6vw, 48px)}
  .story {grid-template-columns: minmax(122px, .28fr) minmax(0, 1fr); gap: 27px}
  .flow {grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0}
  .flow li:nth-child(even)::after {display: none}
}
@media (max-width: 650px) {
  .case-page {--gutter: clamp(17px, 4.8vw, 27px)}
  .case-nav {min-height: 54px; gap: 12px; padding-block: 4px}
  .case-nav nav {justify-content: flex-end; gap: 2px 11px}
  .case-nav nav a, .case-footer a {font-size: 10px}
  .case-hero {grid-template-columns: minmax(0, 1fr); padding-block: 31px 33px; gap: 23px}
  .case-heading h1 {max-width: 17ch; font-size: clamp(40px, 9.2vw, 61px); margin-block: 12px}
  .case-deck {max-width: 48ch}
  .case-art > .poster, .case-art > .case-image {aspect-ratio: 1.53}
  .story {grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 17px 55px}
  .story-nav {position: static; display: flex; flex-wrap: wrap; gap: 1px 15px; padding-left: 0; border: 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule)}
  .story-nav a {min-height: 32px; font-size: 10px; color: var(--accent-ink)}
  .chapter {scroll-margin-top: 15px}
  .flow {grid-template-columns: minmax(0,1fr); gap: 0}
  .flow li {padding: 0 0 12px 20px}
  .flow li:last-child {padding-bottom: 0}
  .flow li::before {top: .38em}
  .flow li:not(:last-child)::after {display: block; top: .6em; bottom: -.6em; left: 3px; width: 1px; height: auto}
  .flow b {font-size: 15px}
  .flow small {margin-top: 2px}
  .media-pair {grid-template-columns: minmax(0, 1fr); gap: 16px}
  .case-footer {gap: 2px 18px; min-height: 58px}
}
@media (prefers-reduced-motion: no-preference) {
  .case-page :where(a, summary) {transition: color .14s ease, background-color .14s ease}
}
@media print {
  .case-page {--sheet: white; --ink: black; --body-ink: #151515; --gutter: 0}
  .case-nav, .story-nav, .case-footer {display: none}
  .case-hero, .story {display: block; padding-block: 18pt}
  .case-art {max-width: 55%; margin-block: 12pt}
  .chapter {break-inside: auto}
  .chapter h2, .flow-figure, .media-pair {break-inside: avoid}
}
