/* atlvibe — a story page (/blog/<headline>-<id8>), built from the app's news feed by _shared/story-render.ts.
   The app's reader on the site's ground: the section's colour (--sec-h, the app's hue for it), a heavy sans headline,
   serif prose with a raised initial, fact boxes, spec tables, pull quotes, numbered entries. The feed's video is a
   vertical short (9:16): beside the text on a wide screen, under the standfirst on a phone. */

.story {
  --sec: hsl(var(--sec-h, 18) 82% 66%);
  --sec-soft: hsl(var(--sec-h, 18) 82% 66% / 0.09);
  --sec-line: hsl(var(--sec-h, 18) 82% 66% / 0.45);
  width: 100%;
  padding: 0 16px 4rem;
}
.story__inner {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3.5rem;
}
.story__crumbs, .story__head, .story__body, .story__end, .story__more { min-width: 0; }

.st-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── masthead ─────────────────────────────────────────────────────────── */
.story__crumbs { font-size: 0.82rem; color: var(--faint); margin: 1.25rem 0 1.75rem; }
.story__crumbs a { color: var(--muted); text-decoration: none; }
.story__crumbs a:hover { color: var(--cream); }

.story__kicker {
  margin: 0 0 0.85rem;
  color: var(--sec);
  font: 700 0.74rem/1 var(--sans);
  letter-spacing: 0.2em;
}
.story__title {
  margin: 0 0 1.1rem;
  color: var(--cream);
  font: 700 clamp(2.05rem, 5.6vw, 3.45rem)/1.04 var(--sans);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.st-standfirst {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font: 500 clamp(1.08rem, 2.2vw, 1.25rem)/1.5 var(--sans);
  text-wrap: pretty;
}
.story__meta {
  margin: 0 0 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font: 600 0.84rem/1.4 var(--sans);
}

/* ── the photo or the video ───────────────────────────────────────────── */
.st-media { margin: 0 auto 2.2rem; width: min(100%, 22rem); }
.st-media img, .st-media video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 0 0 1px var(--sec-line), 0 30px 80px -30px hsl(var(--sec-h, 18) 82% 50% / 0.55);
}
.st-media:not(.st-media--video) img { aspect-ratio: auto; max-height: 80vh; }
.st-credits {
  margin-top: 0.7rem;
  color: var(--faint);
  font: 500 0.72rem/1.45 var(--sans);
}
.st-credits span { color: var(--muted); font-weight: 700; }

/* ── prose ────────────────────────────────────────────────────────────── */
.story__body { max-width: 40rem; }
.st-p {
  margin: 0 0 1.35rem;
  color: #ece6e1;
  font: 400 clamp(1.08rem, 1.9vw, 1.2rem)/1.72 var(--display);
  text-wrap: pretty;
}
.st-drop { position: relative; padding-left: 3.4rem; min-height: 3.6rem; }
.st-drop__cap {
  position: absolute; left: 0; top: 0.05em;
  color: var(--sec);
  font: 700 4.1rem/0.86 var(--display);
}
.st-h2 {
  margin: 2.2rem 0 0.9rem;
  color: var(--cream);
  font: 700 1.45rem/1.2 var(--sans);
  letter-spacing: -0.02em;
}
.st-quote { margin: 2rem 0; padding: 0; }
.st-quote::before { content: ""; display: block; width: 48px; height: 2px; background: var(--sec); margin-bottom: 1rem; }
.st-quote p { margin: 0 0 0.7rem; color: var(--cream); font: italic 400 clamp(1.35rem, 2.6vw, 1.6rem)/1.38 var(--display); }
.st-quote footer { color: var(--faint); font: 700 0.82rem/1.3 var(--sans); }

.st-list { margin: 0 0 1.4rem; padding-left: 1.3rem; color: #ece6e1; font: 400 1.12rem/1.65 var(--display); }
.st-list li { margin-bottom: 0.5rem; }
.st-list li::marker { color: var(--sec); font-weight: 700; }

.st-facts {
  margin: 1.8rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--sec-soft);
  border-left: 3px solid var(--sec);
  border-radius: 6px;
}
.st-facts__title { margin: 0 0 0.7rem; color: var(--sec); font: 700 0.72rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; }
.st-facts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.st-facts li { position: relative; padding-left: 1rem; color: #ddd7d1; font: 500 0.95rem/1.5 var(--sans); }
.st-facts li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--sec); }

.st-spec { margin: 1.8rem 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.st-spec div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.9rem; padding: 0.8rem 1rem; }
.st-spec div + div { border-top: 1px solid var(--line); }
.st-spec dt { color: var(--faint); font: 700 0.82rem/1.45 var(--sans); }
.st-spec dd { margin: 0; color: #ddd7d1; font: 500 0.95rem/1.45 var(--sans); }

.st-entry { display: grid; grid-template-columns: 3rem 1fr; gap: 0 0.8rem; margin: 1.8rem 0; }
.st-entry__n { color: var(--sec); font: 700 2rem/1 var(--sans); letter-spacing: -0.04em; }
.st-entry__name { margin: 0.1rem 0 0.2rem; color: var(--cream); font: 700 1.15rem/1.3 var(--sans); }
.st-entry__meta { margin: 0 0 0.6rem; color: var(--faint); font: 600 0.8rem/1.4 var(--sans); }

.st-figure { margin: 2rem 0; }
.st-figure img { width: 100%; border-radius: 14px; display: block; }
.st-figure figcaption { margin-top: 0.6rem; color: var(--muted); font: 500 0.85rem/1.45 var(--sans); }
.st-credit { font-style: italic; color: var(--faint); }

.st-break { text-align: center; color: var(--faint); letter-spacing: 0.5em; font-size: 0.7rem; margin: 2rem 0; }

/* ── the end ──────────────────────────────────────────────────────────── */
.story__end { max-width: 40rem; margin-top: 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.story__signoff { margin: 0 0 0.4rem; color: var(--faint); font: italic 600 0.86rem/1.4 var(--sans); }
.story__source { margin: 0 0 1.4rem; color: var(--muted); font: 700 0.86rem/1.4 var(--sans); }
.story__app {
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 0.92rem/1.5 var(--sans);
}
.story__get { color: var(--sec); font-weight: 700; text-decoration: none; white-space: nowrap; }
.story__get:hover { text-decoration: underline; }

.story__more { max-width: 40rem; margin-top: 3rem; }
.story__more-h { margin: 0 0 1rem; color: var(--cream); font: 700 1.1rem/1.2 var(--sans); letter-spacing: -0.01em; }
.story__more ul { margin: 0 0 1.5rem; padding: 0; list-style: none; display: grid; gap: 0.2rem; }
.story__more li a {
  display: grid; gap: 0.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.story__more-sec { color: hsl(var(--sec-h, 18) 82% 66%); font: 700 0.68rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; }
.story__more-t { color: var(--cream); font: 600 1.02rem/1.35 var(--sans); }
.story__more li a:hover .story__more-t { text-decoration: underline; text-underline-offset: 3px; }

/* ── wide screens: the text, with the short beside it ─────────────────── */
@media (min-width: 900px) {
  .story__inner { grid-template-columns: minmax(0, 1fr) 20rem; }
  .story__crumbs { grid-column: 1 / -1; }
  .story__head, .story__body, .story__end, .story__more, .story__inner > p { grid-column: 1; }
  .st-media { grid-column: 2; grid-row: 2 / span 4; width: 100%; margin: 0.2rem 0 0; align-self: start; position: sticky; top: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .st-media video { animation: none; }
}

/* ── an event's page (/blog/events/<name>-<id>, _shared/event-render.ts) ───────────────────────────────── */
.ev-passed { margin: 0 0 1.2rem; padding: 0.7rem 1rem; border-radius: 12px; border: 1px dashed var(--sec-line); color: var(--muted); font-size: 0.95rem; }
.ev-facts { margin: 0 0 1.4rem; display: grid; gap: 0.6rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--sec-soft); border: 1px solid var(--sec-line); }
.ev-facts div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.ev-facts dt { color: var(--sec); font: 700 0.72rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.ev-facts dd { margin: 0; color: var(--cream); font: 500 1.02rem/1.45 var(--sans); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0 0 2rem; }
.ev-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--sec-line); color: var(--cream); font: 600 0.95rem/1 var(--sans); text-decoration: none; }
.ev-btn:hover { border-color: var(--sec); }
.ev-btn--main { background: var(--sec); border-color: var(--sec); color: #100b0d; }
.ev-media img { aspect-ratio: auto; max-height: 70vh; object-fit: cover; }
