/* Journal article (kalsoni-article). Base styles for .post-* live in site.css. */

/* Imported Journal content opens with its own standfirst. In the body it must sit exactly where the
   head's standfirst sits on the live page: 26px below the date, 36px above the first paragraph. */
.post-body > .post-standfirst:first-child {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 54ch;
  text-align: center;
  margin: -10px auto 36px;
}

/* Admin rich text: keep media and lists in the post rhythm. */
.post-body > ul,
.post-body > ol {
  font-size: 15.5px;
  line-height: 1.9;
  margin: 0 0 26px;
  padding-left: 1.2em;
}
.post-body > p img,
.post-body > img {
  max-width: 100%;
  height: auto;
}
.post-body a:not(.card__media):not(.card__meta):not(.btn) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* "Shop the story": live grids are moved into the content placeholders; until then (or without JS)
   the empty placeholder takes no space and the grid shows in a matching box after the content. */
.post-shop__grid[data-journal-shop-slot]:empty { display: none; }
.post-shop:has(> .post-shop__grid[data-journal-shop-slot]:empty) .post-shop__head { margin-bottom: 0; }
theme-k-journal-shop { display: block; }
theme-k-journal-shop > .post-shop__grid {
  margin: 48px calc(-1 * min(18vw, 220px));
  padding: 40px 32px 44px;
  background: var(--card);
  border: 1px solid var(--line);
}
@media (max-width: 980px) {
  theme-k-journal-shop > .post-shop__grid { margin-left: -16px; margin-right: -16px; padding: 32px 20px 36px; }
}

/* The subscribe form wrapper; once the script moves the form into the post-signup slot it is empty. */
theme-k-journal-signup { display: block; }
theme-k-journal-signup:empty { display: none; }
/* Without JS the form stays here, directly under the post-signup box: give it the same band. */
theme-k-journal-signup > .post-signup__form {
  margin: -10px 0 10px;
  padding: 0 36px 44px;
  background: var(--ink);
  color: var(--paper);
}
.post-signup .form-status { flex-basis: 100%; margin: 6px 0 0; font-size: 12px; letter-spacing: .12em; color: rgba(255, 255, 255, .85); }
