/* /news/:slug — single-article detail page. Single-column readable
   layout matched to imaginando-3-0/project/Imaginando Media Detail.html. */

/* Reset the global .page-head bottom-border the layout assumes, since
   the article head doesn't use the .page-head shell. */
.news-detail .crumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0;
}
.news-detail .crumbs a { color: var(--fg-faint); transition: color 0.2s ease; }
.news-detail .crumbs a:hover { color: var(--fg); }
.news-detail .crumbs .sep { color: var(--fg-faint); }
.news-detail .crumbs .here { color: var(--fg); }

/* ---------- Article head ---------- */

.article-head { padding: 36px 0 16px; }
.article-head > .wrap { max-width: 1000px; }

.article-head h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 22px 0 0;
  text-wrap: pretty;
}
.article-head h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.head-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 18px;
}
.head-meta-top time { color: var(--fg-dim); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid var(--line);
  color: var(--fg-dim);
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-faint);
}
.pill.kind-news {
  background: color-mix(in oklab, var(--accent) 20%, transparent);
  border-color: color-mix(in oklab, var(--accent) 35%, var(--line-strong));
  color: var(--fg);
}
.pill.kind-news::before { background: var(--accent); }
.pill.kind-youtube::before { background: #ff5252; }
.pill.kind-clipping::before { background: #a96bff; }
.dotsep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--fg-faint);
}

:root[data-theme="light"] .pill.kind-news {
  background: color-mix(in oklab, var(--accent) 25%, transparent);
  color: var(--fg);
}

/* ---------- Hero figure ---------- */

.hero-figure { margin: 0; padding-top: 24px; }
.hero-figure > .wrap { max-width: 1000px; }
.hero-figure .vis {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--card);
  overflow: hidden;
  border-radius: 14px;
  border: 0.5px solid var(--line);
}
.hero-figure .vis img,
.hero-figure .vis iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

/* ---------- Article body ---------- */

.article-body {
  padding: 32px 32px 80px;
  max-width: 1000px;
}
@media (max-width: 720px) {
  .article-body { padding: 32px 20px 80px; }
}
.article-body .content {
  font-family: var(--body);
  color: var(--fg);
}
.article-body .content > * + * { margin-top: 1.1em; }
.article-body .content p,
.article-body .content pre {
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg);
  text-wrap: pretty;
  font-weight: 300;
  letter-spacing: -0.005em;
  margin: 0;
}
.article-body .content p strong {
  font-weight: 600;
  color: var(--fg);
}
.article-body .content p em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.article-body .content h2,
.article-body .content h3,
.article-body .content h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  margin-top: 1.8em;
  text-wrap: balance;
}
.article-body .content h3 { font-size: clamp(22px, 1.8vw, 26px); }
.article-body .content h4 { font-size: 20px; }
.article-body .content h2 em,
.article-body .content h3 em,
.article-body .content h4 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.article-body .content a {
  color: var(--accent);
  border-bottom: 0.5px solid color-mix(in oklab, var(--accent) 40%, transparent);
  transition: border-color 0.2s ease;
}
.article-body .content a:hover { border-color: var(--accent); }
.article-body .content ul,
.article-body .content ol {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-body .content ul li,
.article-body .content ol li {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
  padding-left: 22px;
  position: relative;
  font-weight: 300;
}
.article-body .content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}
.article-body .content ol {
  counter-reset: news-ol;
}
.article-body .content ol li {
  counter-increment: news-ol;
}
.article-body .content ol li::before {
  content: counter(news-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.article-body .content blockquote {
  margin: 0;
  padding: 18px 22px;
  border-left: 2px solid var(--accent);
  background: var(--card);
  border-radius: 4px;
}
.article-body .content blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.45;
}

/* In-body media — Prismic rich-text image blocks render <img> with the
   source's natural width/height attributes (e.g. SoundCloud previews at
   1207×384), so they'd otherwise overflow the 760px text column. Cap
   width and drop the explicit height so the aspect ratio holds. Same
   treatment for any iframe/video the body might contain. */
.article-body .content img,
.article-body .content iframe,
.article-body .content video,
.article-body .content figure,
.article-body .content embed {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0;
}
.article-body .content figure img { border-radius: inherit; }

.article-body .content .outbound {
  margin-top: 2em;
  padding-top: 18px;
  border-top: 0.5px solid var(--line);
}

.end-rule {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 0.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* ---------- More news strip ---------- */

/* Full-bleed hairline closes the "More news" section before the newsletter
   — the border is on the <section> itself so it spans the viewport, while
   the inner .wrap stays clamped to the article column width. */
.related-section {
  padding: 0 0 64px;
  border-bottom: 0.5px solid var(--line);
}
.related-section .wrap { max-width: 1000px; }
.news-detail .sec-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
}
.news-detail .sec-head h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.015em;
  margin: 0;
}
.news-detail .sec-head h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.news-detail .sec-head .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  text-transform: uppercase;
  text-align: right;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-detail .sec-head .meta:hover { color: var(--fg); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 680px) { .related-grid { grid-template-columns: 1fr; } }
.rcard {
  border: 0.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}
.rcard:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.rcard .vis {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
}
.rcard .vis img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rcard .body {
  padding: 18px 20px 20px;
  border-top: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.rcard h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.rcard h4 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.rcard .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.rcard .row .read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--fg);
}
.rcard .row .read::after {
  content: "→";
  font-family: var(--mono);
  transition: transform 0.25s ease;
  font-size: 13px;
}
.rcard:hover .row .read::after { transform: translateX(4px); }
.rcard .row .when {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-faint);
  letter-spacing: 0.05em;
}

/* ---------- Reading progress bar ---------- */

.news-detail .progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 64px;
  height: 2px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.news-detail .progress .bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.08s linear;
}
