/* ================================================================
   BRYME ARTICLES — section stylesheet
   ----------------------------------------------------------------
   Loaded only by /writers/articles/ pages (landing, beat, story).
   Everything is namespaced .ba- so it cannot collide with the desk
   design system in bryme-v2.css, and everything is built on the same
   tokens, so light/dark and the brass-and-ink palette come for free.

   Performance notes, since these pages carry ads:
   * no web fonts, no animation beyond one 220ms fade on the invite;
   * every image slot has intrinsic width/height or an aspect-ratio,
     so nothing reflows while covers load (no CLS);
   * the invite is position:fixed from the start — it can never shift
     the page it appears over;
   * the ad band is placed by the layout, not by the injector: it sits
     after the lead story on the landing page and mid-story in a piece,
     never above the headline. See ad_slot() in build-articles.py.

   Rewritten 2026-11-23 ("fresh look" pass): the front page now reads
   as a newspaper front — masthead, one lead, a shelf, the beats — with
   the copy that used to repeat itself removed. The section's own
   chrome (bands, rules, labels) is defined here rather than borrowed
   from .section-head/.eyebrow, because those carry the guide pages'
   spacing and made a four-story section look like an empty shelf.
   ================================================================ */

/* ---------------- the section's own type scale ---------------- */
.ba-mast,
.ba-lead,
.section.ba-shelf,
.section.ba-cats,
.section.ba-mostread,
.section.ba-standards {
  /* One vertical rhythm for the whole section. The house .section padding
     (44-84px) is tuned for reference pages with a dozen blocks; stacked five
     deep on a front page it read as emptiness.
     The .section qualifier is load-bearing: this sheet is linked before
     bryme-v2.css in <head>, so at equal specificity the house rule wins and
     the section goes back to 84px top and bottom. */
  padding: clamp(28px, 4.4vw, 54px) 0;
}

.ba-band-label {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin: 0 0 14px; padding-top: 10px; border-top: 1px solid var(--line-strong);
  font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
}
.ba-band-label > span:first-child { color: var(--brass); }
.ba-band-count { margin-left: auto; color: var(--dim); letter-spacing: .1em; font-weight: 700; }
.ba-band-link { margin-left: auto; color: var(--navy); letter-spacing: .06em; text-transform: none; font-size: 12px; }
.ba-band-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.ba-section-title {
  margin: 0 0 clamp(18px, 2.6vw, 26px); font-family: var(--serif);
  font-weight: 700; font-size: clamp(23px, 3.2vw, 31px); line-height: 1.16;
  letter-spacing: -.01em; color: var(--ink); max-width: 40ch;
}

/* ---------------- masthead ---------------- */
.ba-mast { padding-top: clamp(18px, 3vw, 34px); padding-bottom: clamp(20px, 3.4vw, 36px); }
.ba-mast-kicker {
  margin: 0 0 10px; font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase; color: var(--brass);
}
.ba-mast-title {
  margin: 0; font-family: var(--serif); font-weight: 700;
  font-size: clamp(34px, 6.4vw, 62px); line-height: .98; letter-spacing: -.022em;
  color: var(--ink);
}
.ba-mast-cols {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px); align-items: start;
  margin-top: clamp(14px, 2.2vw, 20px); padding-top: clamp(14px, 2.2vw, 20px);
  border-top: 1px solid var(--line);
}
.ba-mast-dek {
  margin: 0; font-family: var(--serif); font-size: clamp(17px, 2vw, 20px);
  line-height: 1.58; color: var(--muted); max-width: 58ch;
}
.ba-mast-side { display: flex; flex-direction: column; gap: 12px; }
.ba-mast-facts {
  margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .04em; color: var(--dim);
}
.ba-mast-facts b { color: var(--ink); font-weight: 800; }

/* beat chips: the live beats, one line, pressable */
.ba-beats { display: flex; flex-wrap: wrap; gap: 6px; }
.ba-beat-chip {
  display: inline-block; padding: 6px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: transparent;
  font-family: var(--sans); font-size: 11.5px; font-weight: 750;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.ba-beat-chip:hover { border-color: var(--brass); color: var(--navy); }
.ba-beat-chip.is-all { background: var(--navy); border-color: var(--navy); color: var(--sheet); }
.ba-beat-chip.is-all:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--sheet); }

/* ---------------- the lead story ---------------- */
.ba-lead { padding-top: clamp(18px, 2.6vw, 28px); }
.ba-lead-card {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px); align-items: start;
}
.ba-lead-media {
  display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 9; background: var(--paper-2);
}
.ba-lead-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-lead-media:hover img { transform: scale(1.01); }
.ba-lead-body { min-width: 0; }
.ba-lead-cat {
  margin: 0 0 8px; font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.ba-lead-title {
  margin: 0 0 12px; font-family: var(--serif); font-weight: 700;
  font-size: clamp(26px, 3.5vw, 39px); line-height: 1.08; letter-spacing: -.018em;
  text-wrap: balance;
}
.ba-lead-title a { color: var(--ink); }
.ba-lead-title a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ba-lead-dek {
  margin: 0 0 14px; font-family: var(--serif); font-size: 17.5px;
  line-height: 1.62; color: var(--muted);
}
.ba-lead-cta { margin: 18px 0 0; }
.ba-link-cta {
  display: inline-block; padding-bottom: 3px; border-bottom: 2px solid var(--brass);
  font-family: var(--sans); font-size: 12.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.ba-link-cta:hover { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------------- the ad band, placed by the layout ----------------
   The injector writes its own inline styles for the band; these rules
   only govern where it sits, so a creative arriving can never touch
   the masthead above it and never breaks the section's rhythm. */
/* No margin on the wrapper: the band hides itself when unfilled, and a
   wrapper that still carried margins would leave a hole in the page for every
   reader with an ad blocker. The band's own margin only exists while it does. */
.ba-adslot { margin: 0; }
.ba-adslot .adband-native { margin: clamp(20px, 3vw, 34px) 0; padding: 0; }
.ba-adslot .adband-native::before { display: none; }
.ba-adslot .adband-in { max-width: none; padding: 0; }
.ba-adslot .adband-label {
  color: var(--dim) !important;
  font-family: var(--sans) !important;
}
.ba-body .ba-adslot { margin: 30px 0; }

/* ---------------- empty state (no live story) ---------------- */
.ba-empty-card {
  max-width: 74ch; padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--brass);
  border-radius: var(--radius); background: var(--sheet);
}
.ba-empty-card h2 { margin: 6px 0 14px; font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px); line-height: 1.16; }
.ba-empty-card p { margin: 0 0 14px; font-family: var(--serif); font-size: 17px; line-height: 1.72; color: var(--muted); max-width: 66ch; }
.ba-empty-card .actions { margin-top: 20px; }

/* ---------------- beats (the coverage map) ---------------- */
.ba-beat-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
}
.ba-beat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 16px 18px; background: var(--paper);
}
.ba-beat-name { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.25; }
.ba-beat-name a { color: var(--ink); }
.ba-beat-name a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.ba-beat-note {
  margin: 0; font-family: var(--sans); font-size: 10px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.ba-beat.is-live .ba-beat-note { color: var(--brass); }
.ba-beat-blurb { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.ba-beat.is-soon .ba-beat-name { color: var(--dim); }

/* ---------------- article cards ---------------- */
.ba-grid {
  display: grid; gap: clamp(20px, 3vw, 30px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
}
.ba-card {
  display: flex; flex-direction: column; min-width: 0;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.ba-card-media {
  display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 9; background: var(--paper-2); border: 1px solid var(--line);
}
.ba-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.ba-card-media:hover img { transform: scale(1.02); }
.ba-card-cat {
  margin: 12px 0 0; font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.ba-card-cat a { color: inherit; }
.ba-card-title { margin: 6px 0 8px; font-family: var(--serif); font-size: 21px; line-height: 1.24; font-weight: 700; }
.ba-card-title a { color: var(--ink); }
.ba-card-title a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.ba-card-excerpt { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.ba-meta {
  margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-family: var(--sans); font-size: 12px; letter-spacing: .04em; color: var(--dim);
}
.ba-meta time { color: inherit; }
.ba-card .ba-meta { margin-top: auto; }

/* ---------------- most read (numbered rail) ---------------- */
.ba-rank { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ba-rank li { border-bottom: 1px solid var(--line); }
.ba-rank-row {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 6px 14px; align-items: baseline; padding: 14px 2px; color: var(--ink);
}
.ba-rank-row:hover { background: var(--paper-2); }
.ba-rank-n {
  font-family: var(--sans); font-size: 12px; font-weight: 800;
  letter-spacing: .08em; color: var(--brass);
}
.ba-rank-title { font-family: var(--serif); font-size: 18px; line-height: 1.3; font-weight: 700; }
.ba-rank-row:hover .ba-rank-title { text-decoration: underline; text-underline-offset: 3px; }
.ba-rank-meta { font-family: var(--sans); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }

/* ---------------- story page ---------------- */
.ba-article { display: block; }
.ba-article-head,
.ba-body,
.ba-sources,
.ba-article-foot { max-width: 44rem; margin-left: auto; margin-right: auto; }

.ba-article-head { padding: clamp(14px, 2.6vw, 26px) 0 0; }
.ba-article-kicker {
  margin: 0 0 10px; font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.ba-article-head h1 {
  margin: 0 0 14px; font-family: var(--serif); font-weight: 700;
  font-size: clamp(31px, 5.4vw, 54px); line-height: 1.05; letter-spacing: -.018em;
  text-wrap: balance;
}
.ba-dek { margin: 0 0 16px; font-family: var(--serif); font-size: clamp(18px, 2.3vw, 21px); line-height: 1.55; color: var(--muted); }
.ba-byline {
  margin: 0 0 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 4px 9px;
  font-family: var(--sans); font-size: 12.5px; color: var(--dim);
}
.ba-byline a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* The cover leaves the text column on purpose: at 46rem a 16:9 cover is a
   thumbnail, and the picture is part of the argument in these pieces. */
.ba-cover {
  max-width: min(100%, 66rem); margin: clamp(18px, 3vw, 30px) auto clamp(24px, 3.6vw, 38px);
}
.ba-cover img {
  width: 100%; height: auto; display: block; border-radius: var(--radius);
  aspect-ratio: 16 / 9; max-height: 560px; object-fit: cover; background: var(--paper-2);
}
.ba-cover figcaption {
  margin-top: 9px; font-family: var(--sans); font-size: 12px; line-height: 1.5; color: var(--dim);
  max-width: 44rem;
}
.ba-cover .ba-credit { display: block; }

/* body: same .prose base, tightened for long-form reading.
   The story carries prose prose-essay because that is the house long-form
   voice - but .prose-essay > * also rules a hairline under EVERY direct child
   and pads it 26px, which on a reported story drew a line under all 90-odd
   paragraphs and read as a form, not a piece. Two rules turn the essay
   furniture off here and leave the section's own spacing in charge. */
.ba-body.prose.prose-essay > * { border-bottom: 0; padding-bottom: 0; }
.ba-body.prose.prose-essay { max-width: 44rem; }
.ba-body { font-size: 18px; }
.ba-body.prose p { font-family: var(--serif); font-size: 18.5px; line-height: 1.78; color: var(--ink); margin: 0 0 20px; }
.ba-body.prose > p:first-of-type::first-letter {
  float: left; font-size: 3.4em; line-height: .84; padding: 4px 8px 0 0; font-weight: 700; color: var(--navy);
}
.ba-body.prose h2 { margin: 40px 0 12px; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; }
.ba-body.prose h3 { margin: 28px 0 10px; font-size: 20px; line-height: 1.3; }
.ba-body.prose ul, .ba-body.prose ol { margin: 0 0 20px; padding-left: 24px; }
.ba-body.prose li { font-family: var(--serif); font-size: 18px; line-height: 1.7; margin-bottom: 8px; }
.ba-body.prose a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ba-body.prose a:hover { color: var(--brass); }
/* The house styles an <hr> inside .prose as a 72px lime bar. That is the right
   mark between the sections of a guide; inside a reported story it fired three
   times in one screen and read as a stray block. The story keeps a hairline.
   The extra .prose qualifier is what beats `.prose hr` - same specificity is
   not enough because the two stylesheets can load in either order. */
.prose hr.ba-rule,
.ba-rule {
  margin: 34px 0; padding: 0; border: 0; height: 1px; width: auto;
  background: var(--line); border-radius: 0; overflow: visible;
}

.ba-figure { margin: 30px 0; }
.ba-figure img,
.ba-body.prose img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 0; padding: 0; background: var(--paper-2); aspect-ratio: 16 / 9; object-fit: cover; }
.ba-figure figcaption { margin-top: 8px; font-family: var(--sans); font-size: 12px; line-height: 1.5; color: var(--dim); }

.ba-pullquote {
  margin: 34px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--brass);
}
.ba-pullquote p {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-size: clamp(21px, 3vw, 26px); line-height: 1.42; color: var(--ink);
}

/* sources */
.ba-sources { margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.ba-sources h2 {
  margin: 0 0 14px; font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.ba-sources ol { margin: 0; padding-left: 18px; }
.ba-sources li { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin-bottom: 9px; break-inside: avoid; }
.ba-sources li span { color: var(--dim); }
.ba-sources li span::before { content: "\00b7"; margin: 0 6px; }

.ba-article-foot {
  margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: 13px; color: var(--dim);
}
.ba-article-foot p { margin: 0 0 8px; }
.ba-article-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ba-updated { color: var(--dim); font-style: italic; }

/* ---------------- related reading ---------------- */
.ba-discover {
  margin-top: clamp(36px, 5vw, 58px); padding-top: clamp(24px, 3.4vw, 36px);
  border-top: 3px double var(--line-strong);
}
.ba-discover .section-head { display: block; margin-bottom: 22px; }
.ba-backlink { margin: 28px 0 0; font-size: 13.5px; }
.ba-backlink a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* the small reusable recommendation unit */
.ba-reco {
  margin: 30px 0; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper-2);
}
.ba-reco-head {
  margin: 0 0 10px; font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.ba-reco-link { display: flex; gap: 14px; align-items: center; color: var(--ink); }
.ba-reco-link img {
  width: 96px; height: 54px; flex: none; object-fit: cover;
  border-radius: 3px; background: var(--paper); border: 1px solid var(--line);
}
.ba-reco-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ba-reco-text b { font-family: var(--serif); font-size: 17px; line-height: 1.25; font-weight: 700; }
.ba-reco-text span { font-size: 12px; color: var(--dim); }
.ba-reco-link:hover .ba-reco-text b { text-decoration: underline; text-underline-offset: 3px; }
.ba-recostrip .ba-reco { max-width: 40rem; margin-left: auto; margin-right: auto; }

/* ---------------- beat chips on a beat page ---------------- */
.ba-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ba-cat-chip {
  display: inline-block; padding: 7px 12px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-family: var(--sans); font-size: 12.5px; color: var(--ink); background: var(--sheet);
}
.ba-cat-chip:hover { border-color: var(--brass); color: var(--navy); }

/* ---------------- editorial standards ---------------- */
.ba-standards-grid { display: grid; gap: 22px clamp(20px, 3vw, 34px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.ba-standards-grid h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 17px; }
.ba-standards-grid p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.ba-standards-grid a, .ba-standards-foot a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.ba-standards-foot { margin: 22px 0 0; font-size: 13.5px; color: var(--dim); }
.ba-note { margin: 8px 0 0; font-size: 13px; color: var(--dim); }

/* ---------------- the editorial invitation ----------------
   Never modal: no backdrop, no focus trap, nothing that stops a
   reader navigating or reading underneath. It is a card pinned to
   the corner of the viewport, so it cannot cause layout shift, and
   it sits above the mobile bottom nav rather than over it. */
.ba-invite {
  position: fixed; z-index: var(--z-invite, 45); right: clamp(12px, 2vw, 24px); bottom: clamp(16px, 2vw, 24px);
  width: min(380px, calc(100vw - 24px));
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 18px 48px rgba(15, 36, 56, .22);
  overflow: hidden; opacity: 0; transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
}
.ba-invite[hidden] { display: none; }
.ba-invite.is-in { opacity: 1; transform: none; }
.ba-invite.is-out { opacity: 0; transform: translateY(8px); }
.ba-invite-figure { position: relative; margin: 0; background: var(--paper-2); }
.ba-invite-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ba-invite-label {
  position: absolute; left: 0; bottom: 0; margin: 0; padding: 6px 10px;
  background: var(--navy); color: var(--sheet);
  font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}
.ba-invite-close {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(253, 251, 244, .92); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
}
.ba-invite-close:hover { background: #fff; border-color: var(--line-strong); }
.ba-invite-body { padding: 14px 16px 16px; }
.ba-invite-cat {
  margin: 0 0 4px; font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brass);
}
.ba-invite-title { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; line-height: 1.22; }
.ba-invite-title a { color: var(--ink); }
.ba-invite-title a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.ba-invite-teaser { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.ba-invite-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ba-invite-cta {
  display: inline-block; padding: 10px 16px; border-radius: 2px;
  background: var(--navy); color: var(--sheet);
  font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-decoration: none;
}
.ba-invite-cta:hover { background: var(--navy-deep); color: var(--sheet); }
.ba-invite-dismiss {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px;
}
.ba-invite-dismiss:hover { color: var(--ink); }
.ba-invite-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--dim); }

/* ---------------- desk-home ribbon ----------------
   The desk home (/writers/) is generated by a different renderer, so the
   section announces itself there with one band directly under the nav. */
.ba-ribbon {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin: 0 0 4px; padding: 12px 16px; border: 1px solid var(--line);
  border-left: 3px solid var(--brass); border-radius: var(--radius);
  background: var(--sheet); color: var(--ink);
}
.ba-ribbon-kicker { font-family: var(--sans); font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.ba-ribbon-line { font-family: var(--serif); font-size: 15px; color: var(--muted); flex: 1 1 16rem; }
.ba-ribbon-cta { font-family: var(--sans); font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--navy); white-space: nowrap; }
.ba-ribbon:hover .ba-ribbon-cta { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .ba-mast-cols { grid-template-columns: 1fr; gap: 14px; }
  .ba-lead-card { grid-template-columns: 1fr; gap: 16px; }
  .ba-lead-body { order: 2; }
  .ba-lead-media { order: 1; }
}

@media (max-width: 780px) {
  .ba-beat-grid { grid-template-columns: 1fr 1fr; }
  .ba-body.prose p { font-size: 17.5px; line-height: 1.72; }
  .ba-article-head h1 { font-size: clamp(28px, 7.4vw, 36px); }
  .ba-byline { font-size: 12px; }
  .ba-rank-row { grid-template-columns: 2rem minmax(0, 1fr); }
  .ba-rank-meta { grid-column: 2; }
  .ba-cover img { max-height: 420px; }
}

@media (max-width: 620px) {
  .ba-beat-grid { grid-template-columns: 1fr; }
  .ba-mast-title { font-size: clamp(30px, 10vw, 40px); }
  .ba-mast-facts { font-size: 11.5px; }
  .ba-band-count, .ba-band-link { display: none; }
  /* Above the fixed mobile bottom navigation (64px) plus the home indicator. */
  .ba-invite {
    right: 10px; left: 10px; width: auto;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-height: min(72vh, 460px); overflow-y: auto;
  }
  .ba-invite-title { font-size: 18px; }
  .ba-invite-teaser { font-size: 13.5px; }
  .ba-invite-cta { padding: 11px 16px; }
}

@media (min-width: 760px) {
  .ba-sources ol { columns: 2; column-gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .ba-invite, .ba-invite.is-in, .ba-invite.is-out { transition: none; transform: none; }
  .ba-card-media img { transition: none; }
  .ba-card-media:hover img { transform: none; }
}

/* ---------------- dark theme ---------------- */
html[data-theme="dark"] .ba-empty-card,
html[data-theme="dark"] .ba-ribbon,
html[data-theme="dark"] .ba-invite,
html[data-theme="dark"] .ba-beat { background: var(--paper-2); }
html[data-theme="dark"] .ba-beat-grid { background: var(--line); }
html[data-theme="dark"] .ba-reco { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .ba-invite-close { background: rgba(20, 26, 36, .9); color: var(--ink); }
html[data-theme="dark"] .ba-invite-close:hover { background: rgba(20, 26, 36, 1); }
html[data-theme="dark"] .ba-invite-cta { background: var(--accent); color: #141a24; }
html[data-theme="dark"] .ba-invite-cta:hover { background: var(--brass-bright); color: #141a24; }
html[data-theme="dark"] .ba-invite-label { background: var(--accent); color: #141a24; }
html[data-theme="dark"] .ba-body.prose a,
html[data-theme="dark"] .ba-standards-grid a,
html[data-theme="dark"] .ba-standards-foot a,
html[data-theme="dark"] .ba-band-link,
html[data-theme="dark"] .ba-standards-grid a { color: var(--accent); }
html[data-theme="dark"] .ba-ribbon-cta { color: var(--accent); }
html[data-theme="dark"] .ba-beat-chip.is-all { background: var(--accent); border-color: var(--accent); color: #141a24; }
html[data-theme="dark"] .ba-body.prose > p:first-of-type::first-letter { color: var(--accent); }
html[data-theme="dark"] .ba-rank-row:hover { background: rgba(255, 255, 255, .04); }

/* the departure: a brass sweep across the band, then the page changes */
.ba-enter.is-leaving::after {
  content: ""; position: absolute; inset: 0; transform-origin: left center;
  background: linear-gradient(90deg, rgba(195, 154, 46, .95), rgba(195, 154, 46, .35));
  animation: ba-enter-sweep .26s ease-in forwards;
}
@keyframes ba-enter-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* the arrival: the section's masthead settles into place. Transform + opacity
   only, so nothing reflows and no layout shift is recorded. */
html.ba-arrived .ba-mast,
html.ba-arrived .ba-article-head,
html.ba-arrived .ba-lead {
  animation: ba-arrive .34s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes ba-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .ba-enter-in { gap: 6px 12px; padding: 12px 0; }
  .ba-enter-line { flex: 1 1 100%; order: 3; font-size: 14px; }
  .ba-enter-cta { padding: 10px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .ba-enter.is-leaving::after { animation: none; }
  html.ba-arrived .ba-mast,
  html.ba-arrived .ba-article-head,
  html.ba-arrived .ba-lead { animation: none; }
  .ba-enter-arrow, .ba-enter:hover .ba-enter-arrow { transition: none; transform: none; }
}
