/* The fiction reader shares the site's navigation and footer, not its article colors. */
body.sp-body[data-sp-page='story'] {
  --story-ink: #e8ebea;
  --story-muted: #a9b5b8;
  --story-accent: #a5e1e9;
  --story-rule: #35434a;
  --story-ground: #101517;
  --chrome-bg: #101517;
  --chrome-ink: #e8ebea;
  --chrome-muted: #a9b5b8;
  --chrome-accent: #a5e1e9;
  --chrome-line: #35434a;
  --chrome-hover: #233138;
  background: var(--story-ground);
  color: var(--story-ink);
  overflow-x: clip;
}

html.sp-flat [data-sp-page='story'] .sp-track { max-inline-size: none; padding: 0; }
.story { --story-gutter: max(1.125rem, env(safe-area-inset-left), env(safe-area-inset-right)); }
.story [hidden] { display: none; }
.story [id] { scroll-margin-block-start: 1.15rem; }
.story :is(a, button, input):focus-visible { outline: 2px solid var(--story-accent); outline-offset: 3px; }

.story-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-block-size: min(29rem, calc(100svh - var(--nav-h) - 5rem));
  border-block-end: 1px solid var(--story-rule);
  background: #070b10;
}
.story-hero picture, .story-hero::after { position: absolute; inset: 0; z-index: -1; }
.story-hero img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: center; }
.story-hero::after {
  content: '';
  background: linear-gradient(90deg, #070b10 1%, #070b10e8 27%, #070b1033 64%, transparent 90%),
    linear-gradient(0deg, #0b1115 0%, transparent 32%);
  pointer-events: none;
}
.story-hero-inner {
  inline-size: min(100%, 77rem);
  margin-inline: auto;
  padding: 2.25rem var(--story-gutter) 2.6rem;
}
.story-kicker, .story-byline, .story-start {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  font-size: .9375rem;
  line-height: 1.5;
}
.story-kicker { color: var(--story-accent); font-weight: 650; }
.story h1 {
  max-inline-size: 12ch;
  margin-block: .8rem 1rem;
  color: #f7f8f6;
  font: 400 4.875rem/.99 'SP Serif', Georgia, serif;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.story h1:lang(zh) { max-inline-size: none; font: 700 4.25rem/1.1 var(--ui-sans); }
.story-byline { gap: .4rem 1rem; color: #c9d4d7; }
.story-byline a { color: #f0f3f2; font-weight: 650; }
.story-byline a:hover { text-decoration: underline; text-underline-offset: .2em; }
.story-start {
  display: inline-flex;
  min-block-size: 2.75rem;
  margin-block-start: .9rem;
  padding-inline: .8rem;
  border: 1px solid #6f888c;
  border-radius: 3px;
  background: #10191cd9;
  color: var(--story-ink);
  font-weight: 650;
}
.story-start svg { rotate: -90deg; }
.story-start:hover { background: #263a40; }

.story-progress { position: fixed; z-index: 899; inset: var(--nav-h) 0 auto; block-size: 3px; pointer-events: none; }
.story-progress span {
  display: block;
  block-size: 100%;
  background: var(--story-accent);
  transform: scaleX(var(--story-progress, 0));
  transform-origin: left center;
}
@supports (view-timeline-name: --story-copy) and (timeline-scope: --story-copy) and (animation-range: contain) {
  @media (prefers-reduced-motion: no-preference) {
    .story { timeline-scope: --story-copy; }
    .story-body { view-timeline: --story-copy block; view-timeline-inset: var(--nav-h) 0px; }
    .story-progress span {
      animation: story-progress auto linear both;
      animation-timeline: --story-copy;
      animation-range: contain;
    }
  }
}
@keyframes story-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.story-grid {
  display: grid;
  gap: 1.6rem;
  align-items: start;
  max-inline-size: 83rem;
  margin-inline: auto;
  padding: 2.25rem var(--story-gutter) 4rem;
}
.story-lane, .story-rail { min-inline-size: 0; }
.story-lane { inline-size: min(100%, 42rem); margin-inline: auto; }
.story-rail { inline-size: min(100%, 42rem); margin-inline: auto; padding-block-end: .75rem; border-block-end: 1px solid var(--story-rule); }
.story-label { color: var(--story-muted); font: 600 .875rem/1.45 var(--ui-sans); }
.story-rail ol { display: flex; flex-wrap: wrap; gap: .125rem .5rem; margin-block-start: .3rem; }
.story-rail nav a {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-block-size: 2.75rem;
  padding: .3rem .4rem;
  color: var(--story-muted);
  font: 600 .9375rem/1.35 var(--ui-sans);
}
.story-rail nav a span, .story-scene span { color: var(--story-accent); font: 500 .85rem/1.5 var(--ui-mono); }
.story-rail nav a:hover { color: var(--story-accent); }
.story-rail nav a[aria-current='location'] { color: var(--story-accent); text-decoration: underline; text-underline-offset: .25em; }
.story-type { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-block-start: .35rem; }
.story-type .story-label { margin-inline-end: .25rem; }
.story-type button {
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  padding-inline: .4rem;
  border: 1px solid #54676d;
  border-radius: 3px;
  font: 650 .9375rem/1.2 var(--ui-sans);
}
.story-type button:not([aria-disabled='true']):hover { background: #263a40; }
.story-type button[aria-disabled='true'] { color: var(--story-muted); border-style: dashed; cursor: default; }

.story-body {
  font: 400 var(--story-text-size, 1.125rem)/1.8 Georgia, 'Times New Roman', serif;
  overflow-wrap: anywhere;
}
.story-body:lang(zh) { font-family: var(--ui-sans); line-height: 1.95; }
.story[data-text-size='0'] { --story-text-size: 1rem; }
.story[data-text-size='2'] { --story-text-size: 1.25rem; }
.story[data-text-size='3'] { --story-text-size: 1.375rem; }
.story[data-text-size='4'] { --story-text-size: 1.5rem; }
.story-body :is(.story-beat-lead, .story-beat-tail) > p, .story-body > p { margin-block: 0 1.05em; max-inline-size: 65ch; text-wrap: pretty; }
.story-body :is(.story-beat-lead, .story-beat-tail) > p:lang(zh), .story-body > p:lang(zh) { max-inline-size: 36em; }
.story-body strong { color: #fff; }
.story-scene {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin-block: 3.75rem 1.3rem;
  padding-block-start: .8rem;
  border-block-start: 1px solid var(--story-rule);
  font: 650 1.5rem/1.3 var(--ui-sans);
  color: #f4f6f5;
}
.story-scene:first-child { margin-block-start: 0; }
.story-break { margin-block: 2.3em 1.5em !important; color: var(--story-accent); text-align: center; }
.story-break + .story-scene { margin-block-start: 0; }
.story-body blockquote {
  margin: 1.2em 0;
  padding: .65em .9em;
  border-inline-start: 2px solid #7ab1bb;
  background: #18262b;
  color: #d3edf0;
  font: 400 .88em/1.72 var(--ui-mono);
  font-variant-numeric: tabular-nums;
}
.story-body blockquote.story-fault { background: #2a211c; border-color: #dfab83; color: #f2d5be; }
.story-beat + .story-beat { margin-block-start: 2rem; }
.story-beat-lead, .story-beat-tail { min-inline-size: 0; }
.story-comic { inline-size: min(100%, 30rem); margin: 1.65rem auto; }
.story-comic figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem 1rem;
  padding: .5rem 0;
  border-block-start: 1px solid var(--story-rule);
  color: var(--story-muted);
  font: 600 .875rem/1.35 var(--ui-sans);
}
.story-comic figcaption span:last-child { color: var(--story-accent); font-family: var(--ui-mono); }
.story-comic img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 2 / 3; background: #18262b; }

.story-gauge {
  margin-block: 1.8em;
  padding: 1rem;
  border: 1px solid #4f6570;
  background: #172227;
  color: var(--story-ink);
  font: 400 .88em/1.5 var(--ui-sans);
}
.story-gauge figcaption { margin-block-end: 1rem; font-weight: 700; }
.story-traces { display: grid; gap: .9rem; }
.story-trace { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .35rem .7rem; }
.story-trace dd { font-family: var(--ui-mono); font-variant-numeric: tabular-nums; }
.story-track {
  grid-column: 1 / -1;
  block-size: .5rem;
  background: repeating-linear-gradient(to right, #2b3f46 0 calc(25% - 1px), #60747a calc(25% - 1px) 25%);
}
.story-track > span { display: block; block-size: 100%; background: #aab9bd; transform: scaleX(var(--story-trace, 0)); transform-origin: left center; }
.story-track > [data-trace='inside'] { background: var(--story-accent); }
@media (prefers-reduced-motion: no-preference) { .story-track > span { transition: transform 230ms ease-out; } }
.story-slider-label { display: block; margin-block-start: 1.25rem; font-weight: 650; }
.story-gauge input[type='range'] { display: block; inline-size: 100%; min-block-size: 2.75rem; margin: 0; accent-color: var(--story-accent); cursor: pointer; }
.story-slider-ends { display: flex; justify-content: space-between; gap: .75rem; color: var(--story-muted); }
.story-samples { inline-size: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.story-samples :is(th, td) { padding: .55rem .35rem; border-block-start: 1px solid #4f6570; text-align: start; }

.story-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-block-start: 3rem;
  padding-block-start: .8rem;
  border-block-start: 1px solid var(--story-rule);
  color: var(--story-accent);
  font-size: .9375rem;
}
.story-end a { display: inline-flex; gap: .45rem; align-items: center; min-block-size: 2.75rem; text-decoration: underline; text-underline-offset: .22em; }

@media (min-width: 62rem) {
  .story-grid { grid-template-columns: minmax(9.5rem, 1fr) min(100%, 42rem) minmax(0, 1fr); gap: 2rem; }
  .story-rail { position: sticky; inset-block-start: calc(var(--nav-h) + 1.5rem); inline-size: min(100%, 11rem); margin-inline: auto 0; padding-block-end: 0; border: 0; }
  .story-rail ol { display: grid; gap: 0; }
  .story-type { margin-block-start: 1.2rem; }
  .story--comic .story-grid { max-inline-size: 88rem; grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr); }
  .story--comic .story-lane { inline-size: 100%; }
  .story-beat {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(14rem, 1fr);
    grid-template-areas: 'lead comic' 'tail comic';
    grid-template-rows: auto 1fr;
    column-gap: clamp(1.35rem, 2.85vw, 2.75rem);
    align-items: start;
  }
  .story-beat-lead { grid-area: lead; }
  .story-beat-tail { grid-area: tail; }
  .story-comic { grid-area: comic; margin-block: 0; }
}
@media (min-width: 62rem) and (min-height: 34rem) and (prefers-reduced-motion: no-preference) {
  /* The beat bounds the figure: it releases when its own passage ends. */
  .story-comic {
    position: sticky;
    inset-block-start: calc(var(--nav-h) + 1.5rem);
    inline-size: min(100%, 30rem, calc((100svh - var(--nav-h) - 5.5rem) * 0.6667));
  }
}
@media (max-width: 58rem) {
  .story h1 { font-size: 4.125rem; }
  .story h1:lang(zh) { font-size: 3.5rem; }
}
@media (max-width: 43.99rem) {
  .story-hero { min-block-size: 22rem; }
  .story-hero img { object-position: center 36%; }
  .story-hero::after { background: linear-gradient(0deg, #070b10 3%, #070b10f2 26%, #070b10aa 47%, transparent 83%); }
  .story-hero-inner { padding-block: 7rem 1.2rem; }
  .story h1 { font-size: 3.15rem; }
  .story h1:lang(zh) { font-size: 2.75rem; }
  .story-grid { padding-block-start: 1.2rem; }
  .story-scene { font-size: 1.35rem; }
}
@media (forced-colors: active) {
  .story-track > span, .story-progress span { background: Highlight; forced-color-adjust: none; }
}
@media print {
  .story { color: #000; }
  .story :is(.story-progress, .story-rail, .story-start, .story-end, .story-hero picture, [data-gauge-interactive]) { display: none; }
  .story [data-gauge-samples] { display: table; }
  .story-hero { min-block-size: 0; background: none; }
  .story-hero::after { content: none; }
  .story-grid { display: block; }
  .story :is(h1, h2, strong, blockquote, .story-gauge, .story-byline, .story-byline a, .story-kicker, .story-scene span, .story-break) { color: #000; background: none; }
}
