/* Put the sample-efficiency comparison in the first screen. */
.pde-editorial .hero {
  padding-top: clamp(26px, 4vw, 49px);
  padding-bottom: 38px;
}
.pde-editorial .hero .hero-project-label { margin-bottom: 13px; }
.pde-editorial .hero h1 {
  margin-bottom: 15px;
  font-size: clamp(43px, 6.25vw, 78px);
  letter-spacing: -.064em;
}
.pde-editorial .hero h1 > span { white-space: nowrap; }
.pde-editorial .hero .subtitle { font-size: clamp(16px, 2vw, 22px); }
.pde-editorial .hero .authors { margin-top: 17px; }
.pde-editorial .hero .affiliations { margin: 13px auto 0; }
.pde-editorial .hero .hero-claim {
  max-width: none;
  margin: 30px auto 18px;
  color: #302a3c;
  font-size: clamp(16px, 5vw, 53px);
  line-height: 1.06;
  letter-spacing: -.047em;
}
.hero-claim strong {
  color: #6743ad;
  font-weight: 700;
}
.efficiency-story {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 22px 13px;
  text-align: left;
  border: 1px solid #e9e2f1;
  border-radius: 20px;
  background: #fff;
}
.story-heading {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  min-height: 48px;
  margin-bottom: 9px;
  color: #514461;
  font-size: 13px;
}
.pde-editorial .story-cue { grid-column: 2; margin: 0; color: #514461; font-size: clamp(17px, 2.4vw, 28px); line-height: 1.2; text-align: center; }
.story-cue strong { color: #6a409e; }
#story-playback {
  grid-column: 3;
  justify-self: end;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: #60448d;
  font-size: 12px;
  white-space: nowrap;
}
.story-rollouts {
  display: grid;
  width: min(100%, 900px);
  margin-inline: auto;
}
.story-stage {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1.5vw, 16px);
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: opacity 280ms ease, transform 280ms ease, visibility 0s linear 280ms;
}
.story-stage.is-current {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.story-fail { color: #a33a5a; }
.story-win { color: #16714f; }
.story-clip-ppo .story-clip-label { color: #d2e8ff; }
.story-clip-pde .story-clip-label { color: #ecd8ff; }
.story-media {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
}
.story-media video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.story-clip-label {
  position: absolute;
  inset: auto 0 0;
  padding: 14px 7px 5px;
  background: linear-gradient(transparent, #171225e8);
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 600;
  line-height: 1.2;
}
.pde-editorial .story-clip-caption {
  display: grid;
  gap: 2px;
  margin: 10px 0 8px;
  padding-inline: 2px;
  color: #514461;
  font-size: clamp(13px, 1.65vw, 17px);
  line-height: 1.3;
}
.story-clip-caption strong { color: #30263d; font-size: clamp(16px, 2vw, 23px); font-weight: 700; }
.story-clip-caption [role="img"] { margin-right: 2px; }
.story-chart { display: block; width: 100%; height: auto; }
.story-grid { fill: none; stroke: #e0d9ea; }
.story-target { stroke: #aea1be; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.story-target.is-current { stroke: #8254b5; stroke-width: 1.5; }
.story-axis { fill: #6c607c; font-size: 17px; }
.story-trace { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.story-trace-pde { stroke: #7545b7; }
.story-trace-ppo { stroke: #326a9f; }
.story-point-pde, .story-label-pde { fill: #7545b7; }
.story-label-ppo { fill: #326a9f; }
.story-point-pde { stroke: #fff; stroke-width: 2px; }
.story-origin { fill: #326a9f; stroke: #7545b7; stroke-width: 3; }
/* Show the full curves immediately; highlight progress alongside the videos. */
.story-curve-preview { opacity: .5; }
.story-curve-preview, .story-curve-progress { transition: opacity 280ms ease; }
.efficiency-story.is-at-start .story-curve-progress { opacity: 0; }
.story-series { font-size: 19px; font-weight: 700; }
@media (max-width: 600px) {
  .efficiency-story { padding: 12px; border-radius: 15px; }
  .story-media video { aspect-ratio: 1.4; }
  .story-clip-label { padding: 12px 4px 4px; }
  .story-axis { font-size: 28px; }
  .story-series { font-size: 29px; }
  .story-chart { margin-bottom: 3px; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .story-stage, .story-curve-preview, .story-curve-progress { transition: none; }
  .story-stage { transform: none; }
}
.exploration-example {
  max-width: 1108px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.pde-editorial #real #idea { padding: 0; background: transparent; }
.pde-editorial #real, .pde-editorial #real .learning-hero { background: #fff; }
@media (max-width: 600px) {
  .exploration-example { padding: 0 20px 31px; }
}
.learning-hero {
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 24px 12px;
  text-align: left;
  background: #fbfaff;
  border: 1px solid #e9e2f0;
  border-radius: 22px;
}
.pde-editorial .learning-hero #idea { margin: 0; padding: 0; background: transparent; }
.learning-hero .ec-panels, .behavior-modes { gap: 18px; }
.learning-hero .ec-film { aspect-ratio: 16/9; border-radius: 10px; background: #23212b; }
.pde-editorial .learning-hero #idea .ec-film video { background: #23212b; }
.pde-editorial .learning-hero #idea .ec-verdict {
  margin: 10px 0 0;
  text-align: center;
  font-size: clamp(12px, 1.55vw, 16px);
  line-height: 1.4;
  font-weight: 650;
}
.pde-editorial .learning-hero #idea .ec-summary {
  margin: 9px 0 0;
  color: #493c59;
  text-align: center;
  font-size: clamp(14px, 1.55vw, 18px);
  line-height: 1.35;
  font-weight: 600;
}
.learning-hero .ec-fail { color: #9b425c; }
.learning-hero .ec-win { color: #217652; }
.learning-hero .ec-controls {
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 15px;
  padding-top: 7px;
}
.learning-hero .ec-attempt,
.learning-hero .ec-recording-note {
  width: auto;
  margin: 0;
  color: #706779;
  font-size: 12px;
}
.learning-hero .ec-recording-note { margin-left: auto; }
.learning-hero .ec-play { min-width: 0; font-weight: 600; }
@media (max-width: 600px) {
  .learning-hero { padding: 14px 12px 9px; border-radius: 16px; }
  .learning-hero .ec-panels, .behavior-modes { gap: 9px; }
  .learning-hero .ec-film { aspect-ratio: 4/3; }
  .learning-hero .ec-controls { column-gap: 11px; }
  .learning-hero .ec-attempt,
  .learning-hero .ec-recording-note { font-size: 11px; }
}

.behavior-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 12px;
  text-align: center;
}
.behavior-modes > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pde-editorial .behavior-modes h3 { margin: 0; font-size: clamp(15px, 2vw, 23px); }
.pde-editorial .behavior-modes p { margin: 4px 0 0; color: #554769; font-size: clamp(14px, 1.65vw, 18px); }
.pde-editorial .behavior-modes .mode-prompt { margin-top: 9px; color: inherit; font-weight: 650; font-style: italic; }
.pde-editorial .behavior-modes .mode-prompt.mode-blue { color: #286496; }
.pde-editorial .behavior-modes .mode-prompt.mode-purple { color: #7044aa; }
.pde-editorial .behavior-modes .mode-prompt.mode-orange { color: #a64921; }
.behavior-modes svg { display: block; width: 100%; max-width: 380px; margin: auto auto 0; }
.pde-editorial .behavior-modes > div:first-child h3 { color: #2d6ca8; }
.pde-editorial .behavior-modes > div:last-child h3 { color: #6a409e; }
.mode-blue { color: #3379b6; stroke: currentColor; }
.mode-purple { color: #8354bf; stroke: currentColor; }
.mode-orange { color: #c45b2e; stroke: currentColor; }
.mode-band, .mode-trace { fill: none; stroke-linecap: round; }
.mode-band { stroke-width: 16; opacity: .14; }
.mode-trace { stroke-width: 2.5; stroke-dasharray: 100; stroke-dashoffset: 100; }
.mode-start { fill: #3d304d; }
.mode-goal { fill: #fbf9ff; stroke: #c45b2e; stroke-width: 2; }
.mode-goal-dot { fill: #c45b2e; }

.pde-editorial .real-examples { padding: clamp(42px, 6vw, 80px) 24px; background: var(--wash); }
.pde-editorial .real-examples .section-head { margin-bottom: 16px; }
#real-examples-play {
  display: block;
  margin: 0 auto 22px;
  padding: 8px 18px;
  border: 1px solid #d8c8e9;
  border-radius: 24px;
  background: #fff;
  color: #6743ad;
  font-weight: 650;
}
.real-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: auto;
}
.real-example-card {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  gap: 13px;
  padding: 14px;
  border: 1px solid #e9e2f1;
  border-radius: 16px;
  background: #fff;
}
.real-example-card h3 { margin: 0; color: #30263d; text-align: center; }
.real-example-card figure { margin: 0; }
.real-example-card video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 9px; background: #25212d; }
.real-example-card figcaption { display: grid; gap: 2px; margin-top: 6px; color: #493c59; font-size: 14px; }
@media (max-width: 760px) {
  .real-example-grid { grid-template-columns: 1fr; max-width: 480px; }
}

.pde-editorial :is(
  .story-clip-caption > span,
  .mode-prompt,
  .swarm-prompt,
  #swarm-focus-title,
  #swarm-guide-title,
  .lrv-item-txt,
  #lrv-ptext,
  .real-example-card figcaption em
) { font-style: italic; }

.pde-editorial .hero .hero-claim-context {
  margin: -7px auto 20px;
  color: #514461;
  font-size: clamp(15px, 1.9vw, 20px);
  line-height: 1.4;
}

.pde-editorial #results .result-summary span {
  color: #514461;
  font-size: clamp(14px, 1.65vw, 18px);
}
.pde-editorial #results .result-summary a { color: inherit; }
.pde-editorial :is(#results, #simulation) .chart-footer { justify-content: flex-end; font-size: 14px; }

.pde-editorial .paper-method-figure {
  border: 1px solid #e9e2f1;
  box-shadow: 0 10px 28px #48356a0a;
}
.posterior-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 860px;
  margin-inline: auto;
}
.posterior-comparison article { padding: 20px; border: 1px solid #e9e2f1; border-radius: 16px; background: #fff; }
.posterior-comparison h3 { margin: 0 0 8px; color: #6743ad; }
.posterior-comparison p { margin: 0; color: #514461; line-height: 1.5; }
.posterior-comparison math { margin-top: 13px; color: #493762; font-size: clamp(17px, 2.35vw, 22px); }
.posterior-comparison .posterior-objective { margin-top: 17px; font-weight: 600; }
.pde-editorial .posterior-core { margin: 18px auto 0; text-align: center; color: #493c59; }
.pde-editorial #posterior .theory-foundations { justify-content: center; }
.pde-editorial #simulation .chart-uncertainty { font-size: 14px; color: #514461; }
.chart-legend-entry { display: grid; justify-items: center; }
.pde-editorial .chart-legend-entry .legend-button { padding-bottom: 3px; font-weight: 600; }
.legend-citation {
  padding: 3px 4px 5px;
  color: #625078;
  font-size: .875rem;
  text-decoration: underline;
  text-decoration-color: #c2b4d4;
  text-underline-offset: 3px;
  white-space: nowrap;
}
@media (max-width: 860px) {
  .pde-editorial #chart-legend { max-width: 490px; margin-inline: auto; }
}
@media (max-width: 620px) {
  .posterior-comparison { grid-template-columns: 1fr; }
}
