/* ==========================================================================
   rs9 — blog.css
   The rs9 Journal: index listing (featured + grid) and the single-article
   layout. Built on the same Obsidian Vault tokens as the rest of the site —
   ruby red, champagne gold, obsidian black. No new colours are introduced.

   Structure
     1.  Thumbnail frame + "image coming soon" placeholder  (shared)
     2.  Blog toolbar — category tabs + search
     3.  Featured article card
     4.  Article grid card  (the repeatable unit for daily posts)
     5.  Empty state + load more
     6.  Newsletter / follow band
     7.  Single article — hero meta, cover, layout, TOC
     8.  Single article — prose body, callouts, tables, key takeaways
     9.  Single article — share row, author box, prev/next, related rail
     10. Reduced motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. [hidden] MUST WIN
   blog.js toggles the `hidden` attribute to filter cards, retire empty
   category tabs, drop the Load-more button and swap in the empty state. The
   UA rule for [hidden] is only `display: none`, so every component below that
   sets its own `display` would otherwise stay on screen while "hidden".
   Listing them here once keeps that from silently regressing.
   -------------------------------------------------------------------------- */
.btabs__btn[hidden],
.bsearch__clear[hidden],
.bgrid[hidden],
.bcard[hidden],
.bmore[hidden],
.bempty[hidden] { display: none; }

/* --------------------------------------------------------------------------
   1. THUMBNAIL FRAME + PLACEHOLDER
   The <img> sits above a permanent placeholder plate. Drop the real file in
   assets/images/blog/ and it covers the plate automatically; until then (or
   if the file 404s, via the inline onerror hook) the plate shows through.
   -------------------------------------------------------------------------- */
.bthumb {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, var(--c-slate), var(--c-onyx) 62%, var(--c-void));
  isolation: isolate;
}

/* Blog artwork is DESIGNED — banners carry a logo, headline and step icons at
   fixed positions, so it must never be cut. `contain` + centred shows the whole
   composition every time; when the file is a true 16:9 (the documented size) it
   fills the frame edge to edge with nothing letterboxed, and an off-ratio file
   is shown whole against the plate rather than chopped. */
.bthumb__img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: filter var(--t-med) var(--ease-out);
}

/* the plate that shows while no artwork is present */
.bthumb__ph {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: var(--s-4);
  text-align: center;
  background-image:
    radial-gradient(90% 120% at 20% 0%, rgba(224, 26, 60, .16), transparent 62%),
    radial-gradient(80% 110% at 100% 100%, rgba(231, 199, 122, .12), transparent 60%),
    linear-gradient(rgba(231, 199, 122, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 199, 122, .05) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
}
.bthumb__ph svg {
  width: clamp(30px, 4vw, 42px);
  height: clamp(30px, 4vw, 42px);
  color: var(--c-gold);
  opacity: .55;
}
.bthumb__ph b {
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-gold);
  opacity: .8;
}
.bthumb__ph span {
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--c-text-faint);
  max-width: 30ch;
  line-height: 1.5;
}

/* Chips carry their own opaque backing, so the veil only needs to be a whisper —
   a heavy scrim was dulling the artwork it sits on. */
.bthumb__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 10, .3) 0%, transparent 26%, transparent 74%, rgba(5, 6, 10, .32) 100%);
}

/* category flag pinned to the artwork */
.bthumb__cat {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(5, 6, 10, .82);
  border: 1px solid var(--a-gold-hair);
  color: var(--c-gold);
  font-family: var(--f-display);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bthumb__cat--ruby {
  background: var(--g-ruby);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(224, 26, 60, .45);
}

/* read-time pill, bottom right of the artwork */
.bthumb__time {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(5, 6, 10, .8);
  border: 1px solid var(--a-white-hair);
  color: var(--c-text-soft);
  font-size: .66rem;
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bthumb__time svg { width: 12px; height: 12px; color: var(--c-gold); }

/* --------------------------------------------------------------------------
   2. BLOG TOOLBAR — category tabs + search
   Mirrors the games toolbar so the two archives feel like one system.
   -------------------------------------------------------------------------- */
.btoolbar {
  position: sticky;
  top: var(--nav-h-shrunk);
  z-index: var(--z-sticky);
  padding-block: var(--s-4);
  margin-bottom: clamp(24px, 3vw, 40px);
  background: rgba(7, 8, 13, .9);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--a-gold-hair);
}

.btabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.btabs::-webkit-scrollbar { display: none; }

.btabs__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 10px 17px;
  border-radius: var(--r-pill);
  border: 1px solid var(--a-white-hair);
  background: rgba(13, 15, 22, .8);
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: .03em;
  color: var(--c-text-muted);
  white-space: nowrap;
  transition: color var(--t-med) var(--ease-out),
              background var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}
.btabs__btn em {
  font-style: normal;
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(246, 242, 234, .07);
  color: var(--c-text-faint);
  transition: all var(--t-med) var(--ease-out);
}
.btabs__btn:hover { color: var(--c-text); border-color: var(--a-gold-hair); }
.btabs__btn[aria-selected='true'] {
  color: var(--c-text-on-ruby);
  background: var(--g-ruby);
  border-color: transparent;
  box-shadow: var(--glow-ruby-sm);
}
.btabs__btn[aria-selected='true'] em { background: rgba(0, 0, 0, .3); color: #fff; }

.bfilters {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-4);
}
@media (min-width: 768px) {
  .bfilters { grid-template-columns: 1fr auto; align-items: center; }
}

.bsearch { position: relative; display: flex; align-items: center; }
.bsearch__icon {
  position: absolute;
  left: 15px;
  width: 17px;
  height: 17px;
  color: var(--c-text-faint);
  pointer-events: none;
}
.bsearch input {
  width: 100%;
  padding: 13px 42px 13px 44px;
  border-radius: var(--r-pill);
  background: rgba(5, 6, 10, .8);
  border: 1px solid var(--a-white-hair);
  color: var(--c-text);
  font-size: var(--fs-sm);
  transition: border-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.bsearch input::placeholder { color: var(--c-text-faint); }
.bsearch input:focus {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(231, 199, 122, .16), var(--glow-gold-sm);
}
.bsearch__clear {
  position: absolute;
  right: 13px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(246, 242, 234, .1);
  color: var(--c-text-muted);
  transition: all var(--t-fast) var(--ease-out);
}
.bsearch__clear:hover { background: var(--c-ruby); color: #fff; }
.bsearch__clear svg { width: 12px; height: 12px; }

.bcount { font-size: var(--fs-xs); color: var(--c-text-faint); white-space: nowrap; }

/* --------------------------------------------------------------------------
   3. FEATURED ARTICLE
   -------------------------------------------------------------------------- */
/* Stacked hero: the banner runs the full width of the card at its native 16:9,
   with the copy beneath it. The previous side-by-side version stretched the
   media column to match the text height, which cut roughly a third off each
   side of the artwork. */
.bfeature {
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--g-panel);
  border: 1px solid var(--a-gold-hair);
  box-shadow: var(--sh-md);
  transition: border-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.bfeature:hover { border-color: var(--a-gold-line); box-shadow: var(--sh-lg), var(--glow-gold-sm); }
.bfeature:hover .bthumb__img { filter: saturate(1.06) brightness(1.03); }

.bfeature__media {
  position: relative;
  border-bottom: 1px solid var(--a-gold-hair);
}
.bfeature__media .bthumb { aspect-ratio: 16 / 9; }

.bfeature__body {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 40px);
}
.bfeature__flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  margin-bottom: var(--s-4);
  border-radius: var(--r-pill);
  background: var(--a-ruby-wash);
  border: 1px solid var(--a-ruby-hair);
  color: var(--c-ruby-bright);
  font-family: var(--f-display);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.bfeature__flag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-ruby-bright);
  box-shadow: 0 0 0 3px var(--a-ruby-wash);
  animation: blip 1.8s var(--ease-in-out) infinite;
}
.bfeature__title {
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.14;
}
.bfeature__title a { color: var(--c-text); }
.bfeature__title a:hover { color: var(--c-gold-bright); }
.bfeature__excerpt {
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.78;
}
.bfeature__points {
  display: grid;
  gap: 9px;
  margin-top: var(--s-5);
}
.bfeature__points li {
  display: flex;
  gap: 10px;
  font-size: var(--fs-xs);
  color: var(--c-text-soft);
  line-height: 1.6;
}
.bfeature__points li::before {
  content: '';
  flex: none;
  margin-top: .45em;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--g-gold);
  box-shadow: 0 0 10px rgba(231, 199, 122, .5);
}
.bfeature .bmeta { margin-top: var(--s-5); }
.bfeature .btn-row { margin-top: var(--s-5); }

/* Below the banner the copy is a reading column, not a full-bleed block — long
   lines across 1240px would be uncomfortable. Points sit beside the summary on
   wide screens so the card stays compact. */
@media (min-width: 900px) {
  .bfeature__body { padding: clamp(30px, 3.2vw, 46px); }
  .bfeature__split {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: clamp(24px, 3vw, 46px);
    align-items: start;
  }
  .bfeature__split > * { min-width: 0; }
  .bfeature__excerpt { margin-top: 0; }
  .bfeature__points { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   4. ARTICLE GRID CARD — the repeatable unit for every future post
   -------------------------------------------------------------------------- */
.bgrid {
  display: grid;
  gap: clamp(18px, 2.2vw, 28px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Early-archive state: with only one or two posts published, centre them instead
   of leaving empty tracks in the 3-up row. Self-corrects from the third post on;
   browsers without :has() simply keep the standard grid. */
@media (min-width: 640px) {
  .bgrid:has(> .bcard:only-child) {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
  }
}
@media (min-width: 1100px) {
  .bgrid:has(> .bcard:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 460px));
    justify-content: center;
  }
}

.bcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--g-panel);
  border: 1px solid var(--a-white-hair);
  transition: transform var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
  animation: fadeUp 480ms var(--ease-out) both;
}
.bcard:hover {
  transform: translateY(-6px);
  border-color: var(--a-gold-line);
  box-shadow: var(--sh-md), var(--glow-gold-sm);
}
/* lift the artwork rather than scaling it — a zoom would push a contained
   banner past its frame and clip the very edges we are protecting */
.bcard:hover .bthumb__img { filter: saturate(1.08) brightness(1.05); }
.bcard > .bthumb { border-bottom: 1px solid var(--a-white-hair); }

.bcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(18px, 2.2vw, 26px);
}

.bcard__title {
  font-family: var(--f-display);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.28;
}
.bcard__title a {
  color: var(--c-text);
  transition: color var(--t-fast) var(--ease-out);
}
.bcard__title a:hover { color: var(--c-gold-bright); }
/* the whole card is clickable, but the Read Now button stays the visible CTA */
.bcard__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
}

.bcard__excerpt {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: auto;
  padding-top: var(--s-5);
}
/* The Read Now chip is a <span>, not a nested <a> — it renders above the card's
   click overlay but lets the click fall through to it, so the whole card and the
   button both open the article. */
.bcard__foot .btn { position: relative; z-index: 6; pointer-events: none; }

/* shared meta row — date · author · read time */
.bmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
}
.bmeta > * { display: inline-flex; align-items: center; gap: 6px; }
.bmeta svg { width: 13px; height: 13px; color: var(--c-gold); flex: none; }
.bmeta__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--c-text-faint); opacity: .6; }
/* category label for cards whose artwork carries no overlaid chip */
.bmeta__cat {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--a-ruby-wash);
  border: 1px solid var(--a-ruby-hair);
  color: var(--c-ruby-bright);
  font-family: var(--f-display);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* "Read Now" — the primary action on every card */
.btn--read {
  --btn-py: 11px;
  --btn-px: 20px;
  background: var(--g-ruby);
  color: var(--c-text-on-ruby);
  font-size: var(--fs-xs);
  box-shadow: var(--glow-ruby-sm);
}
.btn--read:hover { color: #fff; box-shadow: var(--glow-ruby-lg); }
.btn--read svg { width: 15px; height: 15px; transition: transform var(--t-med) var(--ease-spring); }
.btn--read:hover svg { transform: translateX(4px); }
/* inside a card the chip ignores pointer events, so drive its states from the card */
.bcard:hover .btn--read { color: #fff; box-shadow: var(--glow-ruby-lg); }
.bcard:hover .btn--read svg { transform: translateX(4px); }
.bcard:hover .btn--read::after { transform: translateX(120%); }

/* --------------------------------------------------------------------------
   5. EMPTY STATE + LOAD MORE
   -------------------------------------------------------------------------- */
.bempty {
  padding: clamp(40px, 6vw, 80px) var(--s-5);
  text-align: center;
  border: 1px dashed var(--a-gold-hair);
  border-radius: var(--r-lg);
  background: rgba(13, 15, 22, .6);
}
.bempty svg { width: 46px; height: 46px; color: var(--c-text-faint); margin-inline: auto; }
.bempty h3 { margin-top: var(--s-4); font-size: var(--fs-h3); }
.bempty p { margin-top: var(--s-3); color: var(--c-text-muted); font-size: var(--fs-sm); }

.bmore { display: flex; justify-content: center; margin-top: clamp(28px, 3.4vw, 46px); }

/* --------------------------------------------------------------------------
   6. FOLLOW / NEWSLETTER BAND
   -------------------------------------------------------------------------- */
.bfollow {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(26px, 3.6vw, 48px);
  border-radius: var(--r-xl);
  border: 1px solid var(--a-gold-hair);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(224, 26, 60, .2), transparent 58%),
    radial-gradient(80% 120% at 0% 100%, rgba(231, 199, 122, .12), transparent 55%),
    linear-gradient(150deg, rgba(29, 33, 44, .92), rgba(7, 8, 13, .96));
}
@media (min-width: 900px) { .bfollow { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.bfollow__note { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--c-text-faint); }
.bfollow .btn-row { margin-top: var(--s-5); }

/* publishing-cadence strip */
.bcadence {
  display: grid;
  gap: 1px;
  margin-top: clamp(26px, 3vw, 40px);
  background: var(--a-white-hair);
  border: 1px solid var(--a-gold-hair);
  border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 900px) { .bcadence { grid-template-columns: repeat(4, 1fr); } }
.bcadence__cell {
  padding: clamp(18px, 2.2vw, 28px) clamp(14px, 2vw, 22px);
  background: rgba(13, 15, 22, .94);
  transition: background-color var(--t-med) var(--ease-out);
}
.bcadence__cell:hover { background: rgba(29, 33, 44, .94); }
.bcadence__cell b {
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.bcadence__cell p { margin-top: 9px; font-size: var(--fs-xs); color: var(--c-text-muted); line-height: 1.66; }

/* --------------------------------------------------------------------------
   7. SINGLE ARTICLE — hero meta, cover, layout, TOC
   -------------------------------------------------------------------------- */
.ahero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--a-white-hair);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.ahero__meta > span { display: inline-flex; align-items: center; gap: 8px; }
.ahero__meta svg { width: 15px; height: 15px; color: var(--c-gold); flex: none; }
.ahero__meta b { color: var(--c-text-soft); font-weight: 600; }

.ahero__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.aavatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--g-gold);
  color: var(--c-text-on-gold);
  font-family: var(--f-display);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: var(--glow-gold-sm);
}

/* full-width cover plate under the article hero */
.acover {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--a-gold-hair);
  box-shadow: var(--sh-md);
}
/* 16:9 at every width — matching the documented artwork ratio, so the cover is
   the whole banner rather than a letterbox slice of it. */
.acover .bthumb { aspect-ratio: 16 / 9; }
.acover figcaption {
  padding: 12px 16px;
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  background: rgba(5, 6, 10, .6);
  border-top: 1px solid var(--a-white-hair);
  line-height: 1.6;
}

/* two-column article shell — sticky TOC beside the body */
.alayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 4vw, 56px);
  align-items: start;
}
.alayout > * { min-width: 0; }
@media (min-width: 1024px) {
  .alayout { grid-template-columns: 272px minmax(0, 1fr); gap: clamp(36px, 4vw, 68px); }
}

.atoc {
  position: relative;
  padding: clamp(20px, 2.4vw, 26px);
  border-radius: var(--r-lg);
  background: rgba(13, 15, 22, .82);
  border: 1px solid var(--a-gold-hair);
}
@media (min-width: 1024px) {
  .atoc {
    position: sticky;
    top: calc(var(--nav-h-shrunk) + 22px);
    max-height: calc(100vh - var(--nav-h-shrunk) - 46px);
    overflow-y: auto;
  }
}
.atoc__title {
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-gold);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--a-white-hair);
}
.atoc__list { display: grid; gap: 2px; counter-reset: atoc; }
.atoc__list a {
  position: relative;
  display: block;
  padding: 9px 12px 9px 32px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--c-text-muted);
  counter-increment: atoc;
  transition: color var(--t-fast) var(--ease-out),
              background-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.atoc__list a::before {
  content: counter(atoc, decimal-leading-zero);
  position: absolute;
  left: 9px;
  top: 9px;
  font-family: var(--f-display);
  font-size: .64rem;
  color: var(--c-text-faint);
}
.atoc__list a:hover { color: var(--c-text); background: rgba(231, 199, 122, .06); }
.atoc__list a.is-active {
  color: var(--c-gold);
  background: rgba(231, 199, 122, .1);
  box-shadow: inset 2px 0 0 var(--c-gold);
}
.atoc__list a.is-active::before { color: var(--c-gold); }

.atoc__foot {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--a-white-hair);
}
.atoc__foot p { font-size: .68rem; color: var(--c-text-faint); line-height: 1.6; margin-bottom: var(--s-3); }

/* thin reading-progress rail under the navbar */
.aprogress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: calc(var(--z-nav) + 1);
  background: transparent;
  pointer-events: none;
}
.aprogress__bar {
  height: 100%;
  width: 0;
  background: var(--g-gold);
  box-shadow: 0 0 14px rgba(231, 199, 122, .6);
  transform-origin: left;
  transition: width 90ms linear;
}

/* --------------------------------------------------------------------------
   8. SINGLE ARTICLE — prose body
   -------------------------------------------------------------------------- */
.apost { max-width: 78ch; }

.apost__lead {
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--r-lg);
  background: rgba(224, 26, 60, .05);
  border: 1px solid var(--a-ruby-hair);
  font-size: var(--fs-lead);
  color: var(--c-text-soft);
  line-height: 1.76;
}
.apost__lead p + p { margin-top: var(--s-3); }

/* key takeaways box — sits directly under the lead on every article */
.atakeaway {
  margin-top: clamp(24px, 3vw, 34px);
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--r-lg);
  background: rgba(231, 199, 122, .06);
  border: 1px solid var(--a-gold-hair);
}
.atakeaway h2 {
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-gold);
  display: flex;
  align-items: center;
  gap: 9px;
}
.atakeaway h2 svg { width: 16px; height: 16px; }
.atakeaway ul { display: grid; gap: 11px; margin-top: var(--s-4); }
.atakeaway li {
  position: relative;
  padding-left: 26px;
  font-size: var(--fs-sm);
  color: var(--c-text-soft);
  line-height: 1.74;
}
.atakeaway li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: .72em;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--g-gold);
  box-shadow: 0 0 10px rgba(231, 199, 122, .5);
}
.atakeaway strong { color: var(--c-text); font-weight: 650; }

/* numbered content section — one per TOC entry */
.asec {
  padding-top: clamp(32px, 3.6vw, 50px);
  scroll-margin-top: calc(var(--nav-h) + 26px);
}
.asec + .asec {
  border-top: 1px solid var(--a-white-hair);
  margin-top: clamp(32px, 3.6vw, 50px);
}
.asec__num {
  display: inline-block;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}
.asec h2 { font-size: var(--fs-h2); }
.asec h3 { font-size: var(--fs-h3); margin-top: var(--s-7); color: var(--c-gold-bright); }
.asec h4 { font-size: var(--fs-h4); margin-top: var(--s-6); }
.asec p { margin-top: var(--s-4); color: var(--c-text-soft); line-height: 1.82; }
.asec ul, .asec ol { margin-top: var(--s-4); }
.asec li {
  position: relative;
  padding-left: 26px;
  margin-top: 11px;
  color: var(--c-text-muted);
  line-height: 1.78;
}
.asec ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: .8em;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--c-gold);
}
.asec ol { counter-reset: as; }
.asec ol li { counter-increment: as; }
.asec ol li::before {
  content: counter(as) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-gold);
}
.asec strong { color: var(--c-text); font-weight: 650; }
.asec a { text-decoration: underline; text-underline-offset: 3px; }
.asec figure { margin-top: var(--s-5); }
.asec figure figcaption {
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  line-height: 1.6;
}

/* inline image plate inside the body — same placeholder behaviour */
.afigure {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--a-white-hair);
}

/* pull quote */
.aquote {
  margin-top: var(--s-6);
  padding: clamp(20px, 2.6vw, 30px) clamp(20px, 2.6vw, 32px);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-gold);
  background: linear-gradient(100deg, rgba(231, 199, 122, .08), transparent 70%);
}
.aquote p {
  margin-top: 0;
  font-family: var(--f-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.5;
  color: var(--c-text);
}
.aquote cite {
  display: block;
  margin-top: var(--s-3);
  font-style: normal;
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-gold);
}

/* callouts — reused from the legal pages so the tone matches */
.acallout {
  margin-top: var(--s-5);
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: var(--r-md);
  background: rgba(231, 199, 122, .06);
  border-left: 3px solid var(--c-gold);
}
.acallout p { margin-top: 0; font-size: var(--fs-sm); }
.acallout p + p { margin-top: var(--s-3); }
.acallout ul { margin-top: var(--s-3); }
.acallout li { font-size: var(--fs-sm); }
.acallout--warn { background: rgba(224, 26, 60, .07); border-left-color: var(--c-ruby); }
.acallout--tip { background: rgba(47, 182, 239, .07); border-left-color: #2FB6EF; }
.acallout__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}
.acallout__label svg { width: 15px; height: 15px; }
.acallout--warn .acallout__label { color: var(--c-ruby-bright); }
.acallout--tip .acallout__label { color: #6FD0F7; }
.acallout--tip .acallout__label svg,
.acallout--warn .acallout__label svg { color: inherit; }

/* data tables */
.atable-scroll {
  overflow-x: auto;
  margin-top: var(--s-5);
  border-radius: var(--r-md);
  border: 1px solid var(--a-gold-hair);
}
.atable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
.atable th, .atable td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--a-white-hair);
  vertical-align: top;
}
.atable thead th {
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-gold);
  background: rgba(5, 6, 10, .6);
  white-space: nowrap;
}
.atable td { color: var(--c-text-muted); line-height: 1.7; }
.atable td strong { color: var(--c-text-soft); }
.atable tbody tr:last-child td { border-bottom: 0; }
.atable tbody tr:hover td { background: rgba(231, 199, 122, .04); }

/* numbered step blocks */
.asteps { display: grid; gap: var(--s-4); margin-top: var(--s-5); counter-reset: ast; }
.astep {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--s-4);
  padding: clamp(16px, 2vw, 22px);
  border-radius: var(--r-md);
  background: rgba(13, 15, 22, .78);
  border: 1px solid var(--a-white-hair);
  counter-increment: ast;
  transition: border-color var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.astep:hover { border-color: var(--a-gold-line); transform: translateX(3px); }
.astep::before {
  content: counter(ast, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(231, 199, 122, .18), rgba(224, 26, 60, .12));
  border: 1px solid var(--a-gold-hair);
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--c-gold);
}
.astep h4 { font-size: var(--fs-h4); margin-top: 0; }
.astep p { margin-top: 8px; font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.72; }

/* mid-article conversion band */
.ainline-cta {
  margin-top: clamp(28px, 3.4vw, 44px);
  padding: clamp(22px, 2.8vw, 34px);
  border-radius: var(--r-lg);
  border: 1px solid var(--a-gold-hair);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(224, 26, 60, .22), transparent 58%),
    linear-gradient(150deg, rgba(29, 33, 44, .92), rgba(7, 8, 13, .96));
  text-align: center;
}
.ainline-cta h3 { font-size: var(--fs-h3); }
.ainline-cta p { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--c-text-muted); }
.ainline-cta .btn-row { margin-top: var(--s-5); justify-content: center; }
.ainline-cta small { display: block; margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--c-text-faint); }

/* FAQ inside an article reuses the global .acc component */
.asec .acc { margin-top: var(--s-5); }

/* --------------------------------------------------------------------------
   9. SHARE ROW, AUTHOR BOX, PREV/NEXT, RELATED
   -------------------------------------------------------------------------- */
.ashare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: clamp(32px, 4vw, 50px);
  padding-top: clamp(24px, 3vw, 34px);
  border-top: 1px solid var(--a-white-hair);
}
.ashare__label {
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-right: auto;
}
.ashare__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: rgba(13, 15, 22, .8);
  border: 1px solid var(--a-white-hair);
  color: var(--c-text-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: all var(--t-med) var(--ease-out);
}
.ashare__btn:hover {
  color: var(--c-gold-bright);
  border-color: var(--a-gold-line);
  transform: translateY(-2px);
}
.ashare__btn svg { width: 15px; height: 15px; flex: none; }

.atags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.atag {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: rgba(246, 242, 234, .05);
  border: 1px solid var(--a-white-hair);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  transition: all var(--t-fast) var(--ease-out);
}
.atag:hover { color: var(--c-gold); border-color: var(--a-gold-hair); }

.aauthor {
  display: grid;
  gap: var(--s-4);
  margin-top: clamp(30px, 3.6vw, 44px);
  padding: clamp(22px, 2.8vw, 32px);
  border-radius: var(--r-lg);
  background: var(--g-panel);
  border: 1px solid var(--a-gold-hair);
}
@media (min-width: 640px) { .aauthor { grid-template-columns: 62px minmax(0, 1fr); align-items: start; } }
.aauthor__mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--g-gold);
  color: var(--c-text-on-gold);
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: var(--glow-gold-sm);
}
.aauthor__name { font-family: var(--f-display); font-size: var(--fs-h4); font-weight: 700; }
.aauthor__role {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.aauthor__text { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.76; }

/* previous / next article */
.apager {
  display: grid;
  gap: var(--s-4);
  margin-top: clamp(30px, 3.6vw, 44px);
}
@media (min-width: 768px) { .apager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.apager__link {
  display: block;
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: var(--r-md);
  background: rgba(13, 15, 22, .8);
  border: 1px solid var(--a-white-hair);
  transition: all var(--t-med) var(--ease-out);
}
.apager__link:hover { border-color: var(--a-gold-line); transform: translateY(-3px); box-shadow: var(--sh-sm); }
.apager__dir {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.apager__dir svg { width: 14px; height: 14px; }
.apager__t {
  display: block;
  margin-top: 10px;
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--c-text);
  line-height: 1.45;
}
.apager__link:hover .apager__t { color: var(--c-gold-bright); }
.apager__link--next { text-align: right; }
.apager__link--next .apager__dir { justify-content: flex-end; }
.apager__link--disabled { opacity: .4; pointer-events: none; }

/* --------------------------------------------------------------------------
   10. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bcard,
  .bfeature__flag::before { animation: none !important; }
  .bcard:hover,
  .astep:hover,
  .apager__link:hover,
  .ashare__btn:hover { transform: none; }
  .aprogress__bar { transition: none; }
}
