/*
  PopQuest – Entity Hero Design
  Goals:
  - NO Archivo anywhere
  - Franklin Gothic Heavy Italic for entity title + section headings
  - Inter for all body copy
  - Restore the “hero card” layout (image left, info right)
  - Comments CTA pill sits over the image (top-left)
*/

/* -----------------------------
   Fonts
------------------------------ */

@font-face{
  font-family:'FranklinGothicHeavyItalic';
  src:url('assets/fonts/FranklinGothicHeavyItalic.ttf') format('truetype');
  font-weight:800;
  font-style:italic;
  font-display:swap;
}
/* ======================
   POPQUEST ENTITY HERO - GLOBAL TOKENS
====================== */
.pq-entity-page{
  --pq-display-font: "PQFranklinGothicHeavyItalic","Franklin Gothic Heavy Italic","Franklin Gothic",Arial Black,Arial,sans-serif;
  --pq-body-font: "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}


/* -----------------------------
   Global typography (entities)
------------------------------ */

.pq-entity-page .cse-entity-content,
.pq-entity-page .cse-entity-content p,
.pq-entity-page .cse-entity-content li,
.pq-entity-page .cse-entity-content table {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Franklin for entity title + section headings */
.pq-entity-page h1,
.pq-entity-page .cse-title,
.pq-entity-page .cse-entity-content h2,
.pq-entity-page .cse-entity-content h3 {
  font-family: 'FranklinGothicHeavyItalic', Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* -----------------------------
   HERO LAYOUT (supports two markups)
   A) .pq-entity-hero / .cse-hero-* (older)
   B) .cse-entity-card / .cse-entity-* (current)
------------------------------ */

/* Shared container */
.cse-entity-header .cse-entity-inner,
.pq-entity-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Current markup: card wrapper */
.cse-entity-card {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 24px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.08);
}

@media (max-width: 860px) {
  .cse-entity-card {
    grid-template-columns: 1fr;
  }
}

/* Image area */
.cse-entity-photo {
  position: relative;
}

.cse-entity-img,
.cse-entity-img--placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: #f2f2f2;
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
}

/* If an <img> is used */
.cse-entity-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Title block (black pill/plate) */
.cse-entity-top {
  min-width: 0;
}

.cse-title {
  display: inline-block;
  background: #000;
  color: #fff;
  /* Extra right padding + clipping prevents italic overhang “spilling” */
  padding: 18px 40px 18px 22px;
  border-radius: 18px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
  font-size: clamp(34px, 4.2vw, 64px);
  margin: 0 0 14px 0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);

  font-family: var(--pq-display-font) !important;
  font-style: italic;
  /* Keep names readable: allow wrapping ONLY at natural breakpoints (spaces).
     If a single word is too long, we clip inside the pill rather than splitting letters. */
  box-sizing: border-box;
  overflow-x: clip;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  text-wrap: balance;
}

/* Subtle pulse on the comments CTA to draw attention */
@keyframes pqehPulse{
  0%, 100%{ transform: translateZ(0) scale(1); }
  50%{ transform: translateZ(0) scale(1.04); }
}


@media (prefers-reduced-motion: reduce){
  .pq-entity-page .pq-cdr-trigger.pqeh-pulse{ animation: none !important; }
}

/* Pills row */
.cse-entity-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 14px;
  position: relative;
  z-index: 5; /* keep pills above any decorative elements */
}

.cse-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  line-height: 1;
}

.cse-pill-label {
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.cse-pill-value {
  font-weight: 800;
}

/* Updated timestamps + facts */
.cse-entity-updated {
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.85;
  margin-bottom: 10px;
}

.cse-entity-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.cse-fact {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
}

.cse-fact-k {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 12px;
  opacity: 0.7;
}

.cse-fact-v {
  font-weight: 800;
}

/* -----------------------------
   CONTENT SECTION HEADINGS
------------------------------ */

.pq-entity-page .cse-entity-content {
  max-width: 900px;
  margin: 28px auto 0;
  padding: 0 16px 48px;
}

.pq-entity-page .cse-entity-content h2 {
  display: inline-block;
  background: #91F88D;
  color: #000;
  padding: 10px 14px;
  border-radius: 14px;
  margin: 26px 0 10px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.05;
}

.pq-entity-page .cse-entity-content p {
  font-size: 16px;
  line-height: 1.65;
  margin: 10px 0;
}

/* -----------------------------
   COMMENTS CTA OVER IMAGE
------------------------------ */

.pq-cdr-trigger {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Slimmer (less “fat”) CTA */
  padding: 6px 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

/* --- Reactions (EXACT Pop Quest News styling) --- */
.pq-entity-page .cse-entity-photo .pq-react-fab{
  position:absolute;
  top:12px;
  right:12px;
  bottom:auto;
  left:auto;
  transform:none;
  z-index: 30;
  border:1px solid rgba(255,255,255,.55);
  background:rgba(0,0,0,.28);
  color:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-weight:750;
  cursor:pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pq-entity-page .cse-entity-photo .pq-react-fab:active{transform:translateY(1px);}

.pq-entity-page .cse-entity-photo .pq-reactions-overlay{
  /* Open to the LEFT of the trigger (instead of bottom-centre) */
  position:absolute;
  top:12px;
  right:56px;
  bottom:auto;
  left:auto;
  transform:none;
  z-index: 35;
  display:none;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:0;
}
.pq-entity-page .cse-entity-photo .pq-reactions-overlay.is-open{display:flex;}

/* If the hero is narrow, allow the row to wrap rather than overflow off-screen */
.pq-entity-page .cse-entity-photo .pq-reactions-overlay{
  flex-wrap: wrap;
  max-width: calc(100% - 24px);
}

.pq-entity-page .cse-entity-photo .pq-reaction{
  border:1px solid rgba(255,255,255,.35);
  background:rgba(0,0,0,.22);
  color:#fff;
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pq-entity-page .cse-entity-photo .pq-reaction[aria-pressed="true"]{
  border-color:rgba(255,255,255,.70);
  background:rgba(0,0,0,.32);
  transform:translateY(-1px);
}

/* Pulse the real comments trigger (do NOT create a second button) */
.pq-entity-page .pq-cdr-trigger.pqeh-pulse{
  animation: pqehPulse 1.6s ease-in-out infinite;
}

.pq-entity-page .pq-cdr-trigger.pqeh-pulse:hover,
.pq-entity-page .pq-cdr-trigger.pqeh-pulse:focus-visible{
  animation: none;
}

.pq-cdr-trigger__count {
  background: #91F88D;
  color: #000;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1;
}

/* Optional: if you have a reactions trigger on entities, line it up next to comments (like News) */
.pq-entity-page .cse-entity-photo .pq-reactions-trigger,
.pq-entity-page .cse-entity-photo .pq-react-trigger{
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  z-index: 20;
}

.pq-cdr-trigger:focus-visible {
  outline: 3px solid rgba(145,248,141,0.6);
  outline-offset: 2px;
}

/* Older markup support (if present) */
.cse-hero-media {
  position: relative;
}

/* Comment CTA position: bottom-center of the hero image */
.cse-hero-media .pq-cdr-trigger {
  top: auto;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
}

/* =========================
   Bottom modules (CSE TOP 10 + Latest articles)
   IMPORTANT: These two sections must match the PopQuest News article-page styling.
   Scoped to entity pages only so nothing leaks into menus/sitewide UI.
========================= */

/* Keep placement aligned to the HERO container (same max-width + padding) */
.pq-entity-page .pqehd-bottom-modules{
  width: 100%;
  margin: 26px 0 14px;
}
.pq-entity-page .pqehd-bottom-inner{
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
@media (min-width: 1024px){
  .pq-entity-page .pqehd-bottom-inner{ padding: 0 24px; }
}

/* ==========================
   CSE Top 10 (match article pages)
========================== */
.pq-entity-page .pqn-cse-top10{ margin: 26px 0 10px; }
.pq-entity-page .pqn-cse-top10__title{
  margin: 0 0 12px;
  font-family: 'PQFranklin','FranklinGothicHeavyItalic','Franklin Gothic Heavy Italic', Arial Black, Arial, sans-serif !important;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 18px;
  line-height: 1;
}
.pq-entity-page .pqn-cse-top10__grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.pq-entity-page .pqn-cse-top10__card{
  display: block;
  text-decoration: none;
  color: #000;
}
.pq-entity-page .pqn-cse-top10__media{
  position: relative;
  border: 1px solid #000;
  overflow: hidden;
}
.pq-entity-page .pqn-cse-top10__img{
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.pq-entity-page .pqn-cse-top10__img--placeholder{ background: #f2f2f2; }
.pq-entity-page .pqn-cse-top10__rank{
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 999px;
  font-family: 'PQFranklin','FranklinGothicHeavyItalic','Franklin Gothic Heavy Italic', Arial Black, Arial, sans-serif !important;
  font-weight: 800;
  font-style: italic;
  font-size: 12px;
  line-height: 1;
}
.pq-entity-page .pqn-cse-top10__meta{ padding: 8px 0 0; }
.pq-entity-page .pqn-cse-top10__name{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 6px;
}
.pq-entity-page .pqn-cse-top10__line{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
}
.pq-entity-page .pqn-cse-top10__ticker{
  font-family: 'PQFranklin','FranklinGothicHeavyItalic','Franklin Gothic Heavy Italic', Arial Black, Arial, sans-serif !important;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
}
.pq-entity-page .pqn-cse-top10__price{ opacity: 0.9; }

@media (max-width: 900px){
  .pq-entity-page .pqn-cse-top10__grid{
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 140px !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-height: none !important;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }
  .pq-entity-page .pqn-cse-top10__card{ scroll-snap-align: start; }
  .pq-entity-page .pqn-cse-top10__grid::-webkit-scrollbar{ display: none; }
}

/* ==========================
   Latest news list (match article pages)
========================== */
.pq-entity-page .pqn-latest-news{ margin: 26px 0 0; }
.pq-entity-page .pqn-latest-news__title{
  margin: 0 0 12px;
  font-family: 'PQFranklin','FranklinGothicHeavyItalic','Franklin Gothic Heavy Italic', Arial Black, Arial, sans-serif !important;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 18px;
  line-height: 1;
}
.pq-entity-page .pqn-latest-news__list{ border-top: 2px solid #000; }
.pq-entity-page .pqn-latest-news__item{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 2px solid #000;
  text-decoration: none;
  color: #000;
  position: relative;
}
.pq-entity-page .pqn-latest-news__media{ position: relative; }
.pq-entity-page .pqn-latest-news__img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0 !important;
  display: block;
  border: 1px solid #000;
}
.pq-entity-page .pqn-latest-news__img--placeholder{ height: 180px; border: 1px solid #000; background: #f2f2f2; }
.pq-entity-page .pqn-latest-news__kicker{
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: auto;
  z-index: 3;
  background: #000;
  color: #fff;
  padding: 10px 14px;
  border-radius: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "PQFranklin","FranklinGothicHeavyItalic","Franklin Gothic Heavy Italic", Arial Black, Arial, sans-serif !important;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 12px;
}
.pq-entity-page .pqn-latest-news__headline{
  font-family: 'PQFranklin','FranklinGothicHeavyItalic','Franklin Gothic Heavy Italic', Arial Black, Arial, sans-serif !important;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 28px;
  line-height: 1.08;
  margin: 0 0 10px;
}
.pq-entity-page .pqn-latest-news__summary{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
  opacity: 0.95;
}

@media (max-width: 768px){
  .pq-entity-page .pqn-latest-news__item{ grid-template-columns: 1fr; }
  .pq-entity-page .pqn-latest-news__img,
  .pq-entity-page .pqn-latest-news__img--placeholder{ height: 220px; }
}


/* Logged-out trade CTA links: black, no hover colour shift */
.pq-entity-page .pqehd-trade-cta .pqehd-cta-link{
  color: #000 !important;
  font-weight: 800;
  text-decoration: none !important;
}
.pq-entity-page .pqehd-trade-cta .pqehd-cta-link:hover,
.pq-entity-page .pqehd-trade-cta .pqehd-cta-link:focus,
.pq-entity-page .pqehd-trade-cta .pqehd-cta-link:active{
  color: #000 !important;
  text-decoration: none !important;
}
/* =========================
   GLOW PILLS UNDER H1
   ========================= */
.pq-entity-page .cse-entity-pills .cse-pill{
  font-family: 'PQFranklinGothicHeavyItalic', Arial Black, Arial, sans-serif !important;
  font-weight: 800 !important;
  font-style: italic !important;
  text-transform: uppercase;
  background: rgba(145,248,141,0.28) !important;
  border: 2px solid rgba(145,248,141,0.85) !important;
  color: #000 !important;
  box-shadow:
    0 10px 26px rgba(145,248,141,0.22),
    0 0 0 3px rgba(145,248,141,0.18);
}

.pq-entity-page .cse-entity-pills .cse-pill--dead{
  background: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.pq-entity-page .cse-entity-pills .cse-pill--dead .cse-pill-label,
.pq-entity-page .cse-entity-pills .cse-pill--dead .cse-pill-value{
  color: #fff !important;
}

/* =========================
   HIDE INLINE COMMENTS BLOCK
   (drawer CTA handles it)
   ========================= */
.pq-entity-page #pq-cdr-inline{
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}


/* ======================
   HARD OVERRIDES (Franklin for titles + H2, Inter body, no word breaks)
====================== */
.pq-entity-page .cse-entity .cse-title,
.pq-entity-page .cse-entity-header .cse-title,
.pq-entity-page .cse-entity .cse-title *{
  font-family: "FranklinGothicHeavyItalic", "Arial Black", Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  letter-spacing: .02em;
  text-transform: uppercase;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.pq-entity-page .cse-entity-content h2,
.pq-entity-page .cse-entity-content h3{
  font-family: "FranklinGothicHeavyItalic", "Arial Black", Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: .02em;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Ensure body copy is Inter (no Archivo anywhere) */
.pq-entity-page .cse-entity-content,
.pq-entity-page .cse-entity-content p,
.pq-entity-page .cse-entity-content li,
.pq-entity-page .cse-entity-updated,
.pq-entity-page .cse-entity-facts,
.pq-entity-page .cse-pill{
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Make pills glow green with black text, Franklin for pill text */
.pq-entity-page .cse-entity-pills .cse-pill{
  background: rgba(145,248,141,.35) !important;
  border: 1px solid rgba(145,248,141,.95) !important;
  color: #000 !important;
  box-shadow: 0 0 0 3px rgba(145,248,141,.22), 0 10px 24px rgba(145,248,141,.25) !important;
}
.pq-entity-page .cse-entity-pills .cse-pill .cse-pill-label,
.pq-entity-page .cse-entity-pills .cse-pill .cse-pill-value{
  font-family: "FranklinGothicHeavyItalic", "Arial Black", Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  letter-spacing: .02em;
}

/* Status / Died pill (black) */
.pq-entity-page .cse-entity-pills .cse-pill.cse-pill--dead{
  background: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.pq-entity-page .cse-entity-pills .cse-pill.cse-pill--dead .cse-pill-label,
.pq-entity-page .cse-entity-pills .cse-pill.cse-pill--dead .cse-pill-value{
  color: #fff !important;
}

/* Hide inline comments block at bottom (drawer only) */
.pq-entity-page .cse-entity-content .pq-cdr-inline{ display:none !important; }

/* Make sure the image area can host the comments trigger injected by pq-comments-drawer-reboot */
.pq-entity-page .cse-entity-photo .pq-media{ position: relative; }


/* Hero pills - PopQuest green glow */
.pq-entity-page .cse-entity-pills .cse-pill{
  font-family: var(--pq-display-font) !important;
  font-style: italic;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: rgba(145,248,141,0.22);
  border: 2px solid rgba(145,248,141,0.95);
  color:#000;
  box-shadow: 0 10px 18px rgba(145,248,141,0.18), 0 0 0 3px rgba(145,248,141,0.18);
}
.pq-entity-page .cse-entity-pills .cse-pill .cse-pill-label,
.pq-entity-page .cse-entity-pills .cse-pill .cse-pill-value{ color:#000; }

/* Fact pills (Born/Status/Died) */
.pq-entity-page .cse-entity-facts .cse-fact{
  background: rgba(145,248,141,0.18);
  border: 2px solid rgba(145,248,141,0.75);
  box-shadow: 0 10px 18px rgba(145,248,141,0.14), 0 0 0 3px rgba(145,248,141,0.12);
  font-family: var(--pq-display-font) !important;
  font-style: italic;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.pq-entity-page .cse-entity-facts .cse-fact .cse-fact-k,
.pq-entity-page .cse-entity-facts .cse-fact .cse-fact-v{ color:#000; }

/* Deceased / Died pill treatment */
.pq-entity-page .cse-pill.is-deceased,
.pq-entity-page .cse-fact.is-died,
.pq-entity-page .cse-fact.is-deceased{
  background:#000;
  border-color:#000;
  box-shadow: none;
  color:#fff;
}
.pq-entity-page .cse-pill.is-deceased .cse-pill-label,
.pq-entity-page .cse-pill.is-deceased .cse-pill-value,
.pq-entity-page .cse-fact.is-died .cse-fact-k,
.pq-entity-page .cse-fact.is-died .cse-fact-v,
.pq-entity-page .cse-fact.is-deceased .cse-fact-k,
.pq-entity-page .cse-fact.is-deceased .cse-fact-v{ color:#fff; }

/* Comments trigger smaller + top-left on image */
.pq-entity-page .pq-media .pq-cdr-trigger{ top:14px; left:14px; right:auto; }
.pq-entity-page .pq-media .pq-cdr-trigger__btn{ padding:6px 8px; gap:6px; font-size:11px; }

/* Hide the hero-image COMMENT CTA (you already have one below the hero) */
.pq-entity-page .pq-media .pq-cdr-trigger{ display:none !important; }

/* =========================
   DECEASED MODE
   - subtle photo desaturation
   - death facts (Status/Died) in black/white
   - keep hero UI typography in Franklin
   ========================= */

/* Subtle desat (only when the entity is marked deceased via JS) */
.pq-entity-page.pqeh-is-deceased .cse-entity-photo img{
  filter: grayscale(30%) saturate(0.65) contrast(1.02);
}

/* Death facts: black background with white text */
.pq-entity-page .cse-entity-facts .cse-fact.pqeh-status-deceased,
.pq-entity-page .cse-entity-facts .cse-fact.pqeh-fact-died{
  background:#000 !important;
  border-color:#000 !important;
  box-shadow:none !important;
}
.pq-entity-page .cse-entity-facts .cse-fact.pqeh-status-deceased .cse-fact-k,
.pq-entity-page .cse-entity-facts .cse-fact.pqeh-status-deceased .cse-fact-v,
.pq-entity-page .cse-entity-facts .cse-fact.pqeh-fact-died .cse-fact-k,
.pq-entity-page .cse-entity-facts .cse-fact.pqeh-fact-died .cse-fact-v{
  color:#fff !important;
}

/* Force Franklin for the hero UI bits (pills, facts, updated lines). Keep body copy Inter. */
.pq-entity-page .cse-entity-header .cse-entity-updated,
.pq-entity-page .cse-entity-header .cse-entity-updated *,
.pq-entity-page .cse-entity-header .cse-entity-pills .cse-pill,
.pq-entity-page .cse-entity-header .cse-entity-pills .cse-pill *,
.pq-entity-page .cse-entity-header .cse-entity-facts .cse-fact,
.pq-entity-page .cse-entity-header .cse-entity-facts .cse-fact *{
  font-family: "FranklinGothicHeavyItalic", "Arial Black", Arial, sans-serif !important;
  font-style: italic !important;
  letter-spacing: .02em;
  text-transform: uppercase;
}


/* Hide inline comments block at bottom on entity pages (drawer only) */
.pq-entity-page #pq-cdr-inline{ display:none !important; }

/* =========================
   FINAL CLEAN OVERRIDES (v1.0.64)
   - Keep existing design
   - Fix desktop italic overhang/spill
   - Ensure long single-word names can wrap
   - Remove 'double pill' look on comments CTA
========================= */

body.pq-entity-page .cse-entity-header .cse-entity-top h1.cse-title{
  /* Stop italic glyph overhang escaping the black pill */
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding-right: 40px !important; /* extra room for italic slant */

  /* Fit long names WITHOUT mid-word splitting */
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;

  /* Start slightly smaller on desktop; JS will shrink further if needed */
  font-size: clamp(34px, 4.4vw, 66px) !important;
  line-height: 0.92 !important;
}

/* Ensure the grid column can actually shrink (prevents overflow in some browsers) */
body.pq-entity-page .cse-entity-header .cse-entity-top{ min-width: 0 !important; }

/* Never show any fallback CTA on entity pages (use the real pq-cdr trigger only) */
body.pq-entity-page .pq-entity-comments-cta-fallback{ display:none !important; }

/* Remove shadow that can read like a second pill behind the comments CTA */
body.pq-entity-page .pq-cdr-trigger{ box-shadow: none !important; }

/* =========================================
   TITLE WORD WRAP (NO MID-WORD BREAKS)
   - JS wraps each word in .cse-title-word spans
   - Desktop can now only break on spaces (not inside surnames)
========================================= */
body.pq-entity-page .cse-title .cse-title-word,
.pq-entity-page .cse-title .cse-title-word{
  display: inline-block !important;
  white-space: nowrap !important;
}

body.pq-entity-page h1.cse-title,
.pq-entity-page h1.cse-title{
  overflow-wrap: normal !important;
  word-break: normal !important;
  word-wrap: normal !important;
  hyphens: none !important;
}


/* -----------------------------
   Title pill: hug text, no mid-word splits, responsive
   (Final override)
------------------------------ */
body.pq-entity-page .cse-entity-header h1.cse-title{
  /* Use inline-block + fit-content so the black highlight hugs the text.
     (display:inline can end up painting full-width line boxes depending on other CSS.) */
  display: inline-block !important;
  width: -moz-fit-content !important;
  width: fit-content !important;
  background: #000 !important;
  color: #fff !important;
  padding: 18px 28px 18px 22px !important;
  border-radius: 22px !important;
  box-decoration-break: clone !important;
  -webkit-box-decoration-break: clone !important;

  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  overflow: hidden !important; /* clip italic overhang */

  /* Ensure pills never sit underneath the title */
  margin-bottom: 16px !important;
}

/* Word spans created by JS: can only break between words */
body.pq-entity-page .cse-entity-header h1.cse-title .cse-title-word{
  display: inline-block !important;
  white-space: nowrap !important;
}

/* Allow grid/flex children to actually shrink */
body.pq-entity-page .cse-entity-top{ min-width: 0 !important; }

/* --- Hotfix: remove outer rounded card wrapper (requested) --- */
.pq-entity-page .cse-entity-card{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.pq-entity-page .cse-entity-grid{
  padding: 0 !important;
}

/* --- Hotfix: pills spacing + prevent overlap under the title --- */
.pq-entity-page .cse-entity-pills{
  gap: 10px 12px !important;
  margin-top: 12px !important;
}
.pq-entity-page .cse-pill{
  margin: 0 !important;
  line-height: 1.05 !important;
}
/* Make sure the title pill always clips italic overhang, even if theme overrides */
.pq-entity-page .cse-title{
  overflow: hidden !important;
  position: relative;
  clip-path: inset(0 round 18px);
}


/* -----------------------------
   Trade box placement: directly under hero card
------------------------------ */
.pqehd-trade-under-hero{
  /* placed as a sibling immediately after .cse-entity-header */
  margin: 14px 0 0;
}
@media (min-width: 861px){
  /* keep it visually tucked under the hero card */
  .pqehd-trade-under-hero{
    margin-top: 18px;
  }
}

/* Make trade box text readable (keep balance/holdings pills as-is) */
.pqehd-trade-under-hero .cse-trade-box,
.pqehd-trade-under-hero .cse-trade-box *{
  color: #000;
}
.pqehd-trade-under-hero .cse-trade-pill,
.pqehd-trade-under-hero .cse-trade-pill *{
  color: #fff; /* ensure balance/holdings pills stay readable */
}



/* === Centre trade box under hero (desktop only) === */
@media (min-width: 1024px) {

  .cse-entity > #cse-trade-mount,
  .cse-entity > .cse-trade-inline {
    display: flex;
    justify-content: center;
    margin: 28px 0 10px;
  }

  .cse-entity > #cse-trade-mount .cse-trade-box,
  .cse-entity > .cse-trade-inline .cse-trade-box {
    width: 100%;
    max-width: 620px;
  }
}

/* =========================================================
   COMMENTS PILL POSITION
   The comments plugin renders the pill CTA, but THIS hero plugin
   positions it in the image. Force it to sit under the photo.
   ========================================================= */
.pq-entity-page .cse-entity-photo{
  /* Create breathing room for the pill under the image */
  padding-bottom: 56px;
}

.pq-entity-page .cse-entity-photo .pq-cdr-trigger,
.pq-entity-page .cse-entity-photo .pq-cdr-trigger--left,
.pq-entity-page .cse-entity-photo .pq-cdr-image-pill{
  top: auto !important;
  bottom: 14px !important;
  left: 18px !important;
  right: auto !important;
  transform: none !important;
}


/* =========================
   FORCE COMMENTS PILL BOTTOM-CENTER (CURRENT HERO MARKUP)
   ========================= */
.pq-entity-page .cse-entity-photo .pq-cdr-trigger{
  top: auto !important;
  bottom: 14px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}


/* =========================
   TRUE VISUAL CENTER FIX
   ========================= */
.pq-entity-page .cse-entity-photo .pq-cdr-trigger{
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  bottom: 14px !important;
  top: auto !important;
  transform: none !important;
  width: max-content;
}


/* =========================
   OPTICAL CENTER ADJUSTMENT (+3px right)
   ========================= */
.pq-entity-page .cse-entity-photo .pq-cdr-trigger{
  left: calc(50% + 3px) !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}

/* =========================
   Latest Articles – align editorial kicker with headline start (no JS)
   ========================= */
.pq-entity-page .pqn-latest-card__text{
  padding: 0 16px 18px 16px !important;
}
.pq-entity-page .pqn-latest-card__editorial{
  margin: 14px 0 6px 0 !important; /* no left indent; parent padding handles gutter */
  display: inline-block !important;
}
.pq-entity-page .pqn-latest-card__headline{
  margin: 0 0 10px 0 !important;
}
.pq-entity-page .pqn-latest-card__summary{
  margin: 0 !important;
}


/* ===========================
   OVERRIDES — v1.1.06
   Fix: square cards + proper kickers
   =========================== */

/* Square cards (no rounding anywhere) */
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card{
  border-radius: 0 !important;
}
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card *{
  border-radius: 0 !important;
}

/* Text gutter so editorial aligns with headline */
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card__text{
  padding: 0 16px 18px 16px !important;
}

/* NEWS kicker: black pill, top-left (not full-width bar) */
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card__kicker{
  left: 12px !important;
  top: 12px !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: calc(100% - 24px) !important;
  padding: 7px 10px !important;
  border-radius: 999px !important;
  background: #000 !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,.12) !important;
}

/* Editorial kicker: green pill, Franklin, styled like landing template */
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card__editorial{
  display: inline-block !important;
  margin: 14px 0 6px 0 !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: #91F88D !important;
  color: #000 !important;
  font-family:"PQFranklin","PQ Franklin","pqfranklin","FranklinGothicHeavyItalic","Franklin Gothic Heavy Italic", Arial Black, Arial, sans-serif !important;
  font-weight: 800 !important;
  font-style: italic !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-size: 12px !important;
  line-height: 1 !important;
  opacity: 1 !important;
}

/* Headline + summary: no extra left margins so they align to editorial */
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card__headline{
  margin: 0 0 10px 0 !important;
}
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card__summary{
  margin: 0 !important;
  margin-top: 8px !important;
}

/* Media: keep 16:9 but show more of the subject */
.pq-entity-page .pqehd-bottom-modules .pqn-latest-card__img{
  object-position: 50% 30% !important;
}

@media (max-width: 520px){
  .pq-entity-page .pqehd-bottom-modules .pqn-latest-card__kicker{
    left: 10px !important;
    top: 10px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
  }
  .pq-entity-page .pqehd-bottom-modules .pqn-latest-card__editorial{
    font-size: 11px !important;
    padding: 5px 9px !important;
  }
  .pq-entity-page .pqehd-bottom-modules .pqn-latest-card__text{
    padding: 0 14px 16px 14px !important;
  }
}

