/* Recap article page. Layout matches the 2026-11-16 approved mock.
   Shared recap cards, subscribe band, and solid nav come from news-index.css. */

.article-page {
  --col: min(1120px, calc(100vw - 32px));
  --media: min(880px, calc(100vw - 32px));
  --read: min(680px, calc(100vw - 32px));
  overflow-x: clip;
}

.article-page main {
  width: 100%;
  max-width: none;
  margin: 0;
}

.article-top {
  width: var(--media);
  margin: 0 auto;
  padding: 20px 0 16px;
}
.back-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover { color: var(--text); }

.article-cover {
  width: var(--media);
  margin: 0 auto 8px;
}
.article-cover picture {
  display: block;
  width: 100%;
}
.article-cover img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border-radius: 14px;
  background: #0a0a0c;
}
.article-cover figcaption {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.article-head {
  width: var(--read);
  margin: 28px auto 0;
}
.article-head .kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-head h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--strong);
  text-wrap: pretty;
}
@media (min-width: 701px) {
  .article-head h1 .headline-rest { display: block; }
}
.article-head .lede {
  margin: 14px 0 0;
  font-size: 19px;
  line-height: 1.45;
  color: var(--text);
  text-wrap: pretty;
}
.byline {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.byline a { color: var(--muted); text-decoration: none; }
.byline a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.byline .dot { display: inline; width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; margin: 0 0.35em; color: var(--muted); }

.article-page .story-body {
  width: var(--read);
  margin: 36px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}
.article-page .story-body p { margin: 0 0 1.15em; }
.article-page .story-body h2 {
  margin: 2.1em 0 0.55em;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--strong);
}
.article-page .story-body h3 {
  margin: 1.6em 0 0.4em;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--strong);
}
.article-page .story-body a { text-underline-offset: 3px; }
.article-page .story-body a:hover { color: var(--strong); }
.article-page .story-body em { font-style: italic; }
.article-page .story-body strong { font-weight: 600; color: var(--strong); }
.article-page .story-body ul,
.article-page .story-body ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.article-page .story-quote {
  margin: 0 0 1.15em;
}

/* Cover and charts sit on the wider media measure, centered with the back link. */
.article-page .story-figure {
  width: var(--media);
  max-width: none;
  margin: 1.4em auto 1.6em;
  margin-left: calc(50% - var(--media) / 2);
  margin-right: calc(50% - var(--media) / 2);
}
.article-page .story-figure picture {
  display: block;
  width: 100%;
}
.article-page .story-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  background: var(--card);
}
.article-page .story-figure figcaption {
  width: auto;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
/* X-style swipeable gallery for image_row / consecutive images. */
.article-page .story-carousel {
  --peek: 28px;
  --carousel-gap: 12px;
  --slide-h: min(480px, calc(var(--media) - var(--peek) - var(--carousel-gap)));
}
.article-page .story-carousel-viewport {
  position: relative;
}
.article-page .story-carousel-track {
  display: flex;
  align-items: stretch;
  gap: var(--carousel-gap);
  height: var(--slide-h);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
}
.article-page .story-carousel-track::-webkit-scrollbar { display: none; }
.article-page .story-carousel-slide {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  width: auto;
  max-width: calc(var(--media) - var(--peek));
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
.article-page .story-carousel-slide:last-child { max-width: var(--media); }
.article-page .story-carousel-slide picture {
  display: block;
  width: auto;
  height: 100%;
  max-width: calc(var(--media) - var(--peek));
}
.article-page .story-carousel-slide:last-child picture { max-width: var(--media); }
.article-page .story-carousel-slide img {
  display: block;
  width: auto;
  height: 100%;
  max-width: calc(var(--media) - var(--peek));
  object-fit: contain;
  border-radius: 14px;
  background: var(--card);
}
.article-page .story-carousel-slide:last-child img { max-width: var(--media); }
.article-page .story-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}
.article-page .story-carousel.is-ready .story-carousel-btn { display: grid; }
.article-page .story-carousel-btn::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.article-page .story-carousel-btn svg { position: relative; z-index: 1; }
.article-page .story-carousel-btn:hover::before { background: rgba(0, 0, 0, 0.6); }
.article-page .story-carousel-btn:focus { outline: none; }
.article-page .story-carousel-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.article-page .story-carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.article-page .story-carousel-btn:disabled:hover::before { background: rgba(0, 0, 0, 0.45); }
.article-page .story-carousel-prev { left: 8px; }
.article-page .story-carousel-next { right: 8px; }
.article-page .story-carousel-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.article-page .story-carousel-track:focus { outline: none; }
.article-page .story-carousel-track:focus-visible {
  outline: 2px solid var(--strong);
  outline-offset: 3px;
  border-radius: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .article-page .story-carousel-track { scroll-behavior: auto; }
}

.article-page .story-body h2 + .story-embed { margin-top: 0.85em; }

/* Official widget. Keep the blockquote in flow as the no-JS fallback; do not clip it. */
.article-page .story-embed {
  margin: 1.25em auto 1.5em;
  max-width: 550px;
  position: relative;
}
.article-page .story-embed .twitter-tweet {
  margin: 0 auto;
  max-width: 100%;
}
.article-page .story-embed iframe,
.article-page .story-embed .twitter-tweet-rendered {
  margin: 0 auto !important;
  max-width: 100% !important;
  border-radius: 12px;
  overflow: hidden;
}

.article-page .story-x { margin-top: 8px; }

.more-recaps {
  width: var(--col);
  margin: 80px auto 0;
}
.more-head { margin: 0 0 22px; }
.more-head .back-link { display: inline-block; margin-bottom: 14px; }
.more-recaps h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--strong);
}

@media (max-width: 700px) {
  .article-top { padding: 16px 0 12px; }
  .article-head { margin-top: 22px; }
  .article-head h1 { font-size: 30px; letter-spacing: -0.03em; }
  .article-head .lede { font-size: 17px; }
  .article-page .story-body { margin-top: 28px; font-size: 17px; }
  .article-page .story-body h2 { font-size: 22px; margin-top: 1.8em; }
  .article-page .story-figure {
    width: var(--read);
    margin-left: 0;
    margin-right: 0;
  }
  .article-page .story-carousel.is-ready .story-carousel-btn { display: none; }
  .article-page .story-carousel-count { right: calc(var(--peek) + var(--carousel-gap) + 8px); }
  .more-recaps { margin-top: 56px; }
  .more-recaps h2 { font-size: 22px; }
}
