/* Blog hub + detail. `rk-bg-` namespace (bg = blog) so nothing here can reach another page family.
   Loaded last, after home-2026 → home-v3 → landing2026-nav.

   THE HOME PAGE IS THE STANDARD (Andy 2026-08-01). This sheet REFERENCES the home page's primitives
   rather than restating their values, so tuning the home page carries to the blog automatically:

     .spread        container width formula + --sec-pad rhythm
     .kicker        13px/1.6px caps + the 26×2 emerald rule via ::before
     h1 / h2 / h3   the display scale (clamp) and the rounded display face
     .sub           17.5px, 56ch, ink-soft
     .center-head   centred heading block

   The failure mode this avoids is the one the pricing page shipped and had to undo: a parallel set
   of hand-picked numbers that drifts a little off the home page in width, section rhythm and even
   the shade of green (module-ext-lp-pages, "reference the primitives, do not copy the numbers").

   Two consequences of that rule worth stating, because both replaced an earlier hand-rolled choice:
   - NO serif. The site's display face is the rounded sans in --font-display; the blog is not the
     place to introduce a second voice.
   - Section padding on a secondary page is BOTTOM-ONLY (`padding-block: 0 var(--sec-pad)`).
     Applying --sec-pad to both sides doubles it at every seam — the same trap the pricing page hit. */

/* ── Shared shell ────────────────────────────────────────────────────────── */

/* .spread supplies the width formula and the vertical rhythm; only the reading measure is ours. */
.rk-bg-hub,
.rk-bg-detail {
  padding-block: clamp(28px, 3.4vw, 52px) var(--sec-pad);
}

/* ── Hub ─────────────────────────────────────────────────────────────────── */

.rk-bg-hub-head { max-width: min(100%, 960px); margin-bottom: clamp(26px, 3vw, 44px); }
/* The home page's h1 carries `text-wrap: balance`, which is right for a centred hero and wrong here:
   balancing this left-aligned headline made it break INSIDE "grown-ups", at the hyphen. A broken
   compound reads worse than two uneven lines, so this one fills greedily and only avoids orphans. */
.rk-bg-hub-head h1 { margin: 18px 0 0; text-wrap: pretty; }
/* .sub is capped at 56ch for a centred column; the hub's intro is left-aligned under a wide h1 and
   reads short at that cap, so only the measure is widened — size and colour stay the primitive's. */
.rk-bg-hub-intro { max-width: 64ch; }

.rk-bg-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(18px, 2.4vw, 28px); }
/* Pill 999 is the site-wide button language — the pricing page's squared-off segmented control was
   logged as a deviation, not a precedent. */
.rk-bg-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid var(--rk-line);
  border-radius: 999px;
  background: var(--rk-surface);
  color: var(--rk-ink);
  font: 600 15px var(--font-body);
  text-decoration: none;
  transition: border-color .15s ease-out, color .15s ease-out, background-color .15s ease-out;
}
.rk-bg-chip span {
  color: var(--rk-ink-muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
}
.rk-bg-chip:hover { border-color: var(--rk-card-hover-border); color: var(--rk-emerald); }
/* Selected reads as a filled tint rather than a heavier outline — at this size a border swap is easy
   to miss, a fill is not. --rk-emerald (not the hover shade): the deep green on flat surfaces was
   exactly the pricing-page drift. */
.rk-bg-chip.is-active {
  background: var(--rk-emerald-soft);
  border-color: transparent;
  color: var(--rk-emerald);
}
.rk-bg-chip.is-active span { color: var(--rk-emerald); }

/* auto-fit rather than a fixed column count: one published article should not sit in a three-column
   grid with two empty cells while the batch is still being written. */
.rk-bg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 2.4vw, 30px);
}
.rk-bg-card { min-width: 0; }
/* Card surface matches the home page's card language: paper-2 fill, 26px radius, no permanent
   border — the same treatment #read and #shelf use for their panels. */
.rk-bg-card > a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 26px 26px 22px;
  border-radius: 26px;
  background: var(--rk-paper-2);
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.rk-bg-card > a:hover { box-shadow: var(--shadow-card, var(--rk-shadow-card)); transform: translateY(-2px); }
/* height:auto is load-bearing: a width/height ATTRIBUTE pair maps to CSS height and would override
   aspect-ratio, rendering the image at its intrinsic height instead of the framed one (a real
   regression on the picture-book page). The attributes stay for CLS; the ratio is enforced here. */
.rk-bg-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 6px;
}
/* The category label is a .kicker in everything but name — same 13px caps and same 26×2 rule, set
   inline so it sits beside the words rather than above them. */
.rk-bg-card-cat,
.rk-bg-cat,
.rk-bg-related-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 13px var(--font-body);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--rk-emerald);
}
.rk-bg-card-cat::before,
.rk-bg-cat::before,
.rk-bg-related-cat::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--rk-emerald);
  border-radius: 2px;
}
.rk-bg-card-title { font-size: 21px; line-height: 1.22; margin: 4px 0 0; }
.rk-bg-card-sum { color: var(--rk-ink-soft); font-size: 16px; line-height: 1.55; margin: 0; flex: 1; }
/* Dates and reading time are data, not prose — tracked caps so they read as a caption. */
.rk-bg-card-meta {
  color: var(--rk-ink-muted, var(--rk-ink-soft));
  font: 600 11.5px var(--font-body);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-top: 8px;
}
.rk-bg-empty { color: var(--rk-ink-soft); }
/* Shown only on localized hubs — explains why the cards under a German/Arabic chrome are English. */
.rk-bg-langnote { color: var(--rk-ink-soft); font-size: 14px; margin: -8px 0 22px; }

/* ── Detail ──────────────────────────────────────────────────────────────── */

/* One measured column for everything, so the answer block, the body and the signal blocks share a
   single reading rhythm instead of each finding its own width. Narrower than .spread on purpose:
   long-form prose at 1560px would run past a comfortable line length. */
.rk-bg-detail > * { max-width: 820px; margin-inline: auto; }
.rk-bg-crumb { font: 700 13px var(--font-body); letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 24px; }
.rk-bg-crumb a { color: var(--rk-emerald); text-decoration: none; }
.rk-bg-crumb a:hover { text-decoration: underline; }
/* h2 rather than h1's clamp: an article headline sits inside the page, not at the top of a landing
   page, and 68px would overpower the prose it introduces. */
.rk-bg-head h1 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.12; margin: 16px 0 0; }
.rk-bg-sum { color: var(--rk-ink-soft); font-size: 18px; line-height: 1.55; margin: 16px 0 0; max-width: 62ch; }
.rk-bg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--rk-ink-muted, var(--rk-ink-soft));
  font: 600 11.5px var(--font-body);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 20px 0 0;
}
.rk-bg-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 26px; margin-top: 28px; }

/* The quick answer is the block an answer engine lifts — a paper-2 panel with an emerald rule so a
   human reader also treats it as the summary rather than as an aside to skip. */
.rk-bg-answer {
  margin: 30px auto 0;
  padding: 22px 26px;
  border-inline-start: 3px solid var(--rk-emerald);
  border-radius: 0 26px 26px 0;
  background: var(--rk-paper-2);
}
.rk-bg-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 13px var(--font-body);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--rk-emerald);
  margin-bottom: 10px;
}
.rk-bg-answer-body p { margin: 0 0 10px; font-size: 17.5px; line-height: 1.65; }
.rk-bg-answer-body p:last-child { margin-bottom: 0; }

.rk-bg-body { margin-top: 36px; font-size: 17.5px; line-height: 1.7; }
.rk-bg-body h2 { margin: 44px 0 14px; }
.rk-bg-body h3 { font-size: 22px; margin: 32px 0 10px; }
.rk-bg-body p { margin: 0 0 18px; }
.rk-bg-body ul, .rk-bg-body ol { margin: 0 0 18px; padding-inline-start: 22px; }
.rk-bg-body li { margin-bottom: 8px; }
.rk-bg-body a { color: var(--rk-emerald); }

/* Sections of the article get the home page's section rhythm, halved — this is one page of content,
   not a stack of landing-page panels. */
.rk-bg-block { margin-top: calc(var(--sec-pad) * 0.5); }
.rk-bg-block > h2 { margin: 0 0 20px; }

/* Key points — a numbered summary sitting above the article. Numbers are counter-driven so the list
   stays an <ol> for assistive tech while the markers can be styled as the block's anchor. */
.rk-bg-points { margin: 0; padding: 0; list-style: none; counter-reset: rk-bg-point; }
.rk-bg-point {
  counter-increment: rk-bg-point;
  position: relative;
  padding-inline-start: 44px;
  margin-bottom: 22px;
}
/* Quoted value — an unquoted `content` is an invalid declaration and the whole pseudo-element
   silently fails to render (a real regression on the picture-book page). */
.rk-bg-point::before {
  content: counter(rk-bg-point);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rk-emerald);
  color: #fff;
  font: 700 14px var(--font-body);
  font-variant-numeric: lining-nums tabular-nums;
}
.rk-bg-point h3 { font-size: 20px; line-height: 1.3; margin: 2px 0 6px; }
/* The pull-quote is the citable unit — set apart so it reads as the sentence to take away. */
.rk-bg-point blockquote {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--rk-ink-soft);
}

.rk-bg-stats dl { display: grid; gap: 16px; margin: 0; }
.rk-bg-stat { padding: 18px 20px; border-radius: 26px; background: var(--rk-paper-2); }
.rk-bg-stat dt { font-weight: 700; margin: 0 0 4px; }
/* Lining, tabular figures: a quoted statistic has to read as one number, and a column of them has
   to line up. */
.rk-bg-stat dd {
  margin: 0;
  font: 700 24px var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
}
.rk-bg-stat-src { display: block; margin-top: 6px; font-size: 13px; color: var(--rk-ink-soft); }

.rk-bg-brand ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.rk-bg-brand li { padding: 18px 20px; border-radius: 26px; background: var(--rk-paper-2); }
.rk-bg-brand strong { display: block; margin-bottom: 6px; }
.rk-bg-brand span { display: block; color: var(--rk-ink-soft); }
.rk-bg-brand em { display: block; margin-top: 6px; font-size: 13px; color: var(--rk-ink-muted, var(--rk-ink-soft)); font-style: normal; }

.rk-bg-faq-item { border-bottom: 1px solid var(--rk-line); padding: 16px 0; }
.rk-bg-faq-item summary {
  cursor: pointer;
  font: 700 17px var(--font-body);
  list-style: none;
}
.rk-bg-faq-item summary::-webkit-details-marker { display: none; }
.rk-bg-faq-item summary::after { content: "+"; float: inline-end; color: var(--rk-emerald); }
.rk-bg-faq-item[open] summary::after { content: "×"; }
.rk-bg-faq-item > div { padding-top: 10px; }
.rk-bg-faq-item > div p { margin: 0 0 10px; color: var(--rk-ink-soft); line-height: 1.7; }

.rk-bg-related { margin-top: calc(var(--sec-pad) * 0.6); }
.rk-bg-related h2 { font-size: 26px; margin: 0 0 18px; }
.rk-bg-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.rk-bg-related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 26px;
  background: var(--rk-paper-2);
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.rk-bg-related-card:hover { box-shadow: var(--shadow-card, var(--rk-shadow-card)); transform: translateY(-2px); }
.rk-bg-related-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.3; }

@media (max-width: 600px) {
  .rk-bg-answer { padding: 18px 20px; }
  .rk-bg-body { font-size: 16.5px; }
}

/* Figures — screenshots in a feature announcement, not decoration. The aspect-ratio box reserves
   space before the image loads, which is what stops the article reflowing under the reader as each
   screenshot arrives; height:auto is required alongside it or a width/height attribute pair would
   override the ratio. Captions are part of the content, so they are styled to be read, not ignored. */
.rk-bg-body figure.rk-bg-figure { margin: 28px 0; }
.rk-bg-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 26px;
  background: var(--rk-paper-2);
  display: block;
}
.rk-bg-figure figcaption {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--rk-ink-soft);
}
