/* The blog (/blog/, rendered by scripts/blog-render.mjs; owner, 2026-10-27). Loaded after styles.css and library.css,
   whose tokens, picture top (.top), cards, buttons and app band it shares. A post: its sermon's picture fading into the
   sermon's own colour with the title on it, as a sermon page's top; the article in the reading column; Spurgeon's words
   as large quotes in Libre Caslon with a stroke of that colour, each opening the sermon at its sentence; then the
   sermon itself as a card in its colour. */

/* The preview (npm run website) says it isn't the live blog */
.post-preview {
  margin: 16px var(--edge) 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--marker);
  color: var(--ink);
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
}

/* ---------- /blog/ ---------- */

.post-index-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
}
.post-feed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: var(--medium);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  color: var(--text-body);
}
.post-feed:hover {
  color: var(--ink);
}
.post-feed svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
}
.post-feed circle {
  fill: currentColor;
  stroke: none;
}

.post-featured {
  margin-top: var(--intro-gap);
}
/* The newest post: its picture on the left fading into its sermon's colour, the words on that colour */
.post-featured-card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  min-height: 400px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--hero);
}
.post-featured-picture,
.post-sermon-picture {
  position: relative;
  overflow: hidden;
}
.post-featured-picture img,
.post-sermon-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-featured-picture::after,
.post-sermon-picture::after {
  content: '';
  position: absolute;
  inset: 0 -1px 0 0;
  background: linear-gradient(to right, rgb(var(--hero-rgb) / 0) 45%, rgb(var(--hero-rgb) / 0.35) 65%, rgb(var(--hero-rgb) / 0.8) 85%, rgb(var(--hero-rgb) / 1) 100%);
}
.post-featured-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 40px 40px 40px 8px;
}
.post-featured-kind,
.post-kind,
.post-sermon-label {
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--soft);
}
.post-featured-title {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.post-featured-dek {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--soft);
}
.post-featured-date {
  margin-top: 8px;
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--soft);
}
/* Under the pointer the whole card darkens a little, picture and colour alike (owner, 2026-10-28: an underlined title
   looked old school); the sermon card on a post does the same */
.post-featured-card,
.post-sermon-card {
  position: relative;
}
.post-featured-card::after,
.post-sermon-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.08);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
@media (hover: hover) {
  .post-featured-card:hover::after,
  .post-sermon-card:hover::after {
    opacity: 1;
  }
}

.post-cards {
  grid-template-columns: repeat(3, 1fr);
}
.post-card-kind {
  margin-bottom: 2px;
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--text-muted);
}

/* ---------- A post ---------- */

.post-top .top-picture {
  aspect-ratio: 3 / 1;
}
.post-top .top-text {
  padding-top: 8px;
}
.post-top .top-line {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.post-byline {
  margin-top: 28px;
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--text-muted);
}

.post-body {
  margin-top: 32px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
}
.post-body > * + * {
  margin-top: 1.1em;
}
.post-body h2 {
  margin-top: 56px;
  font-family: var(--display);
  font-variation-settings: 'opsz' 32;
  font-weight: var(--bold);
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.post-body h3 {
  margin-top: 40px;
  font-weight: var(--bold);
  font-size: var(--fs-body);
  line-height: var(--lh-label);
  color: var(--ink);
}
.post-body h2 + *,
.post-body h3 + * {
  margin-top: 12px;
}
.post-body strong {
  font-weight: var(--bold);
  color: var(--ink);
}
.post-body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lib .post-body ul {
  padding-left: 1.2em;
  list-style: disc;
}
.post-body li + li {
  margin-top: 0.4em;
}

/* Spurgeon's words: a stroke of the sermon's colour (ink on a light colour, which wouldn't show on the page) */
.post-quote {
  margin: 40px 0;
}
.post-body .post-quote + * {
  margin-top: 0;
}
.post-quote blockquote {
  padding-left: 24px;
  border-left: 4px solid var(--hero);
  font-family: var(--reading);
  font-size: 23px;
  line-height: 1.55;
  color: var(--ink);
}
.post-light .post-quote blockquote {
  border-left-color: var(--ink);
}
html.dark .post-dark .post-quote blockquote {
  border-left-color: var(--stone-500);
}
.post-quote blockquote p::before {
  content: '“';
}
.post-quote blockquote p::after {
  content: '”';
}
.post-quote figcaption {
  margin-top: 12px;
  padding-left: 28px;
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
}
.post-quote figcaption a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text-muted);
}
.post-quote figcaption a:hover {
  color: var(--ink);
}

/* The sermon: its picture fading into its colour on the left, its title and line on the colour */
.post-sermon {
  margin-top: 64px;
}
.post-sermon-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--hero);
}
.post-sermon-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 28px 28px 28px 4px;
}
.post-sermon-title {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.post-sermon-line {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--soft);
}
.post-sermon-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--soft);
}
.post-sermon-stars .rating .off {
  fill: var(--faint);
}
/* The scholar's stars are Premium (owner, 2026-11-03): only for a Premium reader, whose page website/account.js marks
   (html.has-premium; library.css hides them across the library the same way) */
html.js:not(.has-premium) .post-sermon-stars {
  display: none;
}
.post-sermon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.button-quiet {
  background: var(--stone-100);
  color: var(--ink);
}
a.button-quiet:hover {
  background: var(--stone-200);
}

/* Subscribe on Substack, once the publication exists (SUBSTACK_URL) */
.post-subscribe {
  margin: 72px var(--column) 0;
  padding: 36px 40px;
  border-radius: 24px;
  background: var(--stone-100);
}
.post-subscribe p {
  margin-top: 8px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
}
.post-subscribe .post-subscribe-actions {
  margin-top: 24px;
}

.post-sources {
  margin-top: 56px;
}
.post-sources h2 {
  font-weight: var(--bold);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
}
.post-sources ul {
  margin-top: 8px;
}
.post-sources li {
  font-weight: var(--medium);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--text-muted);
}
.post-sources li + li {
  margin-top: 4px;
}
.post-sources a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-sources a:hover {
  color: var(--ink);
}

@media (max-width: 809px) {
  .post-top .top-picture {
    aspect-ratio: 16 / 9;
  }
  .post-featured-card,
  .post-sermon-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .post-featured-picture,
  .post-sermon-picture {
    aspect-ratio: 16 / 9;
  }
  .post-featured-picture::after,
  .post-sermon-picture::after {
    inset: 0 0 -1px;
    background: linear-gradient(to bottom, rgb(var(--hero-rgb) / 0) 45%, rgb(var(--hero-rgb) / 0.4) 70%, rgb(var(--hero-rgb) / 0.85) 88%, rgb(var(--hero-rgb) / 1) 100%);
  }
  .post-featured-text,
  .post-sermon-text {
    padding: 0 24px 28px;
  }
  .post-featured-title {
    font-size: 30px;
  }
  .post-sermon-title {
    font-size: 26px;
  }
  .post-cards {
    grid-template-columns: 1fr;
  }
  .post-quote blockquote {
    padding-left: 18px;
    font-size: 20px;
  }
  .post-quote figcaption {
    padding-left: 22px;
  }
  .post-subscribe {
    padding: 28px 24px;
  }
  .post-body h2 {
    margin-top: 44px;
  }
}
