.story {
  scrollbar-color: var(--muted) var(--bg);
}

.story-page {
  padding-block: clamp(24px, 4vw, 52px) clamp(48px, 8vw, 112px);
}

.story-page a {
  cursor: pointer;
}

.story-page a:active {
  text-decoration: underline;
}

.story-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(26px, 5vw, 76px);
  padding-block: clamp(28px, 5vw, 70px);
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.story-service {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
}

.story-lead h1 {
  font-size: clamp(44px, 6.4vw, 96px);
  overflow-wrap: anywhere;
}

.story-lead > .eyebrow {
  margin-bottom: 12px;
}

.story-lead > p:not(.eyebrow) {
  max-width: 54ch;
  margin-top: 20px;
  color: var(--muted);
}

.story-lead > .button {
  margin-top: 24px;
}

.story-outcome {
  display: grid;
  gap: 8px;
  padding: 16px 0 2px clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--ink);
}

.story-lead .story-outcome {
  margin-top: 22px;
}

.story-outcome h2,
.story-grid h2,
.story-related h2,
.story-contact h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
  text-wrap: balance;
}

.story-outcome p:last-child,
.story-grid p,
.story-grid li,
.story-contact p {
  color: var(--muted);
}

.story-visual {
  aspect-ratio: 1200 / 833;
}

.story-portrait {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  background: #e9ddc8;
  padding: clamp(16px, 3vw, 36px);
}

.story-portrait > img {
  width: auto;
  height: 100%;
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px clamp(24px, 5vw, 80px);
}

.story-grid > section,
.story-related {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.story-grid p,
.story-grid ul,
.story-related p,
.story-related ul,
.story-contact p {
  margin-top: 12px;
}

.story-grid ul {
  padding-left: 1.2em;
  margin-bottom: 0;
}

.story-grid li + li,
.story-related li + li {
  margin-top: 8px;
}

.story-grid .story-tech {
  font-size: 14px;
}

.story-related,
.story-contact {
  margin-top: clamp(36px, 6vw, 80px);
}

.story-related ul,
.story-contact-links {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.story-related a,
.story-contact-links a {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--muted);
}

.story-related a:hover,
.story-contact-links a:hover {
  text-decoration-color: currentColor;
}

.story-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 48px);
}

.story-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .story-hero,
  .story-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-contact .button {
    text-align: center;
    max-width: 100%;
  }
}

@media (forced-colors: active) {
  .story {
    scrollbar-color: auto;
  }
}

.story-example { margin: 18px 0 36px; border-block: 1px solid var(--line); padding: 24px 0; }
.story-example h2 { font-size: clamp(28px, 4vw, 46px); margin: 8px 0 20px; }
.story-example dl, .story-example ol { max-width: 70ch; }
.story-example dt { color: var(--muted); margin-top: 16px; font-size: 14px; }
.story-example dd { margin: 4px 0 0; }
.story-example li { margin-block: 10px; }
.story-visual:not(.story-portrait) { aspect-ratio: 1120/740; }
