/* Stories page: map, story cards, story wall, and public story media. */

.story-map-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(1.6rem, 3.5vw, 3rem);
  align-items: stretch;
  width: min(100% - 2.4rem, var(--content));
  margin: 0 auto;
  padding: clamp(2.4rem, 6svh, 4rem) 0;
}

.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 589;
}

.us-map {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.story-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--red);
  color: var(--on-red);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0.4rem rgba(224, 56, 46, 0.18);
}

.story-marker:hover,
.story-marker:focus-visible,
.story-marker.is-active {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  background: var(--red-bright);
}

.story-page .selected-story-panel {
  padding: clamp(1.35rem, 2.4vw, 1.8rem);
  border: 1px solid var(--hairline);
  background: var(--coal);
}

.story-card {
  display: none;
}

.story-card.is-active {
  display: block;
}

.story-empty-copy h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

.story-empty-copy p {
  color: var(--paper-2);
}

.story-card-empty {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.story-card-empty span {
  height: 0.85rem;
  background: var(--coal-2);
}

.story-card-empty span:nth-child(2) {
  width: 82%;
}

.story-card-empty span:nth-child(3) {
  width: 64%;
}

.story-card-empty span:nth-child(4) {
  width: 46%;
}

.story-list-item {
  padding: 1.35rem;
  border: 1px solid var(--hairline);
  background: var(--coal);
}

.story-wall {
  width: min(100% - 2.4rem, var(--content));
  margin: 0 auto;
  padding: 1rem 0 clamp(3rem, 7svh, 5rem);
}

.story-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.story-media-stack {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.story-media-stack.compact {
  gap: 0.55rem;
}

.story-media {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--hairline);
  background: var(--coal-2);
}

.story-media figcaption {
  margin-bottom: 0.5rem;
  color: var(--paper-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.story-media audio,
.story-media video,
.story-media-stack audio,
.story-media-stack video {
  width: 100%;
}

.story-media video,
.story-media-stack video {
  aspect-ratio: 16 / 9;
  background: var(--black);
}

@media (max-width: 900px) {
  .story-map-section {
    grid-template-columns: 1fr;
  }

  .story-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .story-media audio,
  .story-media-stack audio {
    height: 3.4rem;
  }

  .story-media video,
  .story-media-stack video {
    height: auto;
    object-fit: cover;
  }
}
