.case-page {
  --case-wide: 1040px;
  --case-body: 760px;
}

.case-study-nav {
  display: none;
}

@media (min-width: 1500px) {
  .case-study-nav {
    position: fixed;
    z-index: 10;
    top: 50%;
    left: max(24px, calc(50vw - 820px));
    display: block;
    width: 160px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    transform: translateY(-50%);
    scrollbar-width: none;
  }

  .case-study-nav::-webkit-scrollbar {
    display: none;
  }

  .case-study-nav ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .case-study-nav li + li {
    margin-top: 10px;
  }

  .case-study-nav a {
    position: relative;
    display: block;
    padding-left: 22px;
    color: color-mix(in srgb, var(--ink) 48%, transparent);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
    transition: color 180ms ease, padding-left 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .case-study-nav a::before {
    position: absolute;
    top: 0.64em;
    left: 0;
    width: 10px;
    height: 2px;
    background: var(--rule);
    content: "";
    transition: width 240ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms ease;
  }

  .case-study-nav a:hover,
  .case-study-nav a:focus-visible,
  .case-study-nav a[aria-current="location"] {
    color: var(--ink);
  }

  .case-study-nav a:hover,
  .case-study-nav a:focus-visible {
    padding-left: 30px;
  }

  .case-study-nav a:hover::before,
  .case-study-nav a:focus-visible::before {
    width: 18px;
    background: color-mix(in srgb, var(--ink) 64%, transparent);
  }

  .case-study-nav a[aria-current="location"] {
    padding-left: 40px;
    font-weight: 700;
  }

  .case-study-nav a[aria-current="location"]::before {
    width: 28px;
    background: var(--ink);
  }

  .tldr[id],
  .case-story [id],
  .outcome-section[id] {
    scroll-margin-top: 48px;
  }
}

@media (min-width: 1500px) and (prefers-reduced-motion: reduce) {
  .case-study-nav a,
  .case-study-nav a::before {
    transition: none;
  }
}

.case-header,
.case-hero,
.case-story,
.case-footer {
  width: min(calc(100% - 48px), var(--case-body));
  margin-inline: auto;
}

.case-header {
  padding-top: 40px;
}

.case-hero {
  padding-top: 119px;
}

.case-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 800;
  letter-spacing: normal;
  line-height: 1.05;
}

.case-lede {
  max-width: 690px;
  margin: 36px 0 0;
  font-size: 24px;
  line-height: 1.45;
}

.case-cover {
  width: min(calc(100% - 48px), var(--case-wide));
  margin: 80px auto 0;
}

.case-cover-screenshot {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(5, 17, 51, 0.08);
}

.case-cover-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.case-cover-media {
  position: relative;
  overflow: hidden;
  height: 560px;
  border-radius: 16px;
}

.case-cover-bg,
.case-cover-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.case-cover-bg {
  object-fit: cover;
}

.case-cover-wash {
  z-index: 1;
  background: rgba(201, 190, 132, 0.62);
}

.case-cover-ui {
  position: absolute;
  z-index: 2;
  width: min(84%, 860px);
  height: auto;
  left: 50%;
  bottom: -15%;
  transform: translateX(-50%);
}

.kiwi-case-cover .case-cover-wash {
  background: rgba(201, 190, 132, 0.56);
}

.kiwi-case-cover .case-cover-ui {
  width: min(67%, 680px);
  bottom: -5%;
}

.tldr {
  width: min(calc(100% - 48px), var(--case-body));
  margin-top: 80px;
  margin-inline: auto;
  padding-block: 48px;
  padding-inline: 0;
  background: transparent;
  border-block: 1px solid var(--rule);
}

.tldr > h2 {
  margin: 0 0 36px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.2;
}

.tldr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 32px;
}

.kiwi-case .tldr-result {
  grid-column: 1 / -1;
}

.tldr h3 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.3;
}

.tldr p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
}

.case-story {
  margin-top: 118px;
}

.story-section {
  margin-top: 112px;
}

.story-section:first-child {
  margin-top: 0;
}

.story-section h2,
.outcome-section h2,
.closing-reflection h2 {
  max-width: 700px;
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.12;
}

.story-section p,
.outcome-section p,
.closing-reflection p {
  max-width: 680px;
  margin: 0;
  font-size: 20px;
  line-height: 1.65;
}

.story-section p + p,
.outcome-section p + p,
.closing-reflection p + p {
  margin-top: 22px;
}

.story-section .story-closer {
  margin-top: 36px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.28;
}

.canvas-design-decision {
  margin-top: 64px;
}

.canvas-design-decision h3 {
  max-width: 680px;
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.canvas-design-decision .story-plate {
  margin-top: 40px;
}

.canvas-language-section + .story-section {
  margin-top: 96px;
}

.user-reactions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 42px 0;
}

.user-reactions blockquote {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 0;
  padding: 26px 0;
  overflow: hidden;
  color: var(--ink);
  border-block: 1px solid var(--rule);
  background: transparent;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.18;
}

.user-reactions blockquote::before {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  content: "“";
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 800;
  line-height: 0.65;
}

.user-reactions blockquote + blockquote {
  color: var(--ink);
}

.feedback-snippet {
  width: min(100%, 520px);
  margin: 64px 0 0;
}

.feedback-snippet img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.feedback-snippet + .story-section {
  margin-top: 88px;
}

.story-section.context-section {
  margin-top: 64px;
}

.story-section.research-section {
  margin-top: 96px;
  border-top: 0;
}

.story-divider {
  height: 0;
  margin: 88px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.story-divider + .story-section {
  margin-top: 88px;
}

.research-participants {
  display: flex;
  align-items: center;
  min-height: 80px;
  margin: 0 0 64px;
}

.research-avatar {
  --avatar-fade: 0;
  position: relative;
  z-index: var(--avatar-order);
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  margin-left: -20px;
  overflow: hidden;
  border: 2px solid var(--paper);
  border-radius: 50%;
}

.research-avatar:first-child {
  margin-left: 0;
}

.research-avatar::after {
  position: absolute;
  inset: 0;
  background: rgba(245, 241, 232, var(--avatar-fade));
  content: "";
}

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

.research-avatar-1 { --avatar-order: 1; }
.research-avatar-2 { --avatar-order: 2; }
.research-avatar-3 { --avatar-fade: 0.18; --avatar-order: 3; }
.research-avatar-4 { --avatar-fade: 0.38; --avatar-order: 4; }
.research-avatar-5 { --avatar-fade: 0.56; --avatar-order: 5; }
.research-avatar-6 { --avatar-fade: 0.72; --avatar-order: 6; }
.research-avatar-7 { --avatar-fade: 0.86; --avatar-order: 7; }
.research-avatar-8 { --avatar-fade: 0.94; --avatar-order: 8; }

.story-section p.research-takeaway {
  margin-top: 36px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.28;
}

.story-inline-image {
  margin: 56px 0 0;
}

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

.story-inline-image figcaption,
.story-caption-below figcaption {
  margin-inline: auto;
  text-align: center;
}

.story-plate {
  width: min(calc(100vw - 48px), var(--case-wide));
  margin: 88px 0 0;
  margin-left: calc((var(--case-body) - min(calc(100vw - 48px), var(--case-wide))) / 2);
}

.story-plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.story-plate-raised img {
  box-shadow: 0 24px 64px rgba(5, 17, 51, 0.08);
}

.journey-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.journey-visual-grid img {
  height: 100%;
  object-fit: cover;
}

.exploration-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.91fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.exploration-stack {
  display: grid;
  gap: 24px;
}

.story-plate .exploration-card {
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(5, 17, 51, 0.08);
}

.exploration-card-tall {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #eef1f4;
}

.story-plate .exploration-card-tall img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: inherit;
}

.story-plate-ui {
  padding: 64px;
  background: #dce1e8;
  border-radius: 16px;
}

.story-plate-ui img {
  border-radius: 10px;
}

.reasoning-plate,
.artifact-plate {
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 72px;
  background: #dfe3e9;
  border-radius: 16px;
}

.reasoning-plate img {
  width: min(100%, 720px);
  border-radius: 0;
}

.artifact-plate {
  background: #15101c;
}

.artifact-plate img {
  width: min(100%, 760px);
  border-radius: 0;
}

.video-plate iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
}

.outcome-divider {
  height: 0;
  margin: 72px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.outcome-divider + .outcome-section {
  margin-top: 96px;
}

.kiwi-product-plate,
.kiwi-expression-plate,
.kiwi-summary-plate {
  overflow: hidden;
  padding: 0;
  background: #e8edef;
  border-radius: 16px;
}

.kiwi-product-plate img,
.kiwi-expression-plate img,
.kiwi-summary-plate img {
  width: 100%;
  border-radius: 0;
}

.kiwi-product-plate figcaption,
.kiwi-expression-plate figcaption,
.kiwi-summary-plate figcaption {
  margin: 0;
  padding: 18px 24px 22px;
}

.story-caption-below {
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

.story-caption-below img {
  border-radius: 16px;
}

.story-caption-below figcaption {
  margin: 18px auto 0;
  padding: 0;
  text-align: center;
}

.kiwi-revolution-followup {
  margin-top: 32px;
}

.kiwi-system-followup {
  margin-top: 32px;
}

.kiwi-outcome {
  background: #063f3a;
}

.kiwi-case .story-section {
  margin-top: 92px;
}

figcaption {
  width: min(100%, 680px);
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.68;
}

.pull-quote {
  margin: 104px 0;
  padding: 72px 0;
  border-block: 1px solid rgba(5, 17, 51, 0.18);
}

.pull-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.18;
}

.outcome-section {
  position: relative;
  isolation: isolate;
  margin-top: 120px;
  padding: 72px 0 52px;
  color: var(--paper);
}

.outcome-section.kiwi-outcome {
  padding-bottom: 72px;
}

.outcome-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  left: 50%;
  width: min(calc(100vw - 48px), var(--case-wide));
  transform: translateX(-50%);
  background: var(--ink);
  border-radius: 16px;
}

.outcome-section .outcome-intro {
  max-width: 620px;
  font-size: 19px;
  color: rgba(245, 241, 232, 0.78);
}

.outcome-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 52px 0 0;
  padding: 0;
  border-block: 1px solid rgba(245, 241, 232, 0.24);
}

.outcome-metric {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 34px 28px 38px;
  border-left: 1px solid rgba(245, 241, 232, 0.24);
}

.outcome-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.outcome-metric:last-child {
  padding-right: 0;
}

.outcome-metric dt {
  margin-top: 13px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.outcome-metric dd {
  order: -1;
  margin: 0;
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.outcome-metric p {
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(245, 241, 232, 0.68);
}

.outcome-section .outcome-note {
  max-width: none;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(245, 241, 232, 0.48);
}

.closing-reflection {
  margin-top: 120px;
  padding-top: 80px;
  border-top: 1px solid var(--rule);
}

.closing-reflection .closing-statement {
  max-width: 720px;
  margin-top: 48px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.28;
}

.case-footer {
  margin-top: 72px;
  padding: 56px 0 130px;
  border-top: 1px solid var(--rule);
}

.case-footer .case-footer-label {
  margin: 0 0 14px;
  color: rgba(5, 17, 51, 0.62);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.case-footer .case-footer-title {
  max-width: 680px;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.case-footer a {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 800;
  text-underline-offset: 0.12em;
}

.case-footer .case-footer-title-link {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.case-footer .case-footer-title-link:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .case-header,
  .case-hero,
  .case-story,
  .case-footer {
    width: min(calc(100% - 32px), var(--case-body));
  }

  .case-header {
    padding-top: 24px;
  }

  .case-hero {
    padding-top: 82px;
  }

  .case-hero h1 {
    font-size: clamp(43px, 12vw, 55px);
    line-height: 1.03;
  }

  .case-lede {
    margin-top: 28px;
    font-size: 20px;
  }

  .case-cover {
    width: calc(100% - 32px);
    margin-top: 56px;
  }

  .case-cover-screenshot {
    border-radius: 12px;
  }

  .case-cover-media {
    height: 360px;
    border-radius: 12px;
  }

  .case-cover-ui {
    width: 112%;
    bottom: 2%;
  }

  .kiwi-case-cover .case-cover-ui {
    width: 92%;
    bottom: 0;
  }

  .tldr {
    width: calc(100% - 32px);
    margin-top: 64px;
    padding: 28px 0;
  }

  .tldr-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .tldr p {
    font-size: 17px;
    line-height: 1.58;
  }

  .case-story {
    margin-top: 80px;
  }

  .story-section {
    margin-top: 80px;
  }

  .story-section.context-section {
    margin-top: 56px;
  }

  .story-section.research-section {
    margin-top: 72px;
  }

  .story-divider {
    margin-top: 64px;
  }

  .story-divider + .story-section {
    margin-top: 64px;
  }

  .research-participants {
    min-height: 62px;
    margin-bottom: 48px;
  }

  .research-avatar {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
    margin-left: -21px;
  }

  .story-section h2,
  .outcome-section h2,
  .closing-reflection h2 {
    font-size: 36px;
  }

  .story-section p,
  .outcome-section p,
  .closing-reflection p {
    font-size: 18px;
    line-height: 1.58;
  }

  .story-section .story-closer {
    margin-top: 30px;
    font-size: 24px;
    line-height: 1.3;
  }

  .story-section p.research-takeaway {
    margin-top: 30px;
    font-size: 26px;
    line-height: 1.28;
  }

  .canvas-design-decision {
    margin-top: 48px;
  }

  .canvas-design-decision h3 {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .canvas-design-decision .story-plate {
    margin-top: 28px;
  }

  .canvas-language-section + .story-section {
    margin-top: 72px;
  }

  .user-reactions {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 34px 0;
  }

  .user-reactions blockquote {
    padding: 24px 0;
    font-size: 28px;
  }

  .user-reactions blockquote::before {
    margin-bottom: 7px;
    font-size: 62px;
  }

  .feedback-snippet {
    width: min(100%, 440px);
    margin-top: 48px;
  }

  .feedback-snippet + .story-section {
    margin-top: 72px;
  }

  .story-plate {
    width: calc(100vw - 32px);
    margin-top: 64px;
    margin-left: 0;
  }

  .story-inline-image {
    margin-top: 44px;
  }

  .story-plate-ui,
  .reasoning-plate,
  .artifact-plate {
    min-height: 0;
    padding: 28px;
    border-radius: 12px;
  }

  .story-plate img {
    border-radius: 10px;
  }

  .exploration-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .journey-visual-grid {
    grid-template-columns: 1fr;
  }

  .exploration-stack {
    gap: 24px;
  }

  .story-plate .exploration-card {
    border-radius: 10px;
  }

  .story-plate .exploration-card-tall img {
    position: static;
    height: auto;
    object-fit: contain;
  }

  .pull-quote {
    margin: 80px 0;
    padding: 52px 0;
  }

  .pull-quote p {
    font-size: 34px;
  }

  .outcome-section {
    margin-top: 88px;
    padding: 44px 0 34px;
  }

  .outcome-section.kiwi-outcome {
    padding-bottom: 44px;
  }

  .outcome-divider {
    margin-top: 48px;
  }

  .outcome-divider + .outcome-section {
    margin-top: 64px;
  }

  .outcome-section::before {
    width: calc(100vw - 8px);
    border-radius: 12px;
  }

  .outcome-metrics {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .outcome-metric,
  .outcome-metric:first-child,
  .outcome-metric:last-child {
    padding: 28px 0 30px;
    border-left: 0;
  }

  .outcome-metric + .outcome-metric {
    border-top: 1px solid rgba(245, 241, 232, 0.24);
  }

  .outcome-metric dd {
    font-size: 50px;
  }

  .outcome-metric p {
    font-size: 16px;
  }

  .outcome-section .outcome-note {
    margin-top: 16px;
    font-size: 12px;
  }

  .closing-reflection {
    margin-top: 88px;
    padding-top: 56px;
  }

  .closing-reflection .closing-statement {
    margin-top: 36px;
    font-size: 26px;
    line-height: 1.3;
  }

  .case-footer {
    margin-top: 56px;
    padding: 48px 0 96px;
  }

  .case-footer .case-footer-title {
    font-size: 26px;
  }

  .case-footer a {
    font-size: 20px;
  }
}
