.tpo-publication {
  /* ── Tokens (matches publication.html RENDERER_FALLBACKS) ───────────────── */
  --tpo-pub-paper: #ffffff;
  --tpo-pub-ink: #1d1d1b;
  --tpo-pub-muted: #6d665d;
  --tpo-pub-rule: #e0e0e0;
  --tpo-pub-accent: #0433ff;
  --tpo-pub-maxw: 740px;

  /* ── Typography ────────────────────────────────────────────────────────── */
  --tpo-pub-body-font: var(--family--1, Aspekta, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
  /* Matches publication.html default ui font */
  --tpo-pub-ui-font: Arial, Helvetica, sans-serif;
  --tpo-pub-title-scale: clamp(32px, 6vw, 56px);
  --tpo-pub-body-scale: clamp(18px, 2.35vw, 21px);
  --tpo-pub-prose-lh: 1.82;
  /* Dropcap can be tuned independently if desired */
  --tpo-pub-dropcap-font: Georgia, "Times New Roman", Times, serif;
  /* PUB_001 default */
  --tpo-pub-dropcap-size: 4.5rem;
  --tpo-pub-dropcap-lh: 0.82;

  /* ── Layout ────────────────────────────────────────────────────────────── */
  --tpo-pub-article-pad-top: 72px;
  --tpo-pub-article-pad-bot: 88px;
  --tpo-pub-block-gap: 1.25em;
  --tpo-pub-sec-gap: 2.5em;
  --tpo-pub-sec-gap-minor: 2em;
  --tpo-pub-img-gap: 2em;
  --tpo-pub-rule-weight: 1px;
  --tpo-pub-standfirst-bm: 2em;
  --tpo-pub-standfirst-rule-pad: 1.5em;
  --tpo-pub-byline-bm: 2.75em;
  --tpo-pub-end-ornament-mt: 3.5em;
  --tpo-pub-end-ornament-pt: 2em;

  /* Column centering: owns the width constraint for all children */
  max-width: var(--tpo-pub-maxw);
  margin-right: auto;
  margin-left: auto;
  background: transparent;
  color: inherit;
}

.tpo-publication__article {
  padding: var(--tpo-pub-article-pad-top) 24px var(--tpo-pub-article-pad-bot);
  background: var(--tpo-pub-paper);
  color: var(--tpo-pub-ink);
}

/* Header kicker (top/bottom rules + uppercase UI font) */
.tpo-publication__kicker {
  font-family: var(--tpo-pub-ui-font);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tpo-pub-muted);
  border-top: 3px solid var(--tpo-pub-ink);
  border-bottom: var(--tpo-pub-rule-weight) solid var(--tpo-pub-rule);
  padding: 8px 0;
  margin: 0 0 32px 0;
}

.tpo-publication__title {
  font-family: var(--tpo-pub-body-font);
  font-weight: 700;
  font-size: var(--tpo-pub-title-scale);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 0 24px 0;
  color: var(--tpo-pub-ink);
}

.tpo-publication__standfirst {
  font-family: var(--tpo-pub-body-font);
  font-size: var(--tpo-pub-body-scale);
  line-height: 1.72;
  color: var(--tpo-pub-muted);
  margin: 0 0 var(--tpo-pub-standfirst-bm) 0;
  font-style: italic;
  border-bottom: var(--tpo-pub-rule-weight) solid var(--tpo-pub-rule);
  padding-bottom: var(--tpo-pub-standfirst-rule-pad);
  text-wrap: pretty;
}

.tpo-publication__byline {
  font-family: var(--tpo-pub-ui-font);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--tpo-pub-muted);
  margin: 0 0 var(--tpo-pub-byline-bm) 0;
}
.tpo-publication__byline strong { color: var(--tpo-pub-ink); font-weight: 700; }

.tpo-publication__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 1.75rem 0;
}
.tpo-publication__tag {
  font-family: var(--tpo-pub-ui-font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(29, 29, 27, 0.25);
  border-radius: 2rem;
  padding: 0.25rem 0.75rem;
  color: rgba(29, 29, 27, 0.75);
  text-decoration: none;
}

/* ── Prose blocks emitted by lib/render.php ───────────────────────────────── */
.tpo-publication .tpo-prose-heading {
  font-family: var(--tpo-pub-body-font);
  font-weight: 700;
  color: var(--tpo-pub-ink);
}
.tpo-publication .tpo-prose-heading--h2 {
  font-size: clamp(19px, 2.85vw, 24px);
  line-height: 1.32;
  margin: var(--tpo-pub-sec-gap) 0 1.125em 0;
}
.tpo-publication .tpo-prose-heading--h3 {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.32;
  margin: var(--tpo-pub-sec-gap-minor) 0 1.125em 0;
}

.tpo-publication .tpo-prose-paragraph {
  font-family: var(--tpo-pub-body-font);
  font-size: var(--tpo-pub-body-scale);
  line-height: var(--tpo-pub-prose-lh);
  margin: 0 0 var(--tpo-pub-block-gap) 0;
  color: var(--tpo-pub-ink);
  text-wrap: pretty;
}
.tpo-publication .tpo-prose-paragraph--lead { display: flow-root; }

/* Dropcap feature toggle:
   - default: enabled (PUB_001 look)
   - disable by adding `.tpo-publication--no-dropcap` on wrapper */
.tpo-publication:not(.tpo-publication--no-dropcap) .tpo-prose-paragraph--lead .tpo-dropcap {
  font-family: var(--tpo-pub-dropcap-font);
  font-size: var(--tpo-pub-dropcap-size);
  font-weight: 700;
  float: left;
  line-height: var(--tpo-pub-dropcap-lh);
  margin-right: 10px;
  margin-top: 4px;
  color: var(--tpo-pub-ink);
}

.tpo-publication .tpo-prose-figure { margin: var(--tpo-pub-img-gap) 0; padding: 0; }
.tpo-publication .tpo-prose-image { width: 100%; height: auto; display: block; border-radius: 4px; }

.tpo-publication .tpo-prose-rule {
  border: 0;
  border-top: var(--tpo-pub-rule-weight) solid var(--tpo-pub-rule);
  margin: 2em 0;
}

/* Pullquote (callout between rules) */
.tpo-publication .tpo-prose-pullquote {
  margin: 2.25em 0;
  padding: 1.25em 0;
  border-top: 1px solid rgba(29, 29, 27, 0.35);
  border-bottom: 1px solid rgba(29, 29, 27, 0.35);
}
.tpo-publication .tpo-prose-pullquote p {
  margin: 0;
  font-family: var(--tpo-pub-body-font);
  font-size: clamp(18px, 2.35vw, 22px);
  line-height: 1.6;
  color: var(--tpo-pub-ink);
  font-style: italic;
  text-wrap: pretty;
}

/* CTA button block */
.tpo-publication .tpo-prose-cta {
  margin: 1.75em 0 2.25em;
  text-align: center;
}
.tpo-publication .tpo-prose-cta__btn {
  margin: 0 auto;
}

.tpo-publication__ornament {
  text-align: center;
  margin-top: var(--tpo-pub-end-ornament-mt);
  padding-top: var(--tpo-pub-end-ornament-pt);
  border-top: var(--tpo-pub-rule-weight) solid var(--tpo-pub-rule);
  color: var(--tpo-pub-muted);
  letter-spacing: 0.3em;
  font-size: 1.5rem;
}


/* ── Below-article wrapper: adds horizontal padding to match article content edges */
.tpo-publication__col-align {
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Post-article action bar (prev / CTA / next) ─────────────────────────── */
.tpo-publication__postbar {
  margin-top: 1.5rem;
  padding: 18px 18px 16px;
  border: 1px solid rgba(29, 29, 27, 0.12);
  border-radius: 16px;
  background: rgba(247, 247, 245, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tpo-publication__postbar-link {
  font-family: var(--tpo-pub-ui-font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tpo-pub-accent);
  text-decoration: none !important;
  white-space: nowrap;
}
.tpo-publication__postbar-link--prev { flex: 1 1 0; text-align: left; }
.tpo-publication__postbar-link--next { flex: 1 1 0; text-align: right; }
.tpo-publication__postbar-link.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.tpo-publication__postbar-cta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .tpo-publication__postbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .tpo-publication__postbar-link--prev,
  .tpo-publication__postbar-link--next {
    flex: 0 0 auto;
    text-align: center;
  }
  .tpo-publication__postbar-cta {
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

