/**
 * Single post — the Journal article reading view.
 *
 * Scoped to .twy-journal-post (mirrors the science.css / about.css pattern).
 * Mirrors the structure of single.php section-by-section:
 *
 *   1. Reading-progress bar (.jp-progress)
 *   2. Crumbs               (.jp-crumbs)
 *   3. Header               (.jp-header)
 *   4. Cover                (.jp-cover)
 *   5. Body — Gutenberg `.entry-content` styled to render the handoff's
 *             typed body blocks with vanilla blocks:
 *               first <p>           → lede with drop-cap
 *               <p>                 → body paragraph
 *               <h2>                → §NN-numbered section heading
 *               <blockquote>        → pullquote
 *               .twy-jp-stats       → stats strip
 *               .twy-jp-callout     → callout aside
 *   6. References           (.jp-refs)
 *   7. Author card          (.jp-authorcard)
 *   8. Related              (.jp-related)
 *   9. Slim newsletter      (.jp-news)
 */

.twy-journal-post {
  --ink: #14160F;
  --ink-2: #1d211a;
  --ink-3: #2a2f26;
  --cream: #f6fff2;
  --cream-2: #eaf6e2;
  --cream-3: #ddf0d0;
  --paper: #ffffff;
  --sage: #93db4c;
  --sage-deep: #d97a35;
  --clay: #93db4c;
  --clay-deep: #bde858;
  --stone: #8a8a7a;
  --stone-2: #6a6a5a;
  --line: rgba(20, 23, 15, 0.12);
  --line-strong: rgba(20, 23, 15, 0.22);

  --font-display: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.twy-journal-post * { box-sizing: border-box; }
.twy-journal-post a { color: inherit; text-decoration: none; }
.twy-journal-post button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.twy-journal-post h1,
.twy-journal-post h2,
.twy-journal-post h3,
.twy-journal-post h4 { margin: 0; font-weight: 400; color: inherit; font-family: var(--font-display); letter-spacing: -0.015em; }
.twy-journal-post svg { width: 1em; height: 1em; flex-shrink: 0; }
.twy-journal-post p { margin: 0; }
.twy-journal-post ul,
.twy-journal-post ol { list-style: none; margin: 0; padding: 0; }
.twy-journal-post input { font-family: inherit; }

/* Wrap container — match site header (1440 / 24-48-64). */
.twy-journal-post .wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px)  { .twy-journal-post .wrap { padding: 0 48px; } }
@media (min-width: 1200px) { .twy-journal-post .wrap { padding: 0 64px; } }

/* Per-section narrower wraps — applied to the inner `.wrap` per section.
   The handoff prescribes:
     880  for crumbs / header / author / refs
     720  for body + refs ol
     1240 for cover + related */
.twy-journal-post .jp-cover-wrap,
.twy-journal-post .jp-related-wrap { max-width: 1240px; }
.twy-journal-post .jp-body-wrap,
.twy-journal-post .jp-refs-wrap    { max-width: 1240px; }
.twy-journal-post .jp-news-wrap    { max-width: 1080px; }
.twy-journal-post .jp-authorcard-wrap { max-width: 880px; }

/* Shared eyebrow primitive (matches the pattern in journal.css). */
.twy-journal-post .jp-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-2);
}
.twy-journal-post .jp-eyebrow.is-sage { color: var(--sage); }

/* Avatar (sage circle, italic display initials). Three sizes. */
.twy-journal-post .jp-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sage);
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  flex-shrink: 0;
}
.twy-journal-post .jp-avatar--md { width: 46px; height: 46px; font-size: 20px; }
.twy-journal-post .jp-avatar--lg { width: 72px; height: 72px; font-size: 30px; }

/* Tone-gradient placeholder (cover + related cards). */
.twy-journal-post .jp-tone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    var(--jp-tone-0, #1d211a) 0%,
    var(--jp-tone-1, #3a4031) 55%,
    var(--jp-tone-2, #0a0c08) 100%);
  overflow: hidden;
}
.twy-journal-post .jp-tone__stripes {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.16;
  pointer-events: none;
}
.twy-journal-post .jp-tone__caption {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  z-index: 2;
}
.twy-journal-post .jp-tone.is-dark  .jp-tone__caption { color: rgba(255,255,255,0.85); background: rgba(20,23,15,0.45); }
.twy-journal-post .jp-tone.is-light .jp-tone__caption { color: rgba(20,23,15,0.7);    background: rgba(255,255,255,0.55); }

/* Buttons — same surface as journal.css. */
.twy-journal-post .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.twy-journal-post .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.twy-journal-post .btn-ghost:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.twy-journal-post .btn-sm { height: 36px; padding: 0 16px; font-size: 11px; }

/* ==========================================================================
   1. PROGRESS BAR
   ========================================================================== */

.twy-journal-post .jp-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 90;
  pointer-events: none;
}
.twy-journal-post .jp-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--clay);
  transition: width 80ms linear;
}

/* ==========================================================================
   2. CRUMBS
   ========================================================================== */

.twy-journal-post .jp-crumbs {
  background: var(--cream);
  /* 120px clears the 36px topbar + ~87px sticky header (per the handoff and
     the same value used on page-science.php). */
  padding: 120px 0 8px;
}
.twy-journal-post .jp-crumbs > .wrap { max-width: 880px; }
.twy-journal-post .jp-crumbs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-2);
}
.twy-journal-post .jp-crumbs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}
.twy-journal-post .jp-crumbs-back:hover { color: var(--ink); }
.twy-journal-post .jp-crumbs-back svg { width: 12px; height: 12px; }
.twy-journal-post .jp-crumbs-sep { opacity: 0.5; }
.twy-journal-post .jp-crumbs-cat { color: var(--stone-2); }
.twy-journal-post .jp-crumbs-title {
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
  font-size: 12px;
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */

.twy-journal-post .jp-header {
  background: var(--cream);
  padding: 32px 0 48px;
}
.twy-journal-post .jp-header > .wrap { max-width: 880px; }

.twy-journal-post .jp-header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin-bottom: 28px;
}
.twy-journal-post .jp-header-eyebrow .rule {
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--clay-deep);
}

.twy-journal-post .jp-header-title {
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 0.98;
  text-wrap: balance;
  margin-bottom: 28px;
  color: var(--ink);
}
.twy-journal-post .jp-header-title em { font-style: italic; color: var(--clay); }

.twy-journal-post .jp-header-dek {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  color: var(--ink-3);
  max-width: 720px;
  margin-bottom: 40px;
  text-wrap: pretty;
}

.twy-journal-post .jp-header-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) {
  .twy-journal-post .jp-header-meta {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.twy-journal-post .jp-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.twy-journal-post .jp-author__name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.twy-journal-post .jp-author__role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-2);
  margin-top: 2px;
}

.twy-journal-post .jp-meta-stamp {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.twy-journal-post .jp-meta-bullet { opacity: 0.4; }
@media (max-width: 760px) {
  .twy-journal-post .jp-meta-stamp { justify-self: start; }
}

.twy-journal-post .jp-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.twy-journal-post .jp-ghost {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.twy-journal-post .jp-ghost:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.twy-journal-post .jp-ghost.is-active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ==========================================================================
   4. COVER
   ========================================================================== */

.twy-journal-post .jp-cover {
  background: var(--cream);
  padding-bottom: 72px;
}
.twy-journal-post .jp-cover-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 8;
}
.twy-journal-post .jp-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.twy-journal-post .jp-cover-caption {
  position: absolute;
  bottom: 18px; right: 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  z-index: 2;
}

/* ==========================================================================
   5. BODY — `.entry-content` styled per typed-block intent
   ========================================================================== */

.twy-journal-post .jp-body { padding-bottom: 80px; }

/* The body column max-width is 720px — the cover above it is 1240px to give
   the article visual scale. We keep the outer wrap at 1240 (matches the
   cover's wrap) and centre a 720px column inside it. */
.twy-journal-post .jp-body-wrap {
  display: flex;
  justify-content: center;
}
.twy-journal-post .jp-body-content {
  width: 100%;
  max-width: 720px;
  /* Reset the global app.css flow margins inside this scope so the per-block
     spacing below is the only thing setting vertical rhythm. */
  counter-reset: jp-h2-counter;
}

/* Flow: paragraphs */
.twy-journal-post .jp-body-content > p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-3);
  margin: 0 0 24px;
  text-wrap: pretty;
}

/* First paragraph → lede with drop-cap. We target `:first-of-type` so it
   still works if Gutenberg precedes the first paragraph with an empty
   `wp-block` wrapper. */
.twy-journal-post .jp-body-content > p:first-of-type {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 32px;
}
.twy-journal-post .jp-body-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 76px;
  line-height: 0.85;
  color: var(--clay);
  padding-right: 12px;
  padding-top: 6px;
}

/* Section headings — DM Serif H2 with a JetBrains Mono §NN counter prefix.
   The counter increments per H2 element in document order — "Nth h2", not the
   handoff's "block index in the body array". The trade-off: zero editor
   ceremony required, and editors can override an explicit number by writing
   it into the heading itself if they ever need to. */
.twy-journal-post .jp-body-content > h2 {
  counter-increment: jp-h2-counter;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  margin: 56px 0 22px;
  color: var(--ink);
  text-wrap: balance;
}
.twy-journal-post .jp-body-content > h2::before {
  content: "§" counter(jp-h2-counter, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--clay-deep);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-style: normal;
  font-weight: 400;
}

/* H3 — lighter section break inside an H2 group. */
.twy-journal-post .jp-body-content > h3 {
  font-size: 22px;
  line-height: 1.2;
  margin: 36px 0 14px;
  color: var(--ink);
}

/* Inline emphasis / strong */
.twy-journal-post .jp-body-content em { font-style: italic; }
.twy-journal-post .jp-body-content strong { font-weight: 600; }

/* Inline links — a single underline accent, picks up the brand clay on hover. */
.twy-journal-post .jp-body-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.twy-journal-post .jp-body-content a:hover {
  color: var(--clay-deep);
  text-decoration-color: var(--clay-deep);
}

/* Inline code */
.twy-journal-post .jp-body-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--cream-2);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Lists inside body */
.twy-journal-post .jp-body-content ul:not([class]),
.twy-journal-post .jp-body-content ol:not([class]) {
  margin: 0 0 24px;
  padding-left: 24px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-3);
  list-style: revert;
}
.twy-journal-post .jp-body-content li:not(:last-child) { margin-bottom: 8px; }

/* Pullquote — Gutenberg Quote block. The handoff specifies a -40px horizontal
   bleed so it pushes out beyond the body column edge; on narrow viewports
   we clamp it to 0 to avoid overflow. */
.twy-journal-post .jp-body-content blockquote,
.twy-journal-post .jp-body-content .wp-block-quote {
  margin: 44px -40px;
  padding: 36px 40px 32px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  position: relative;
  background: var(--cream);
}
.twy-journal-post .jp-body-content blockquote::before,
.twy-journal-post .jp-body-content .wp-block-quote::before {
  content: "“";
  position: absolute;
  top: -18px; left: 36px;
  background: var(--cream);
  padding: 0 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 48px;
  line-height: 1;
  color: var(--clay);
}
.twy-journal-post .jp-body-content blockquote p,
.twy-journal-post .jp-body-content .wp-block-quote p {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.twy-journal-post .jp-body-content blockquote cite,
.twy-journal-post .jp-body-content .wp-block-quote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-2);
  font-style: normal;
}
.twy-journal-post .jp-body-content blockquote cite::before,
.twy-journal-post .jp-body-content .wp-block-quote cite::before { content: "— "; }
@media (max-width: 720px) {
  .twy-journal-post .jp-body-content blockquote,
  .twy-journal-post .jp-body-content .wp-block-quote {
    margin-left: 0;
    margin-right: 0;
    padding-left: 24px;
    padding-right: 24px;
  }
  .twy-journal-post .jp-body-content blockquote::before,
  .twy-journal-post .jp-body-content .wp-block-quote::before { left: 20px; }
}

/* Stats strip — Gutenberg "Group" block with the editor-applied class
   `twy-jp-stats`. Each direct child becomes a stat cell; the cell's first
   element renders as the number and the second as the label. The simplest
   editor flow is a Group of N x (Heading + Paragraph) pairs, each pair
   wrapped in its own Group with class `twy-jp-stat`. */
.twy-journal-post .jp-body-content .twy-jp-stats,
.twy-journal-post .jp-body-content .wp-block-group.twy-jp-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  margin: 40px -40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.twy-journal-post .jp-body-content .twy-jp-stat,
.twy-journal-post .jp-body-content .wp-block-group.twy-jp-stat {
  padding: 26px 20px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.twy-journal-post .jp-body-content .twy-jp-stats > .twy-jp-stat:first-child,
.twy-journal-post .jp-body-content .twy-jp-stats > .wp-block-group:first-child { border-left: none; }

/* The stat number — first heading inside a stat cell */
.twy-journal-post .jp-body-content .twy-jp-stat > h2,
.twy-journal-post .jp-body-content .twy-jp-stat > h3,
.twy-journal-post .jp-body-content .twy-jp-stat > h4,
.twy-journal-post .jp-body-content .twy-jp-stat > p:first-child {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  color: var(--clay-deep);
  margin: 0 0 8px;
  /* Override the §NN counter on h2 inside stats. */
  counter-increment: none;
}
.twy-journal-post .jp-body-content .twy-jp-stat > h2::before,
.twy-journal-post .jp-body-content .twy-jp-stat > h3::before,
.twy-journal-post .jp-body-content .twy-jp-stat > h4::before { content: none; }

/* The stat label — last paragraph in the cell */
.twy-journal-post .jp-body-content .twy-jp-stat > p:last-child {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-2);
  line-height: 1.4;
  margin: 0;
  /* The label is a normal paragraph but inside this scope our `> p` rule
     above would over-style it — re-set the body-paragraph color. */
}
@media (max-width: 720px) {
  .twy-journal-post .jp-body-content .twy-jp-stats {
    margin-left: 0;
    margin-right: 0;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr 1fr;
  }
  .twy-journal-post .jp-body-content .twy-jp-stat { border-left: none; border-top: 1px solid var(--line); }
  .twy-journal-post .jp-body-content .twy-jp-stat:nth-child(2n) { border-left: 1px solid var(--line); }
  .twy-journal-post .jp-body-content .twy-jp-stat:nth-child(-n+2) { border-top: none; }
}

/* Callout aside — Gutenberg "Group" block with class `twy-jp-callout`. The
   first paragraph inside is treated as the kind label (rendered as mono
   eyebrow). Optional H2/H3 inside the callout becomes the title. */
.twy-journal-post .jp-body-content .twy-jp-callout,
.twy-journal-post .jp-body-content .wp-block-group.twy-jp-callout {
  margin: 36px 0;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
  border-radius: 8px;
  padding: 22px 26px;
}
.twy-journal-post .jp-body-content .twy-jp-callout > p:first-child {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin: 0 0 8px;
}
.twy-journal-post .jp-body-content .twy-jp-callout > h2,
.twy-journal-post .jp-body-content .twy-jp-callout > h3,
.twy-journal-post .jp-body-content .twy-jp-callout > h4 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 8px;
  counter-increment: none;
}
.twy-journal-post .jp-body-content .twy-jp-callout > h2::before,
.twy-journal-post .jp-body-content .twy-jp-callout > h3::before { content: none; }
.twy-journal-post .jp-body-content .twy-jp-callout > p:not(:first-child) {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
}

/* Images inside body */
.twy-journal-post .jp-body-content figure,
.twy-journal-post .jp-body-content .wp-block-image {
  margin: 36px 0;
}
.twy-journal-post .jp-body-content figure img,
.twy-journal-post .jp-body-content .wp-block-image img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}
.twy-journal-post .jp-body-content figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-2);
  text-align: center;
}

/* ==========================================================================
   6. REFERENCES
   ========================================================================== */

.twy-journal-post .jp-refs { background: var(--cream); padding: 40px 0 80px; }
.twy-journal-post .jp-refs-wrap {
  display: flex;
  justify-content: center;
}
.twy-journal-post .jp-refs-inner {
  width: 100%;
  max-width: 720px;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}
.twy-journal-post .jp-refs .jp-eyebrow { margin-bottom: 18px; color: var(--stone-2); }

.twy-journal-post .jp-refs-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.twy-journal-post .jp-refs-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.twy-journal-post .jp-refs-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clay-deep);
  letter-spacing: 0.06em;
}
.twy-journal-post .jp-refs-text {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.twy-journal-post .jp-refs-venue {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-2);
}

/* ==========================================================================
   7. AUTHOR CARD
   ========================================================================== */

.twy-journal-post .jp-authorcard { padding-bottom: 80px; }
.twy-journal-post .jp-authorcard-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
@media (max-width: 760px) {
  .twy-journal-post .jp-authorcard-card {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 18px;
  }
}

.twy-journal-post .jp-authorcard-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-2);
  margin-bottom: 6px;
}
.twy-journal-post .jp-authorcard-name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 4px;
}
.twy-journal-post .jp-authorcard-bio {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
}
.twy-journal-post .jp-authorcard-cta { white-space: nowrap; }

/* ==========================================================================
   8. RELATED
   ========================================================================== */

.twy-journal-post .jp-related { background: var(--cream); padding: 40px 0 96px; }

.twy-journal-post .jp-related-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.twy-journal-post .jp-related-head .jp-eyebrow { margin-bottom: 10px; }
.twy-journal-post .jp-related-h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1;
  color: var(--ink);
}
.twy-journal-post .jp-related-h2 em { font-style: italic; color: var(--clay); }

.twy-journal-post .jp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 960px) { .twy-journal-post .jp-related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .twy-journal-post .jp-related-grid { grid-template-columns: 1fr; } }

.twy-journal-post .jp-related-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  color: var(--ink);
}
.twy-journal-post .jp-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(20, 23, 15, 0.25);
}

.twy-journal-post .jp-related-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.twy-journal-post .jp-related-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.twy-journal-post .jp-related-card__cat {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  background: rgba(20, 23, 15, 0.85);
  color: var(--cream);
  padding: 5px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.twy-journal-post .jp-related-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.twy-journal-post .jp-related-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-2);
}
.twy-journal-post .jp-related-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: pretty;
}
.twy-journal-post .jp-related-card__cta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--clay-deep);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.twy-journal-post .jp-related-card__cta svg { width: 11px; height: 11px; }

/* ==========================================================================
   9. SLIM NEWSLETTER (ink bg, pill-row form)
   ========================================================================== */

.twy-journal-post .jp-news {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 0;
}
.twy-journal-post .jp-news-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 960px) { .twy-journal-post .jp-news-grid { grid-template-columns: 1fr; gap: 32px; } }

.twy-journal-post .jp-news-h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  margin-top: 14px;
  color: var(--cream);
}
.twy-journal-post .jp-news-h3 em { font-style: italic; color: var(--clay); }

.twy-journal-post .jp-news-form {
  display: flex;
  gap: 8px;
  background: rgba(243, 241, 232, 0.06);
  border: 1px solid rgba(243, 241, 232, 0.18);
  border-radius: 999px;
  padding: 6px;
}
.twy-journal-post .jp-news-form__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 0 18px;
  min-width: 0;
}
.twy-journal-post .jp-news-form__input::placeholder { color: rgba(243, 241, 232, 0.5); }
.twy-journal-post .jp-news-form__submit {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  background: var(--clay);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--ease-out);
}
.twy-journal-post .jp-news-form__submit:hover { background: var(--clay-deep); transform: translateY(-1px); }
.twy-journal-post .jp-news-form__submit svg { width: 12px; height: 12px; }
