/* One gallery band, with shared heading, media and disclosure spacing. */
.highlights-section {
  --story-card-width: min(var(--width), calc(100vw - var(--gutter) * 2));
  --story-card-height: clamp(520px, calc(100svh - 280px), 720px);
  padding: 80px 0 56px;
  background: var(--surface);
  overflow: hidden;
  scroll-margin-top: 0;
}
.story-track {
  position: relative;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline: max(var(--gutter), calc((100% - var(--story-card-width)) / 2));
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-x pan-y;
}
.story-track::-webkit-scrollbar { display: none; }
.story-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.story-track img { -webkit-user-drag: none; }
.story-track:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.research30 .story-card {
  flex: 0 0 var(--story-card-width);
  width: var(--story-card-width);
  max-width: none;
  height: var(--story-card-height);
  min-width: 0;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.story-card-heading { padding: 32px 40px 20px; flex: none; text-align: left; }
.research30 .story-card-heading h2 {
  max-width: 32ch;
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -1.1px;
  text-wrap: balance;
}
.story-card > .story-card-heading h2 { max-width: none; min-height: 1.12em; }
.story-card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 40px 24px;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}
.story-card-body .container { width: 100%; max-width: none; margin-inline: 0; padding: 0; }
.story-card-body .section-heading:not(:has(*)),
.story-card-body .asset-heading:not(:has(*)),
.story-card-body .rgb-heading:not(:has(*)),
.story-card-body .research-heading:not(:has(*)) { display: none; }
.story-card-body .atlas-overview { height: 100%; display: flex; align-items: center; justify-content: center; margin: 0; }
.story-card-body .atlas-overview img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.story-card--diversity .story-card-body { display: flex; flex-direction: column; padding-inline: 12px; }
.story-card--diversity .atlas-overview { flex: 1; min-height: 180px; height: auto; }
.story-card--diversity .atlas-overview picture { display: block; width: 100%; height: 100%; }
.research30 .story-card--diversity details.explanation { flex: none; margin-inline: 28px; }
.story-card-body video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(var(--story-card-height) - 220px);
  object-fit: contain;
  background: #fff;
  border-radius: 0;
}
.research30 .story-card--render video { aspect-ratio: 14/11; max-height: calc(var(--story-card-height) - 220px); }
.research30 .story-card-body .rgb-ribbon { width: 100%; margin: 0; }
.story-card-body details.explanation { margin: 20px 0 0; border-color: #ececef; }
.story-card-body .explanation > summary { font-size: 13px; padding: 12px 0; line-height: 1.5; }
.story-card-body .explanation-body { padding: 20px; font-size: 14px; line-height: 1.65; }
.story-card-body .explanation-body p { max-width: 68ch; }
.research30 .story-card--rgb .rgb-task-labels { padding: 0 0 10px; border: 0; font-size: 13px; font-weight: 500; line-height: 1.5; }
.story-card--rgb .rgb-task-labels > span:first-child { color: #2c737e; }
.story-card--rgb .rgb-task-labels > span + span { color: #9c684b; border: 0; }
.highlights-controls { width: var(--story-card-width); margin: 24px auto 0; display: flex; align-items: center; gap: 12px; }
.story-dots { display: flex; align-items: center; margin-right: auto; }
.story-dots button { border: 0; background: transparent; padding: 12px 7px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.story-dots button::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 10px; background: #c6c6cb; transition: width .2s, background .2s; }
.story-dots button[aria-current=true]::before { width: 22px; background: #303034; }
.story-arrow { display: grid; place-items: center; width: 42px; height: 42px; padding: 0 0 3px; border: 0; border-radius: 50%; background: #e7e7eb; color: #353538; font: 30px/1 Arial, sans-serif; }
.story-arrow:disabled { opacity: .3; cursor: default; }
.story-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The code chapter returns to the open white page, rather than another card. */
.code-section { padding: 104px 0 80px; background: #fff; scroll-margin-top: 88px; }
.code-card { width: min(var(--width), calc(100% - var(--gutter) * 2)); margin-inline: auto; background: transparent; border-radius: 0; overflow: visible; }
.code-card .story-card-heading { padding: 0 0 40px; }
.code-card .story-card-body { overflow: visible; padding: 0; }
.code-card .quickstart { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.5fr); gap: 48px; align-items: start; margin: 0; padding: 0; border: 0; }
.code-card .quickstart h3 { font-size: 23px; font-weight: 600; line-height: 1.3; margin-bottom: 10px; }
.code-card .quickstart p { font-size: 15px; line-height: 1.6; color: var(--text); }
.code-card .code-panel { min-width: 0; margin: 0; padding: 24px; border: 0; border-radius: 16px; background: var(--surface); }
.code-card .code-heading { font-size: 12px; }
.code-card pre { margin-top: 20px; font-size: 13px; line-height: 1.65; }
.code-card .usage-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.code-card .usage-links > a { padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.code-card .usage-links h3 { margin: 12px 0; font-size: 21px; font-weight: 600; line-height: 1.3; }
.code-card .usage-links p { font-size: 14px; line-height: 1.6; }
.code-card details.explanation { margin-top: 40px; }
.code-card .explanation > summary { font-size: 13px; padding-block: 16px; }
.code-card .explanation-body { padding: 24px; font-size: 14px; line-height: 1.65; }
.code-card .explanation-body p { max-width: 68ch; }

@media (min-width: 701px) and (max-height: 800px) {
  .highlights-section { padding-block: 48px 40px; }
  .highlights-controls { margin-top: 20px; }
}
@media (max-width: 700px) {
  .highlights-section { --story-card-height: clamp(500px, calc(100svh - 180px), 680px); padding-block: 48px 40px; }
  .story-track { gap: 16px; padding-inline: var(--gutter); }
  .research30 .story-card { height: auto; min-height: var(--story-card-height); border-radius: 20px; }
  .story-card-heading { padding: 28px 24px 24px; }
  .research30 .story-card-heading h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.8px; }
  .story-card > .story-card-heading h2 { min-height: 2.3em; }
  .story-card-body { padding: 0 24px 24px; }
  .story-card--rgb .story-card-body, .story-card--render .story-card-body { flex: none; }
  .story-card--diversity .story-card-body { flex: none; padding-inline: 8px; }
  .story-card--diversity .atlas-overview { flex: none; min-height: 0; height: auto; }
  .story-card--diversity .atlas-overview picture { height: auto; }
  .research30 .story-card--diversity .atlas-overview img { display: block; width: 100%; height: auto; max-height: none; }
  .research30 .story-card--diversity details.explanation { margin-inline: 16px; }
  .story-card[data-active="false"] .explanation-body { display: none; }
  .research30 .story-card--rgb .rgb-ribbon video, .research30 .story-card--render .transfer-film video { aspect-ratio: 2/3; max-height: none; }
  .story-card-body details.explanation { margin-top: 20px; }
  .story-card-body .explanation > summary { font-size: 12px; }
  .highlights-controls { gap: 10px; margin-top: 20px; }
  .story-arrow { width: 38px; height: 38px; }
  .story-dots button { padding-inline: 6px; }
  .code-section { padding-block: 64px 48px; }
  .code-card .story-card-heading { padding-bottom: 32px; }
  .code-card .story-card-heading h2 { font-size: 32px; }
  .code-card .quickstart { grid-template-columns: 1fr; gap: 24px; }
  .code-card .quickstart h3 { font-size: 21px; }
  .code-card .code-panel { padding: 20px; border-radius: 12px; }
  .code-card pre { font-size: 12px; }
  .code-card .usage-links { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
  .code-card .usage-links h3 { margin-block: 10px; font-size: 21px; }
  .code-card details.explanation { margin-top: 32px; }
  .code-card .explanation-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-track { scroll-behavior: auto; }
  .story-dots button::before { transition: none; }
}
