/* The hero's night palette continues through evidence and closing scenes. */
[data-story-scene] {
  --scene-ink: var(--palette-story-ground);
  --scene-light: var(--palette-signal-light);
  --scene-progress: 1;
  position: relative;
}
[data-story-scene]::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: min(100%, 14rem);
  height: 2px;
  pointer-events: none;
  background: var(--scene-rule, var(--primary));
  transform: scaleX(var(--scene-progress));
  transform-origin: left center;
}
:is(.atlas-section, .protocol-section, .case-metrics-band, .case-next-band, .cta-band) {
  --scene-rule: var(--palette-signal-light);
  background: var(--palette-cinema);
  color: var(--palette-story-ink);
}
:is(.manifesto-section, .expertise-section, .related-section, .simple-body-section, .v5-privacy-content-section) {
  background: var(--canvas);
}
:is(.case-home-section, .insight-index-section, .request-section, .source-content-section) {
  background: #eeeae0;
}
:is(.manifesto-grid, .section-heading-row, .protocol-grid, .cta-grid) h2 {
  line-height: 1.1;
  text-wrap: balance;
}
:is(.protocol-grid, .cta-grid) h2 em {
  color: var(--palette-signal-light);
}
:is(.case-next-band, .cta-band) .button--primary {
  background: var(--palette-signal-light);
  border-color: var(--palette-signal-light);
  color: var(--palette-cinema);
}
:is(.case-next-band, .cta-band) .button--primary:hover {
  background: var(--surface);
  border-color: var(--palette-white);
}
:is(.case-next-band, .cta-band, .protocol-section, .atlas-section) :focus-visible {
  outline-color: var(--palette-signal-light);
}
.article-layout {
  gap: clamp(1.8rem, 5vw, 6rem);
}
.article-layout :is(.article-section, .case-chapter) {
  padding-block: clamp(2rem, 4.5vw, 4rem);
}
.article-layout :is(.article-section, .case-chapter):first-of-type {
  padding-top: 1.4rem;
}
.article-layout :is(.article-section, .case-chapter) h2 {
  text-wrap: balance;
}
.article-layout :is(.article-body, .case-body) {
  min-width: 0;
  max-width: 76ch;
}
.article-layout :is(.article-section, .case-chapter) p {
  max-width: 68ch;
}
.article-aside .toc-links a {
  flex-shrink: 0;
  min-height: 44px;
  align-items: center;
  font-size: .78rem;
}
.article-aside .toc-links span {
  color: #56647b;
}
.article-aside .toc-links a:is(:hover, .is-active) {
  background: #eae5f5;
}
.article-aside .toc-links a:focus-visible {
  outline-offset: -3px;
}
.article-aside .aside-service-box {
  background: #eeeae0;
}
.case-metrics-grid {
  gap: clamp(1.4rem, 4vw, 4rem);
}
.case-metric {
  border-left-color: #a6eeff66;
}
.case-metric > span {
  color: var(--palette-signal-light);
}
.case-chapter[id="the-results"] {
  border-bottom-color: #9e8bcf;
}
.insight-index-section .insight-grid {
  display: block;
}
.insight-index-section .insight-card {
  border-radius: 0;
  border-width: 0 0 1px;
  background: transparent;
  box-shadow: none;
}
.insight-index-section .insight-card:hover {
  transform: none;
  background: #f7f5ef;
}
.insight-index-section .insight-art {
  background-color: var(--palette-story-ground);
}
.request-panel {
  border-radius: 12px;
  overflow: hidden;
}
.request-panel-head {
  background: var(--palette-cinema);
}
.simple-body-section .simple-left {
  border-top: 2px solid var(--primary);
  padding-top: 1rem;
}
[data-story-scene] :is(h2, h3)[id], .case-chapter[id] {
  scroll-margin-top: 1.2rem;
}
@media (max-width: 850px) {
  .article-aside {
    position: sticky;
    top: 84px;
    min-width: 0;
    min-height: 0;
    background: var(--canvas);
  }
  .article-layout :is(.article-section, .case-chapter) {
    padding-block: 2rem;
  }
  [data-story-scene] :is(h2, h3)[id], .case-chapter[id] {
    scroll-margin-top: 4.4rem;
  }
}
@media (max-width: 620px) {
  .article-aside {
    top: 72px;
  }
}
/* The visual guide and case-study evidence have different scroll cues. */
.atlas-section .journey-route-glow {
  opacity: calc(.28 + var(--scene-progress) * .72);
}
.protocol-section .protocol-right {
  border-color: #a6eeff55;
}
.case-metric {
  position: relative;
}
.case-metric::after {
  content: "";
  position: absolute;
  inset: auto 0 -.7rem 0;
  height: 1px;
  background: #a6eeff66;
  transform: scaleX(var(--scene-progress));
  transform-origin: left;
}
.case-chapter[id="the-results"] {
  background: #eee9f5;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.case-chapter[id="the-practical-lesson"] {
  border-bottom: 2px solid var(--primary);
}
.insight-index-section .filter-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.request-explanation .request-steps {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.insight-index-section .insight-card {
  grid-template-columns: minmax(6rem, .2fr) minmax(0, 1fr);
  min-height: 0;
}
.insight-index-section .insight-art {
  min-height: 0;
  height: auto;
}
.insight-index-section .insight-copy {
  gap: .65rem;
}
.insight-index-section .insight-copy > :last-child {
  margin-top: .5rem;
}
@media (max-width: 620px) {
  .insight-index-section .insight-card {
    grid-template-columns: 1fr;
  }
  .insight-index-section .insight-art {
    min-height: 48px;
  }
}
/* Scene map: the hero's path becomes a set of reading destinations. */
.story-map {
  --scene-rule: var(--palette-signal-light);
  background: var(--palette-story-ground);
  color: var(--palette-story-ink);
}
.story-map--evidence {
  background: #171931;
}
.story-map__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--space-4), 6vw, 7rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.story-map__intro p {
  color: var(--palette-signal-light);
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.story-map__intro h2 {
  max-width: 17ch;
  font-size: clamp(1.85rem, 3.8vw, 3.8rem);
  line-height: 1.08;
  text-wrap: balance;
}
.story-map__stops {
  position: relative;
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 1px solid #506480;
}
.story-map__stops::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 -1px;
  width: 2px;
  background: var(--palette-signal-light);
  transform: scaleY(var(--scene-progress));
  transform-origin: top;
  pointer-events: none;
}
.story-map__stops li + li {
  border-top: 1px solid #506480;
}
.story-map__stops a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 54px;
  padding: .65rem .4rem .65rem 0;
  font-weight: 650;
}
.story-map__stops a span:last-child {
  color: var(--palette-signal-light);
}
.story-map__stops a:hover span:first-child {
  text-decoration: underline;
  text-underline-offset: .25em;
}
.story-map a:focus-visible {
  outline-color: var(--palette-signal-light);
}
.manifesto-section .manifesto-side {
  padding-inline-start: clamp(1rem, 3vw, 2.5rem);
  border-inline-start: 1px solid var(--line);
}
.atlas-section .journey-console {
  border-radius: 12px;
}
.protocol-section .protocol-right li {
  border-bottom: 1px solid #a6eeff40;
  padding-block: .65rem;
}
.simple-body-section .rich-text--simple h2 {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.request-panel {
  border: 1px solid var(--line);
}
.case-home-section .case-list-card__art {
  background-color: var(--palette-cinema);
}
.v5-privacy-copy h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: .65rem;
}
@media (max-width: 680px) {
  .story-map__grid {
    grid-template-columns: 1fr;
  }
  .story-map__intro h2 {
    max-width: 23ch;
  }
}
/* Chapter inserts carry the evidence between the reading beats. */
.case-scene {
  --scene-rule: var(--palette-signal-light);
  --trace: var(--palette-signal-light);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(var(--space-2), 3vw, 2.5rem);
  margin: 1.2rem 0 1.7rem;
  padding: clamp(.85rem, 3vw, 2rem);
  background: var(--palette-story-ground);
  color: var(--palette-story-ink);
}
.case-scene svg {
  width: 100%;
  fill: none;
  overflow: visible;
}
.case-scene figcaption {
  font-size: clamp(.95rem, 2vw, 1.35rem);
  font-weight: 650;
  line-height: 1.35;
}
.case-scene__trace {
  stroke: var(--trace);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--scene-progress));
  vector-effect: non-scaling-stroke;
}
.case-scene__point {
  fill: var(--trace);
  opacity: clamp(0, calc((var(--scene-progress) - .72) * 4), 1);
}
.case-scene--strata {
  --trace: #d3bcff;
  background: #211a39;
}
.case-scene--strata svg {
  transform: translateY(calc((1 - var(--scene-progress)) * 14px));
}
.case-scene--branches {
  --trace: #aef5e0;
  background: #102c34;
}
.case-scene--branches svg {
  transform: scaleX(calc(.9 + var(--scene-progress) * .1));
  transform-origin: left;
}
.case-scene::after {
  display: none;
}
/* The route illuminates, the library unfolds, and evidence resolves in place. */
[data-story-scene] :is(.section-heading-row h2, .manifesto-grid h2, .story-map__intro h2, .request-explanation h2) {
  transform: translateY(calc((1 - var(--scene-progress)) * 12px));
}
.story-map__stops li {
  transform: translateX(calc((1 - var(--scene-progress)) * 8px));
}
.atlas-section .journey-graphic {
  transform: translateY(calc((1 - var(--scene-progress)) * 12px));
}
.case-metrics-band .case-metric > span {
  transform: translateY(calc((1 - var(--scene-progress)) * 14px));
}
.case-home-section .case-list-card__art svg {
  transform: scale(calc(.92 + var(--scene-progress) * .08));
}
.insight-index-section .insight-art > i {
  opacity: calc(.45 + var(--scene-progress) * .55);
}
@media (max-width: 620px) {
  .case-scene {
    grid-template-columns: 1fr;
  }
  .case-scene svg {
    max-height: 100px;
  }
}
