/* Shared reading and interaction patterns for the five visual stories. */
.visual-story {
  --story-gap-sm: 8px;
  --story-gap: 16px;
  --story-gap-lg: 32px;
}
.visual-story main :is(a[href], button, input, summary):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.visual-story main button:disabled {
  opacity: .58;
  cursor: default;
}
html:not(.has-script) .visual-story :is(.story-jump, .map-layer-state, main button, main input[type="range"]),
.visual-story [hidden] {
  display: none !important;
}
.visual-story .story-jump {
  display: inline-flex;
  align-items: center;
  gap: var(--story-gap);
  width: fit-content;
  min-height: 44px;
  margin-top: var(--story-gap);
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: inherit;
  font: 650 14px/1.3 var(--lb-ui);
  text-decoration: none;
}
.visual-story .story-jump:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.visual-story .viz-state {
  margin: var(--story-gap) 0;
  padding: 8px 12px;
  border-inline-start: 2px solid currentColor;
  color: inherit;
  font: 500 14px/1.5 var(--lb-ui);
}
.visual-story :is(.seg button, .tab, .chip, .btn) {
  min-height: 36px;
}
@media (max-width: 600px) {
  .visual-story :is(.seg button, .tab, .chip, .btn) {
    min-height: 44px;
  }
}

/* Lika: the buried share leads the field notes. */
.story--lika .hero-stats {
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
}
.story--lika .hero-stat {
  padding: 16px;
}
.story--lika .hero-stat:first-child {
  background: color-mix(in srgb, var(--editorial) 9%, var(--sheet));
}
.story--lika .hero-stat:not(.stat-lead) strong {
  font-size: clamp(23px, 2.5vw, 32px);
}
.story--lika .stat-lead strong {
  font-size: clamp(38px, 4.5vw, 58px);
}
.story--lika .hero-stat .stat-label {
  margin-bottom: 8px;
  font-size: 12px;
}
.story--lika .hero-stat .stat-note {
  margin-top: 6px;
  font-size: 12px;
}
.story--lika .buried-share {
  display: block;
  width: calc(100% - 24px);
  height: 5px;
  margin-top: 12px;
  background: var(--rule-2);
}
.story--lika .buried-share::before {
  content: "";
  display: block;
  width: 74.7%;
  height: 100%;
  background: var(--editorial);
}
.story--lika .fig,
.story--lika .xsec-fig {
  background-image: none;
  border-radius: 3px;
  box-shadow: none;
}
.story--lika .timeline-empty { padding-bottom: var(--story-gap); }
.story--lika .xsec-fig {
  border-top: 3px solid var(--editorial);
}
@media (max-width: 760px) {
  .story--lika .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story--lika .hero-stat:first-child { grid-column: 1 / -1; }
  .story--lika .hero-stat:nth-child(n+2) { border-top: 1px solid var(--rule); }
  .story--lika .hero-stat:nth-child(2) { border-inline-start: 0; }
  .story--lika .hero-stat:nth-child(3) { border-inline-start: 1px solid var(--rule); }
}
@media (max-width: 470px) {
  .story--lika .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story--lika .hero-stat:last-child { grid-column: 1 / -1; border-inline-start: 0; }
}

/* Topusko: the transformer plate highlights its rated connection. */
.story--datacentar .hero h1 {
  font-size: clamp(51px, 8.5vw, 120px);
}
.story--datacentar .hero h1 span {
  white-space: normal;
}
.story--datacentar .plate dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.story--datacentar .plate dl > a {
  padding: 12px 10px 14px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
}
.story--datacentar .plate dl > a:nth-child(odd):not(:first-child):not(:last-child) {
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--rule);
}
.story--datacentar .plate dl > :is(:first-child, :last-child) {
  grid-column: 1 / -1;
}
.story--datacentar .plate dl > :last-child {
  border-bottom: 0;
}
.story--datacentar .plate-lead strong {
  color: var(--editorial);
  font-size: clamp(48px, 5.2vw, 72px);
}
.story--datacentar .project-update {
  border: 0;
  border-block: 1px solid var(--rule-2);
  border-radius: 0;
  padding: 16px 0;
  background: transparent;
}
.story--datacentar .project-update h2 { max-width: none; }
.story--datacentar .fig {
  box-shadow: none;
}
.story--datacentar .sld-fig {
  border-top: 3px solid var(--editorial);
}
@media (max-width: 600px) {
  .story--datacentar .hero h1 { font-size: clamp(46px, 14vw, 78px); }
}

/* Pacific: keep the temperature readout beside the month being inspected. */
.story--elnino .hero {
  --ink: var(--on-abyss);
}
.story--elnino .hero-head {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: var(--story-gap-lg);
}
.story--elnino .pacific-figure {
  margin: 0;
}
.story--elnino .hero .map-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.story--elnino .readout {
  border: 0;
  border-top: 1px solid var(--abyss-rule);
  padding: 12px 0 0;
}
.story--elnino .ro-val {
  font-size: clamp(27px, 3.7vw, 47px);
}
.story--elnino .ro-primary .ro-val {
  font-size: clamp(37px, 4.8vw, 64px);
  color: var(--on-abyss);
}
.story--elnino :is(.ro-note, .map-note, .mbtn) {
  color: var(--on-abyss-2);
}
.story--elnino .map-note {
  margin-top: 8px;
}
.story--elnino .play {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 2px;
  font: 650 13px/1.25 var(--lb-ui);
}
.story--elnino .play svg {
  flex: none;
}
.story--elnino .mbtn {
  min-height: 40px;
  text-align: center;
}
@media (max-width: 700px) {
  .story--elnino .scrub { display: grid; grid-template-columns: minmax(0, 1fr); }
  .story--elnino .play { justify-self: start; }
  .story--elnino .hero .map-foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .story--elnino .ctrl { flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
  .story--elnino .seg { flex-wrap: wrap; max-width: 100%; }
  .story--elnino .ranks :is(th, td) { padding-inline-end: 6px; }
  .story--elnino .ranks th { white-space: normal; }
}

/* AMOC: a current meter and presets sit beside the globe. */
.story--amoc .instrument {
  margin-top: 24px;
  padding: 16px;
  border-top: 2px solid var(--cold);
  background: var(--sheet);
}
.story--amoc .inst-title {
  margin: 0 0 6px;
  font: 600 clamp(24px, 3vw, 32px)/1.05 var(--serif);
}
.story--amoc .inst-guide {
  margin: 0 0 14px;
  color: var(--muted);
  font: 500 13px/1.45 var(--lb-ui);
}
.story--amoc .readout .val {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.story--amoc .preset {
  min-height: 44px;
  border-radius: 2px;
}
.story--amoc .preset[aria-pressed="true"] {
  background: var(--cold-wash);
}
.story--amoc .status {
  margin-top: 12px;
  min-height: 3em;
}
.story--amoc .map-layer-state {
  text-align: start;
}
@media (max-width: 900px) {
  .story--amoc .instrument { margin-top: 16px; }
}

/* Zavadlav: the sentence anchors the case, with the other facts beside it. */
.story--zavadlav .facts {
  grid-template-columns: minmax(0, 1.55fr) repeat(5, minmax(0, 1fr));
}
.story--zavadlav .facts > div {
  justify-content: end;
}
.story--zavadlav .facts .is-key {
  padding: 16px;
  background: color-mix(in srgb, var(--stamp) 8%, var(--sheet));
}
.story--zavadlav .facts .is-key dd {
  font-size: clamp(48px, 6vw, 76px);
}
.story--zavadlav .stamp-word {
  font-size: clamp(23px, 3.4vw, 40px);
}
.story--zavadlav .sheet {
  border-radius: 3px;
}
@media (max-width: 900px) {
  .story--zavadlav .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story--zavadlav .facts > div:nth-child(n) { padding: 12px; border: 0; border-top: 1px solid var(--rule); }
  .story--zavadlav .facts .is-key { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .story--zavadlav .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story--zavadlav .facts > div:last-child { grid-column: 1 / -1; }
}
