/* ==========================================================================
   FAFORE BLOG — DESIGN SYSTEM v2.7
   Matches the platform identity: Cinzel display + Raleway body.
   Self-contained. Every selector is namespaced .ff- so nothing else breaks.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

:root {
  /* ---- brand ---- */
  --ff-black:        #07070a;
  --ff-black-1:      #0c0c11;
  --ff-black-2:      #121219;
  --ff-black-3:      #1a1a23;
  --ff-line:         #262631;
  --ff-line-soft:    #1b1b23;

  --ff-gold:         #d4af37;
  --ff-gold-bright:  #f2d783;
  --ff-gold-deep:    #9a7b2e;
  --ff-gold-ghost:   rgba(212,175,55,.13);
  --ff-violet:       #8b5cf6;
  --ff-teal:         #2dd4bf;

  --ff-ink:          #f3f0e9;
  --ff-ink-soft:     #cfcabd;
  --ff-muted:        #96918a;
  --ff-muted-2:      #6f6a62;

  --ff-danger:       #e57373;
  --ff-ok:           #6ee7a8;

  /* ---- type (same families as the rest of the platform) ---- */
  --ff-display: "Cinzel", "Segoe UI", serif;
  --ff-body:    "Raleway", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ff-sans:    "Raleway", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ff-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ff-measure: 74ch;
  --ff-radius: 16px;
  --ff-radius-lg: 22px;
  --ff-radius-sm: 10px;

  /* ---- glass / 3D ---- */
  --ff-glass: linear-gradient(158deg, rgba(255,255,255,.06), rgba(255,255,255,.012) 60%);
  --ff-glass-border: rgba(255,255,255,.10);
  --ff-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px -24px rgba(0,0,0,.95);
  --ff-shadow-hover: inset 0 1px 0 rgba(255,255,255,.10), 0 34px 60px -26px rgba(0,0,0,1), 0 0 0 1px rgba(212,175,55,.28);
  --ff-accent: var(--ff-gold);

  --ff-ease: cubic-bezier(.2,.7,.3,1);
}

/* --------------------------------------------------------------------------
   RESET / SCOPE
   -------------------------------------------------------------------------- */
.ff-blog *, .ff-blog *::before, .ff-blog *::after { box-sizing: border-box; }

.ff-blog {
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(212,175,55,.07), transparent 55%),
    var(--ff-black);
  color: var(--ff-ink);
  font-family: var(--ff-sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: .6rem;
  padding-bottom: 0;
}
.ff-container { width: min(1460px, 100% - 2.5rem); margin-inline: auto; }

.ff-blog img { max-width: 100%; height: auto; display: block; }
.ff-blog a { color: var(--ff-gold); text-decoration-color: rgba(212,175,55,.35); text-underline-offset: 3px; }
.ff-blog a:hover { color: var(--ff-gold-bright); text-decoration-color: currentColor; }

.ff-blog :focus-visible { outline: 2px solid var(--ff-gold-bright); outline-offset: 3px; border-radius: 5px; }

.ff-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ff-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ff-gold); color: #000; padding: .7rem 1.1rem; font-weight: 600; border-radius: 0 0 var(--ff-radius-sm) 0; }
.ff-skip:focus { left: 0; }

/* --------------------------------------------------------------------------
   TYPE
   -------------------------------------------------------------------------- */
.ff-eyebrow {
  font-family: var(--ff-sans);
  font-size: .7rem; font-weight: 700; letter-spacing: .17em;
  text-transform: uppercase; color: var(--ff-gold);
}
.ff-h1, .ff-h2, .ff-h3 { font-family: var(--ff-display); font-weight: 600; letter-spacing: -.018em; }
.ff-h1 { font-size: clamp(2rem, 1.3rem + 3.1vw, 3.6rem); line-height: 1.08; }
.ff-h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.2rem); line-height: 1.18; }
.ff-h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem); line-height: 1.3; }
.ff-dek { font-family: var(--ff-body); font-weight: 400; font-size: clamp(1.08rem, 1rem + .55vw, 1.32rem); color: var(--ff-ink-soft); line-height: 1.62; }

/* --------------------------------------------------------------------------
   90px LEADERBOARD
   -------------------------------------------------------------------------- */
.ff-header-ad { width: min(1460px, 100% - 2.5rem); margin: 1rem auto 1.7rem; min-height: 90px; }
.ff-header-ad .ff-ad__label { display: none; }
.ff-header-ad .ep-ad-card {
  box-sizing: border-box; height: 90px !important; min-height: 90px;
  display: grid !important; grid-template-columns: auto minmax(0,1fr) auto; grid-template-rows: auto auto;
  align-items: center; column-gap: 18px; row-gap: 1px;
  padding: 12px 22px !important; border-radius: var(--ff-radius-sm) !important; overflow: hidden;
}
.ff-header-ad .ep-ad-card img { grid-column: 1; grid-row: 1 / span 2; height: 66px !important; width: auto !important; max-width: 190px; object-fit: cover; margin: 0 !important; border-radius: 8px !important; }
.ff-header-ad .ep-ad-card p:first-of-type { grid-column: 2; grid-row: 1; margin: 0 !important; font-size: 15px !important; }
.ff-header-ad .ep-ad-card p:last-of-type  { grid-column: 2; grid-row: 2; margin: 0 !important; }
.ff-header-ad .ep-ad-card > span:last-child { grid-column: 3; grid-row: 1 / span 2; align-self: center; flex: none; }
@media (max-width: 640px) { .ff-header-ad { min-height: 0; } .ff-header-ad .ep-ad-card { height: auto !important; min-height: 0; display: flex !important; flex-wrap: wrap; } }

/* --------------------------------------------------------------------------
   MASTHEAD
   -------------------------------------------------------------------------- */
.ff-masthead {
  position: relative; overflow: hidden;
  border: 1px solid var(--ff-glass-border);
  border-radius: var(--ff-radius-lg);
  background:
    radial-gradient(90% 140% at 50% -30%, rgba(212,175,55,.16), transparent 60%),
    var(--ff-glass), var(--ff-black-1);
  box-shadow: var(--ff-shadow);
  padding: clamp(2rem, 5vw, 3.4rem) 1.4rem clamp(1.6rem, 3.4vw, 2.4rem);
  text-align: center;
}
.ff-masthead::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 100% at 50% 120%, rgba(139,92,246,.12), transparent 70%); }
.ff-masthead__title { font-family: var(--ff-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin: .4rem 0 .55rem; }
.ff-masthead__title em { font-style: normal; color: var(--ff-gold); }
.ff-masthead__sub { font-family: var(--ff-body); color: var(--ff-muted); max-width: 64ch; margin: 0 auto; font-size: 1.05rem; }
.ff-search input { background: var(--ff-black-2) !important; border: 1px solid var(--ff-line) !important; color: var(--ff-ink) !important; }
.ff-btn { font-family: var(--ff-sans); font-weight: 700; border: 0; border-radius: 999px; padding: .6rem 1.35rem; cursor: pointer; background: linear-gradient(135deg, var(--ff-gold-bright), var(--ff-gold)); color: #0a0a0c; transition: transform .25s var(--ff-ease), box-shadow .25s var(--ff-ease); }
.ff-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(212,175,55,.6); }

/* --------------------------------------------------------------------------
   SHELL — left rail · main · right rail
   -------------------------------------------------------------------------- */
.ff-shell { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.4rem; align-items: start; margin-top: 1.5rem; }
.ff-shell__main { min-width: 0; }
.ff-rail { display: flex; flex-direction: column; gap: 1.15rem; min-width: 0; }
.ff-rail--left  { order: 1; }
.ff-shell__main { order: 2; }
.ff-rail--right { order: 3; }

@media (min-width: 960px) {
  .ff-shell { grid-template-columns: minmax(0,1fr) 320px; gap: 1.8rem; }
  .ff-shell__main { grid-column: 1; grid-row: 1; }
  .ff-rail--right { grid-column: 2; grid-row: 1; position: sticky; top: 76px; }
  .ff-rail--left  { grid-column: 1 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; }
  .ff-rail--left > * { flex: 1 1 240px; }
}
@media (min-width: 1240px) {
  .ff-shell { grid-template-columns: 300px minmax(0,1fr) 320px; gap: clamp(1.5rem, 2.2vw, 2.25rem); }
  .ff-rail--left  { grid-column: 1; grid-row: 1; flex-direction: column; position: sticky; top: 76px; }
  .ff-rail--left > * { flex: none; }
  .ff-shell__main { grid-column: 2; grid-row: 1; }
  .ff-rail--right { grid-column: 3; grid-row: 1; }
}
@media (max-width: 959px) { .ff-shell__main { order: 1; } .ff-rail--left { order: 2; } .ff-rail--right { order: 3; } }

/* --------------------------------------------------------------------------
   CARDS — glass / 3D
   -------------------------------------------------------------------------- */
.ff-card, .ff-widget, .ff-overview, .ff-author, .ff-toc-card, .ff-hero, .ff-topic, .ff-cathead {
  position: relative;
  background: var(--ff-glass), var(--ff-black-1);
  border: 1px solid var(--ff-glass-border);
  border-radius: var(--ff-radius);
  box-shadow: var(--ff-shadow);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  transition: transform .35s var(--ff-ease), box-shadow .35s var(--ff-ease), border-color .35s var(--ff-ease);
}
.ff-card::before, .ff-widget::before, .ff-topic::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: var(--ff-radius) var(--ff-radius) 0 0;
  background: linear-gradient(90deg, var(--ff-accent), transparent 78%); opacity: .9;
}
.ff-card:hover, .ff-widget:hover, .ff-topic:hover {
  transform: translateY(-6px);
  box-shadow: var(--ff-shadow-hover);
  border-color: color-mix(in srgb, var(--ff-accent) 45%, transparent);
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.ff-hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  overflow: hidden; margin: 1.7rem 0 0; border-radius: var(--ff-radius-lg);
}
.ff-hero__media { position: relative; min-height: 340px; background: var(--ff-black-3); }
.ff-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ff-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,12,.55), transparent 55%); }
.ff-hero__body { padding: clamp(1.6rem,3.5vw,2.6rem); display: flex; flex-direction: column; justify-content: flex-start; gap: .9rem; }
.ff-hero__title { font-family: var(--ff-display); font-size: clamp(1.5rem,1.2rem+1.6vw,2.2rem); line-height: 1.15; margin: 0; }
.ff-hero__title a { color: var(--ff-ink); text-decoration: none; }
.ff-hero__title a:hover { color: var(--ff-gold-bright); }
.ff-hero__excerpt { font-family: var(--ff-body); color: var(--ff-ink-soft); margin: 0; }

/* --------------------------------------------------------------------------
   SECTION HEADS
   -------------------------------------------------------------------------- */
.ff-section { margin: clamp(2.4rem,5vw,3.6rem) 0; }
.ff-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .85rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--ff-line-soft); }
.ff-section__title { font-family: var(--ff-display); font-size: clamp(1.4rem,1.15rem+1vw,1.9rem); margin: 0; }
.ff-section__link { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   ARTICLE CARDS
   -------------------------------------------------------------------------- */
.ff-grid { display: grid; gap: clamp(1.1rem,2.4vw,1.7rem); }
.ff-grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
/* Related reading + Keep reading: exactly three across on desktop, never a
   stranded fourth card when the viewport is at 100% zoom. */
@media (min-width: 760px) {
  .ff-related .ff-grid--3,
  .ff-keep-reading .ff-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ff-grid--4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ff-grid--2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ff-shell__main .ff-grid--2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ff-shell__main .ff-grid--3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.ff-card { display: flex; flex-direction: column; overflow: hidden; }
.ff-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--ff-black-3); overflow: hidden; }
.ff-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ff-ease); }
.ff-card:hover .ff-card__media img { transform: scale(1.06); }
.ff-card__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.ff-card__title { font-family: var(--ff-display); font-size: 1.18rem; line-height: 1.3; margin: 0; }
.ff-card__title a { color: var(--ff-ink); text-decoration: none; }
.ff-card__title a:hover { color: var(--ff-gold-bright); }
.ff-card__excerpt { font-family: var(--ff-body); color: var(--ff-muted); font-size: .95rem; margin: 0; flex: 1; }
.ff-card__meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; color: var(--ff-muted-2); font-size: .76rem; margin-top: auto; }
.ff-card__title a::after { content: ""; position: absolute; inset: 0; }

/* --------------------------------------------------------------------------
   PILLS
   -------------------------------------------------------------------------- */
.ff-pill {
  display: inline-flex; align-items: center; gap: .35rem; width: fit-content;
  padding: .28rem .72rem; border-radius: 999px;
  border: 1px solid var(--ff-glass-border); background: var(--ff-black-2);
  color: var(--ff-ink-soft); font-family: var(--ff-sans); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
}
.ff-pill--gold { border-color: rgba(212,175,55,.45); background: var(--ff-gold-ghost); color: var(--ff-gold-bright); }

/* --------------------------------------------------------------------------
   TOPICS
   -------------------------------------------------------------------------- */
.ff-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: .9rem; }
.ff-topic { display: block; padding: 1.2rem 1.25rem; text-decoration: none; color: var(--ff-ink); }
.ff-topic__name { font-family: var(--ff-display); font-size: 1.12rem; display: block; }
.ff-topic__count { color: var(--ff-muted-2); font-size: .78rem; }

/* --------------------------------------------------------------------------
   BREADCRUMBS
   -------------------------------------------------------------------------- */
.ff-crumbs { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .78rem; color: var(--ff-muted-2); padding: 1rem 0 0; }
.ff-crumbs a { color: var(--ff-muted); text-decoration: none; }
.ff-crumbs a:hover { color: var(--ff-gold); }
.ff-crumbs__sep { opacity: .5; }

/* --------------------------------------------------------------------------
   ARTICLE HEADER
   -------------------------------------------------------------------------- */
.ff-article { padding-top: .4rem; }
.ff-article__header { padding: clamp(1.4rem,3vw,2.4rem) 0 1.3rem; }
.ff-article__title { font-family: var(--ff-display); font-size: clamp(1.9rem,1.35rem+2.6vw,3.2rem); line-height: 1.08; margin: .7rem 0 .8rem; letter-spacing: -.02em; }
.ff-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; color: var(--ff-muted); font-size: .84rem; margin-top: 1.1rem; }
.ff-article__meta .ff-dot { opacity: .45; }
.ff-byline { display: inline-flex; align-items: center; gap: .55rem; }
.ff-byline img { width: 34px; height: 34px; border-radius: 999px; object-fit: cover; border: 1px solid var(--ff-line); }

/* --------------------------------------------------------------------------
   FEATURED FIGURE
   -------------------------------------------------------------------------- */
.ff-figure { margin: 1.6rem 0; border: 1px solid var(--ff-glass-border); border-radius: var(--ff-radius); overflow: hidden; background: var(--ff-black-2); box-shadow: var(--ff-shadow); }
.ff-figure img { width: 100%; }
.ff-figure figcaption { padding: .75rem 1.1rem; color: var(--ff-muted-2); font-size: .78rem; border-top: 1px solid var(--ff-line-soft); }

/* --------------------------------------------------------------------------
   PROSE — the reading experience
   -------------------------------------------------------------------------- */
.ff-prose {
  font-family: var(--ff-body);
  font-size: clamp(1.09rem, 1.02rem + .38vw, 1.26rem);
  line-height: 1.85;
  color: var(--ff-ink);
  max-width: var(--ff-measure);
}
.ff-prose > * { margin: 0; }
.ff-prose p { margin: 0 0 1.55em; }
.ff-prose p:last-child { margin-bottom: 0; }
.ff-prose h2, .ff-prose h3, .ff-prose h4 { font-family: var(--ff-display); font-weight: 600; letter-spacing: -.015em; scroll-margin-top: 78px; }
.ff-prose h2 { font-size: clamp(1.5rem,1.25rem+1vw,2rem); line-height: 1.2; margin: 2.6em 0 .75em; }
.ff-prose h3 { font-size: clamp(1.24rem,1.1rem+.55vw,1.5rem); margin: 2em 0 .6em; }
.ff-prose h2::before, .ff-prose h3::before { content: ""; display: block; width: 46px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--ff-gold), transparent); margin-bottom: .5em; opacity: .95; }
.ff-prose ul, .ff-prose ol { padding-left: 1.4em; margin: 0 0 1.5em; }
.ff-prose li + li { margin-top: .5em; }
.ff-prose li::marker { color: var(--ff-gold); }
.ff-prose strong { color: #fff; font-weight: 600; }
.ff-prose a { text-decoration: underline; text-decoration-color: rgba(212,175,55,.4); }
.ff-prose a:hover { text-decoration-color: currentColor; }
.ff-prose blockquote {
  position: relative; margin: 2.1em 0; padding: 1.4rem 1.6rem 1.4rem 3.2rem;
  border: 1px solid rgba(212,175,55,.28);
  border-left: 4px solid var(--ff-gold);
  border-radius: 0 var(--ff-radius) var(--ff-radius) 0;
  background: linear-gradient(150deg, rgba(212,175,55,.10), rgba(212,175,55,.02));
  font-size: 1.08em; font-style: italic; color: var(--ff-ink-soft);
  box-shadow: var(--ff-shadow);
}
.ff-prose blockquote::before {
  content: "\201C"; position: absolute; left: .55rem; top: .05rem;
  font-family: var(--ff-display); font-size: 3.4rem; line-height: 1; color: var(--ff-gold); opacity: .55;
}
.ff-prose blockquote p + p { margin-top: .8em; }
.ff-prose blockquote p { margin: 0; }
.ff-prose img { border-radius: var(--ff-radius-sm); border: 1px solid var(--ff-line-soft); }
.ff-prose figure { margin: 2em 0; }
.ff-prose figcaption { color: var(--ff-muted-2); font-size: .82rem; font-family: var(--ff-sans); margin-top: .6rem; }
.ff-prose table { width: 100%; border-collapse: collapse; font-family: var(--ff-sans); font-size: .92rem; margin: 1.6em 0; border: 1px solid var(--ff-line); border-radius: var(--ff-radius-sm); overflow: hidden; }
.ff-prose th, .ff-prose td { border: 1px solid var(--ff-line); padding: .65rem .8rem; text-align: left; }
.ff-prose th { background: var(--ff-black-2); color: var(--ff-gold-bright); font-weight: 600; }
.ff-prose tr:nth-child(even) td { background: rgba(255,255,255,.015); }
.ff-prose code { font-family: var(--ff-mono); font-size: .9em; background: var(--ff-black-2); border: 1px solid var(--ff-line-soft); border-radius: 6px; padding: .1em .38em; color: var(--ff-gold-bright); }
.ff-prose pre { background: var(--ff-black-2); border: 1px solid var(--ff-line); border-radius: var(--ff-radius-sm); padding: 1rem 1.1rem; overflow-x: auto; margin: 1.6em 0; }
.ff-prose pre code { background: none; border: 0; padding: 0; color: var(--ff-ink-soft); }
.ff-prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--ff-line), transparent); margin: 2.6em 0; }

/* --------------------------------------------------------------------------
   "IN THIS ARTICLE" CARD (summary + TOC)
   -------------------------------------------------------------------------- */
.ff-toc-card { margin: 1.7rem 0 2rem; overflow: hidden; }
.ff-toc-card__head { display: flex; align-items: center; gap: .6rem; padding: 1.35rem 1.7rem .2rem; }
.ff-toc-card__head::before { content: ""; width: 22px; height: 2px; background: var(--ff-gold); }
.ff-toc-card__eyebrow { font-family: var(--ff-sans); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ff-gold); }
.ff-toc-card__lede {
  margin: .75rem 1.7rem 0; padding-bottom: 1.35rem;
  color: var(--ff-ink-soft); font-family: var(--ff-body);
  font-size: clamp(1.1rem, 1.02rem + .38vw, 1.26rem); line-height: 1.78;
  border-bottom: 1px solid var(--ff-line-soft);
}
.ff-toc-card__lede p { margin: 0; }
.ff-toc-card__lede p::first-letter {
  float: left; font-family: var(--ff-display); font-weight: 600;
  font-size: 3.5em; line-height: .78; padding: .06em .16em 0 0; color: var(--ff-gold);
}
.ff-toc-card__toc { padding: .25rem 0 .5rem; }
.ff-toc-card .ff-toc { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ff-toc-card .ff-toc::before { display: none; }
.ff-toc-card .ff-toc__toggle { padding: .95rem 1.7rem; color: var(--ff-muted); font-size: .68rem; letter-spacing: .17em; }
.ff-toc-card .ff-toc__body { padding: 0 1.7rem 1.5rem; border-top: 0; }
.ff-toc-card .ff-toc__body > ol { columns: 2; column-gap: 2.4rem; list-style: none; margin: 0; padding: 0; }
.ff-toc-card .ff-toc__body > ol > li { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; margin: 0 0 .1rem; }
.ff-toc-card .ff-toc a {
  display: flex; align-items: baseline; gap: .7rem;
  padding: .58rem .2rem; border-bottom: 1px solid var(--ff-line-soft);
  color: var(--ff-ink-soft); text-decoration: none; font-size: .92rem; line-height: 1.35;
  transition: color .2s var(--ff-ease), padding-left .2s var(--ff-ease);
}
.ff-toc-card .ff-toc a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ff-gold); opacity: .4; flex: none; }
.ff-toc-card .ff-toc a:hover { color: var(--ff-gold-bright); padding-left: .55rem; }
.ff-toc-card .ff-toc a:hover::before { opacity: 1; }
.ff-toc-card .ff-toc .ff-toc__lvl2 a { font-weight: 600; color: var(--ff-ink); }
.ff-toc-card .ff-toc .ff-toc__lvl3 a { padding-left: 1.05rem; font-size: .85rem; color: var(--ff-muted); }
.ff-toc-card .ff-toc .ff-toc__lvl3 a::before { width: 4px; height: 4px; opacity: .28; }
@media (max-width: 620px) { .ff-toc-card .ff-toc__body > ol { columns: 1; } }

/* --------------------------------------------------------------------------
   TABLE OF CONTENTS (generic)
   -------------------------------------------------------------------------- */
.ff-toc { margin: 1.7rem 0; border: 1px solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-black-1); overflow: hidden; }
.ff-toc__toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: .95rem 1.2rem; background: none; border: 0; color: var(--ff-ink); font-family: var(--ff-sans); font-size: .76rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
.ff-toc__toggle:hover { color: var(--ff-gold-bright); }
.ff-toc__chev { transition: transform .25s var(--ff-ease); color: var(--ff-gold); }
.ff-toc[data-open="false"] .ff-toc__chev { transform: rotate(-90deg); }
.ff-toc__body { padding: 0 1.2rem 1.1rem; border-top: 1px solid var(--ff-line-soft); }
.ff-toc[data-open="false"] .ff-toc__body { display: none; }
.ff-toc ol { list-style: none; margin: 0; padding: .9rem 0 0; }
.ff-toc li + li { margin-top: .15rem; }
.ff-toc a { display: block; padding: .38rem 0 .38rem .2rem; color: var(--ff-ink-soft); text-decoration: none; font-size: .92rem; border-left: 2px solid transparent; transition: color .2s var(--ff-ease), border-color .2s var(--ff-ease), padding-left .2s var(--ff-ease); }
.ff-toc a:hover, .ff-toc a[aria-current="true"] { color: var(--ff-gold-bright); border-left-color: var(--ff-gold); padding-left: .7rem; }
.ff-toc .ff-toc__lvl3 a { padding-left: 1.1rem; font-size: .87rem; color: var(--ff-muted); }

/* --------------------------------------------------------------------------
   AT A GLANCE
   -------------------------------------------------------------------------- */
.ff-overview { margin: 1.7rem 0; padding: 1.4rem 1.5rem; }
.ff-overview__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; }
.ff-overview__title { font-family: var(--ff-sans); font-size: .72rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; color: var(--ff-gold); margin: 0; }
.ff-overview__list { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: .9rem 1.5rem; margin: 0; font-size: .88rem; }
.ff-overview__list dt { color: var(--ff-muted-2); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .2rem; }
.ff-overview__list dd { margin: 0; color: var(--ff-ink-soft); }

/* --------------------------------------------------------------------------
   REACTIONS
   -------------------------------------------------------------------------- */
.ff-reactions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 2rem 0 0; }
.ff-reactions .reaction-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--ff-glass-border);
  background: var(--ff-glass), var(--ff-black-1);
  color: var(--ff-ink-soft); font-family: var(--ff-sans); font-size: .88rem; font-weight: 600;
  cursor: pointer; box-shadow: var(--ff-shadow);
  transition: transform .3s var(--ff-ease), box-shadow .3s var(--ff-ease), border-color .3s var(--ff-ease), color .3s var(--ff-ease);
}
.ff-reactions .reaction-btn i { color: var(--ff-gold); font-size: 1rem; }
.ff-reactions .reaction-btn:hover { transform: translateY(-4px); border-color: rgba(212,175,55,.4); box-shadow: var(--ff-shadow-hover); color: #fff; }
.ff-reactions .reaction-btn.active { border-color: var(--ff-gold); background: var(--ff-gold-ghost); color: var(--ff-gold-bright); }
.ff-reactions .reaction-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; padding: .1em .45em; border-radius: 999px; background: rgba(0,0,0,.4); font-size: .78rem; color: var(--ff-ink-soft); }

/* --------------------------------------------------------------------------
   SHARE
   -------------------------------------------------------------------------- */
.ff-share { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: 1.6rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--ff-line-soft); }
.ff-share__label { font-family: var(--ff-sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ff-muted-2); margin-right: .3rem; }
.ff-share a, .ff-share button {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--ff-glass-border);
  background: var(--ff-glass), var(--ff-black-1); color: var(--ff-ink-soft);
  font-family: var(--ff-sans); font-size: .8rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ff-ease), border-color .25s var(--ff-ease), color .25s var(--ff-ease);
}
.ff-share a:hover, .ff-share button:hover { transform: translateY(-3px); border-color: var(--ff-gold); color: var(--ff-gold-bright); }
.ff-share svg { width: 15px; height: 15px; fill: currentColor; }

/* --------------------------------------------------------------------------
   AUTHOR CARD
   -------------------------------------------------------------------------- */
.ff-author { display: flex; gap: 1.2rem; align-items: flex-start; margin: 2.4rem 0; padding: 1.6rem; }
.ff-author__avatar { flex: none; width: 68px; height: 68px; border-radius: 999px; object-fit: cover; border: 2px solid rgba(212,175,55,.5); box-shadow: 0 0 0 6px rgba(212,175,55,.08); }
.ff-author__name { font-family: var(--ff-display); font-size: 1.25rem; margin: 0 0 .2rem; }
.ff-author__role { font-family: var(--ff-sans); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ff-gold); }
.ff-author__bio { font-family: var(--ff-body); color: var(--ff-muted); font-size: .95rem; margin: .6rem 0 0; }
.ff-author__links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; font-size: .82rem; }

/* --------------------------------------------------------------------------
   RELATED
   -------------------------------------------------------------------------- */
.ff-related { margin: clamp(2.4rem,5vw,3.6rem) 0; }

/* --------------------------------------------------------------------------
   PAGER
   -------------------------------------------------------------------------- */
.ff-pager { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin: 2.8rem 0 1rem; }
.ff-pager a, .ff-pager span { min-width: 44px; height: 44px; padding: 0 .75rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ff-glass-border); border-radius: var(--ff-radius-sm); background: var(--ff-black-1); color: var(--ff-ink-soft); text-decoration: none; font-size: .9rem; }
.ff-pager a:hover { border-color: var(--ff-gold); color: var(--ff-gold-bright); transform: translateY(-2px); }
.ff-pager [aria-current="page"] { background: var(--ff-gold); border-color: var(--ff-gold); color: #0a0a0c; font-weight: 700; }

/* --------------------------------------------------------------------------
   WIDGETS (rails)
   -------------------------------------------------------------------------- */
.ff-widget { padding: 1.15rem 1.2rem; }
.ff-widget__h { display: flex; align-items: center; gap: .55rem; font-family: var(--ff-sans); font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ff-gold); margin: 0 0 .9rem; }
.ff-widget__h::before { content: ""; width: 18px; height: 2px; background: var(--ff-gold); opacity: .9; }
.ff-widget__text { font-family: var(--ff-body); color: var(--ff-muted); font-size: .9rem; line-height: 1.65; margin: 0; }
.ff-widget__link { display: inline-block; margin-top: .75rem; font-size: .8rem; font-weight: 600; }

.ff-rank { list-style: none; margin: 0; padding: 0; counter-reset: ff-rank; }
.ff-rank li { counter-increment: ff-rank; display: flex; gap: .7rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--ff-line-soft); }
.ff-rank li:first-child { border-top: 0; padding-top: 0; }
.ff-rank li::before { content: counter(ff-rank, decimal-leading-zero); font-family: var(--ff-mono); font-size: .7rem; color: var(--ff-gold); opacity: .85; flex: none; }
.ff-rank a { color: var(--ff-ink-soft); text-decoration: none; font-size: .9rem; line-height: 1.4; }
.ff-rank a:hover { color: var(--ff-gold-bright); }

.ff-recent { list-style: none; margin: 0; padding: 0; }
.ff-recent li + li { border-top: 1px solid var(--ff-line-soft); }
.ff-recent a { display: block; padding: .6rem 0; text-decoration: none; }
.ff-recent__t { display: block; color: var(--ff-ink-soft); font-size: .9rem; line-height: 1.4; }
.ff-recent a:hover .ff-recent__t { color: var(--ff-gold-bright); }
.ff-recent__d { display: block; margin-top: .2rem; color: var(--ff-muted-2); font-size: .72rem; }

.ff-toplinks { list-style: none; margin: 0; padding: 0; }
.ff-toplinks a { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--ff-line-soft); color: var(--ff-ink-soft); text-decoration: none; font-size: .88rem; }
.ff-toplinks li:last-child a { border-bottom: 0; }
.ff-toplinks a:hover { color: var(--ff-gold-bright); }
.ff-toplinks .ff-count { color: var(--ff-muted-2); font-size: .74rem; flex: none; }

/* --------------------------------------------------------------------------
   AD SLOTS
   -------------------------------------------------------------------------- */
.ff-ad { margin: 0; }
.ff-ad__label { display: block; margin: 0 0 .45rem; font-family: var(--ff-sans); font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ff-muted-2); }
.ff-ad .ep-ad-card { border-radius: var(--ff-radius-sm) !important; }
.ff-ad--inline { margin: 2rem 0; }

/* --------------------------------------------------------------------------
   CATEGORY HEAD
   -------------------------------------------------------------------------- */
.ff-cathead { padding: clamp(1.5rem,3vw,2.4rem); margin: 1rem 0 .5rem; }
.ff-cathead .ff-article__title { margin: .7rem 0 .6rem; }
.ff-cathead__count { color: var(--ff-muted-2); font-size: .82rem; margin: .8rem 0 0; }

/* --------------------------------------------------------------------------
   EMPTY STATE
   -------------------------------------------------------------------------- */
.ff-empty { padding: 3rem 1.5rem; text-align: center; border: 1px dashed var(--ff-line); border-radius: var(--ff-radius); color: var(--ff-muted); }

/* --------------------------------------------------------------------------
   SITE FOOTER (included from includes/footer.php)
   -------------------------------------------------------------------------- */
.ff-blog + .footer-section, .ff-blog ~ .footer-section { margin-top: 3rem; }
.footer-section { border-top: 1px solid var(--ff-line-soft); background: var(--ff-black-1); }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .ff-hero { grid-template-columns: 1fr; }
  .ff-hero__media { min-height: 230px; }
  .ff-hero__media::after { background: linear-gradient(0deg, rgba(10,10,12,.9), transparent 60%); }
}
@media (max-width: 560px) {
  .ff-blog { font-size: 16px; }
  .ff-container, .ff-header-ad { width: min(100% - 1.6rem, 1460px); }
  .ff-share a span, .ff-share button span { display: none; }
  .ff-share a, .ff-share button { padding: .6rem; }
  .ff-author { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   COMMENTS
   -------------------------------------------------------------------------- */
.ff-comments { margin: clamp(2.4rem,5vw,3.4rem) 0 0; padding-top: 2rem; border-top: 1px solid var(--ff-line-soft); }
.ff-comments__head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1.2rem; }
.ff-comments__title { font-family: var(--ff-display); font-size: clamp(1.4rem,1.15rem + 1vw,1.9rem); margin: 0; }
.ff-comments__count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.7em;
  padding: .12em .5em; border-radius: 999px; background: var(--ff-gold-ghost);
  border: 1px solid rgba(212,175,55,.35); color: var(--ff-gold-bright);
  font-family: var(--ff-sans); font-size: .78rem; font-weight: 700;
}
.ff-comment-form { margin: 0 0 1.8rem; display: flex; flex-direction: column; gap: .7rem; }
.ff-comment-input {
  width: 100%; background: var(--ff-black-2); border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius-sm); color: var(--ff-ink);
  font-family: var(--ff-body); font-size: 1rem; line-height: 1.6;
  padding: .85rem 1rem; resize: vertical; outline: none;
  transition: border-color .2s var(--ff-ease);
}
.ff-comment-input:focus { border-color: var(--ff-gold); }
.ff-comment-form__actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ff-comment-hint { color: var(--ff-muted-2); font-size: .8rem; }
.ff-comment-submit { flex: none; }
.ff-comment-gate {
  padding: 1.2rem 1.3rem; border: 1px dashed var(--ff-line);
  border-radius: var(--ff-radius-sm); background: var(--ff-black-1);
  color: var(--ff-ink-soft); margin-bottom: 1.6rem;
}
.ff-comment-gate p { margin: 0; }
.ff-comment-gate__note { margin-top: .4rem !important; color: var(--ff-muted-2); font-size: .84rem; }
.ff-comment-list { display: flex; flex-direction: column; gap: 1.1rem; }
.ff-comment-empty { color: var(--ff-muted); padding: 1.4rem 0; }
.ff-comment { display: flex; gap: .85rem; }
.ff-comment__avatar { flex: none; width: 40px; height: 40px; border-radius: 999px; object-fit: cover; border: 1px solid var(--ff-line); }
.ff-comment__body { flex: 1; min-width: 0; }
.ff-comment__meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .3rem; }
.ff-comment__name { font-family: var(--ff-sans); font-weight: 600; color: var(--ff-ink); font-size: .92rem; }
.ff-comment__time { color: var(--ff-muted-2); font-size: .74rem; }
.ff-comment__edited { color: var(--ff-muted-2); font-size: .7rem; font-style: italic; }
.ff-comment__text { font-family: var(--ff-body); color: var(--ff-ink-soft); font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.ff-comment__tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.ff-comment-tool {
  display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .7rem;
  border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--ff-muted); font-family: var(--ff-sans); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: color .2s var(--ff-ease), border-color .2s var(--ff-ease), background .2s var(--ff-ease);
}
.ff-comment-tool:hover { color: var(--ff-gold-bright); border-color: rgba(212,175,55,.3); }
.ff-comment-react.active { color: var(--ff-gold-bright); border-color: var(--ff-gold); background: var(--ff-gold-ghost); }
.ff-comment-react i { color: var(--ff-gold); }
.ff-comment-edit, .ff-comment-reply { margin-top: .7rem; display: flex; flex-direction: column; gap: .6rem; }
.ff-comment-edit[hidden], .ff-comment-reply[hidden] { display: none; }
.ff-comment__replies { margin-top: .9rem; padding-left: .9rem; border-left: 2px solid var(--ff-line-soft); display: flex; flex-direction: column; gap: .9rem; }
.ff-comment--reply .ff-comment__avatar { width: 32px; height: 32px; }
@media (max-width: 560px) {
  .ff-comment__avatar { width: 34px; height: 34px; }
  .ff-comment-form__actions { flex-direction: column; align-items: stretch; }
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY / PRINT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ff-blog *, .ff-blog *::before, .ff-blog *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ff-card:hover, .ff-topic:hover, .ff-widget:hover { transform: none; }
}
@media (prefers-contrast: more) { .ff-blog { --ff-muted: #b9b4a8; --ff-muted-2: #a09b91; --ff-line: #3a3a46; } }
@media print {
  .ff-blog { background: #fff; color: #000; }
  .ff-toc, .ff-toc-card, .ff-share, .ff-related, .ff-author, .ff-rail { display: none !important; }
  .ff-prose { font-size: 12pt; }
}


/* ==========================================================================
   v2.18 — Responsive article featured image
   The featured image was rendering at its natural size (huge on mobile and
   bad for SEO/CWV). Constrain it to the content column with a sane cap.
   ========================================================================== */
.ff-figure { margin: 0 0 1.5rem; max-width: 100%; }
.ff-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  object-fit: cover;
  border-radius: 14px;
}
.ff-figure img[data-ff-ratio="16:9"] { aspect-ratio: 16 / 9; object-fit: cover; }
.ff-figure figcaption {
  margin-top: .5rem;
  font-size: .82rem;
  opacity: .65;
  text-align: center;
}
@media (max-width: 640px) {
  .ff-figure img { max-height: 46vh; border-radius: 10px; }
}


/* ==========================================================================
   v2.18 — Responsive article featured image
   The featured image was rendering at its natural size (huge on mobile and
   bad for SEO/CWV). Constrain it to the content column with a sane cap.
   ========================================================================== */
.ff-figure { margin: 0 0 1.5rem; max-width: 100%; }
.ff-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  object-fit: cover;
  border-radius: 14px;
}
.ff-figure img[data-ff-ratio="16:9"] { aspect-ratio: 16 / 9; object-fit: cover; }
.ff-figure figcaption {
  margin-top: .5rem;
  font-size: .82rem;
  opacity: .65;
  text-align: center;
}
@media (max-width: 640px) {
  .ff-figure img { max-height: 46vh; border-radius: 10px; }
}
