/*
   Resources article-body stylesheet. Shared by every blog/[slug] post. Externalised
   from an inline <style> block so it is fetched once and cached across posts, the same
   arrangement as horizon-cluster.css. Loaded after resource-cards styles (via headExtra)
   so source order is preserved. Edit here; the ?v= build stamp cache-busts it.
*/
/* ===== Resource article (blog post) ===== */
/* The shell nav is fixed and 80px tall — offset the page beneath it. */
/* The article's page ground. Was #f9f9f9 — a fourth off-white next to #fff,
   #fcfcfc and #f6f5f0. It shares the hero surface's colour now, without the
   pattern: this is a reading page, not a marketing hero. */
.rp-page { background-color: var(--hero-bg); padding-top: 80px; }
.rp-top { padding-top: 50px; padding-bottom: 90px; }

.rp-breadcrumb {
  margin: 0 0 46px;
  /* --ink-soft, not --ink-muted: the muted grey is 2.4:1 against the cream
     page and WCAG AA wants 4.5:1; --ink-soft measures ~4.9:1. */
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.2; color: var(--ink-soft);
}
.rp-breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.rp-breadcrumb a:hover { color: var(--ink); }
.rp-breadcrumb .is-current { color: var(--ink); }

.rp-readtime {
  display: block; width: fit-content; margin: 0 auto 34px;
  /* One step darker than --red, same as the consent button: white on #e8423e
     is 3.98:1 and AA wants 4.5:1; #d0332f measures 5.0:1. */
  background-color: #d0332f; border-radius: var(--r-pill); height: 34px;
  padding: 9px 16px 0;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 16px; font-weight: 500; line-height: 1.24;
  letter-spacing: 1.6px; text-transform: uppercase; color: #fff;
}
/* Type comes from public/css/hero.css. */
.rp-h1 { margin: 0 0 22px; text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.rp-date {
  margin: 0 0 56px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.2;
  color: #6b6b6b; text-align: center;
}
.rp-hero { width: 100%; max-width: 1153px; margin: 0 auto; display: block; border-radius: var(--r-lg); }

/* ---- Two-column article body ---- */
.rp-article { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 146px; align-items: start; }
.rp-body { max-width: 721px; }

.rp-sidebar { position: sticky; top: 120px; }
.rp-side-label {
  margin: 0 0 22px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.2;
  letter-spacing: 1.4px; text-transform: uppercase; color: #6b6b6b;
}
.rp-contributor { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.rp-contributor + .rp-contributor { margin-top: -12px; }
.rp-contributor img { width: 64px; height: 64px; border-radius: var(--r-pill); object-fit: cover; display: block; }
.rp-contributor-name {
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--ink);
}
/* Named authors carry a link to their /authors/ profile; keep it looking like
   the byline, underlined only on hover. */
.rp-contributor-name a { color: inherit; text-decoration: none; }
.rp-contributor-name a:hover { text-decoration: underline; }
.rp-contributor-role {
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 20px; font-style: italic; font-weight: 400; line-height: 1.25; color: var(--ink);
}
.rp-side-rule { height: 1px; background-color: #c7c7c7; margin: 0 0 34px; }
.rp-toc-h {
  margin: 0 0 18px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 32px; font-weight: 600; line-height: 1.2; color: var(--red);
}
.rp-toc { margin: 0 0 42px; padding-left: 20px; }
.rp-toc li {
  margin-bottom: 8px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.2; color: var(--ink);
}
.rp-toc a { color: var(--ink); text-decoration: underline; }
.rp-toc a:hover { color: var(--red); }
.rp-listen {
  display: inline-flex; align-items: center; justify-content: center; gap: 13px;
  min-height: 64px; padding: 16px 24px 12px; border-radius: var(--r-pill);
  background-color: #fff; border: 1px solid var(--ink); cursor: pointer;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 20px; font-weight: 600; line-height: 1.1; color: var(--ink);
  margin-bottom: 42px; transition: background-color .15s;
}
.rp-listen:hover { background-color: rgba(18, 18, 17, 0.06); }
.rp-listen img { width: 24px; height: 24px; display: block; }

/* ---- Body blocks ---- */
.rp-h2 {
  margin: 60px 0 26px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 48px; font-weight: 600; line-height: 1.2; color: var(--ink);
  scroll-margin-top: 120px;
}
.rp-body > .rp-h2:first-child { margin-top: 0; }
.rp-h3 {
  margin: 40px 0 18px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 32px; font-weight: 600; line-height: 1.2; color: var(--ink);
  scroll-margin-top: 120px;
}
.rp-blockquote {
  margin: 32px 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--red);
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 24px; font-style: italic; line-height: 1.3; color: var(--ink);
}
.rp-figure-img { margin: 40px 0 48px; }
.rp-figure-img .rp-img { margin: 0 0 14px; }
.rp-figure-img figcaption {
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.35; color: #6b6b6b;
  max-width: 716px;
}
.rp-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.rp-body a:hover { color: var(--red); }
.rp-p strong, .rp-ul strong, .rp-ol strong { font-weight: 600; }
/* Inline code — API method and header names the copy names exactly. Sized in em
   so it steps down with the body copy at the narrow breakpoints. */
.rp-body code, .rp-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em; background-color: rgba(18, 18, 17, 0.06);
  border-radius: var(--r-sm); padding: 0.1em 0.36em; word-break: break-word;
}
.rp-p, .rp-ul, .rp-ol {
  margin: 0 0 28px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.2; color: var(--ink);
}
.rp-ul, .rp-ol { padding-left: 30px; }
.rp-ul li, .rp-ol li { margin-bottom: 6px; }
.rp-related-link {
  display: block; margin: 0 0 28px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--ink);
}
.rp-img { width: 100%; max-width: 716px; display: block; border-radius: var(--r-lg); margin: 40px 0 48px; }

/* ---- Data table ----
   Body copy runs at 24px; a five-column comparison at that size would wrap
   every cell to three lines, so the table steps down to 18px and keeps the
   body's family and ink. The wrapper — not the table — scrolls, and carries
   tabindex="0" so a keyboard can reach the overflow the way a trackpad can. */
.rp-table-scroll { max-width: 716px; margin: 40px 0 48px; overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--rule); background-color: var(--white); }
.rp-table-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rp-table { border-collapse: collapse; width: 100%; min-width: 560px; font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 18px; line-height: 1.3; color: var(--ink); }
.rp-table caption { caption-side: top; text-align: left; padding: 18px 20px 0; font-size: 16px; color: var(--ink-soft); }
.rp-table th, .rp-table td { padding: 14px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.rp-table thead th { font-weight: 600; font-size: 15px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-soft); background-color: var(--cream); }
.rp-table tbody th { font-weight: 600; }
.rp-table td { font-weight: 400; }
.rp-table tbody tr:last-child th, .rp-table tbody tr:last-child td { border-bottom: 0; }
.rp-table a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.rp-table a:hover { color: var(--red-deep); }

.rp-video { max-width: 716px; border-radius: var(--r-lg); overflow: hidden; margin: 40px 0 48px; background-color: #000; }
.rp-video-media { position: relative; display: block; }
.rp-video-poster { width: 100%; display: block; }
.rp-video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 65px; height: 72px;
}
.rp-video-caption {
  display: flex; gap: 22px; padding: 32px 30px 34px 26px; background-color: #000;
}
.rp-video-caption::before { content: ''; width: 4px; flex-shrink: 0; background-color: var(--red); border-radius: var(--r-sm); }
.rp-video-caption p {
  margin: 0; text-align: left;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 20px; font-weight: 400; line-height: 1.3; color: #fff;
}

.rp-figure { margin: 60px 0 48px; text-align: center; }
.rp-figure-h {
  margin: 0 0 30px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 48px; font-weight: 600; line-height: 1.2; color: var(--ink);
}
.rp-figure img { width: 395px; max-width: 100%; height: auto; display: block; margin: 0 auto 46px; }
.rp-figure p {
  margin: 0; text-align: left;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.2; color: var(--ink);
}

/* ---- Client quote card ---- */
.rp-quote {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  border-radius: var(--r-lg); padding: 46px 58px 46px 50px; min-height: 500px;
  margin: 96px 0 0;
}
.rp-quote-logo { width: 135px; height: auto; display: block; margin-bottom: 46px; }
.rp-quote-text {
  margin: 0 0 42px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 36px; font-weight: 400; line-height: 1.1;
  color: var(--cream); max-width: 409px;
}
.rp-quote-attr { margin: 0 0 40px; font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 24px; line-height: 1.3; color: var(--cream); }
.rp-quote-attr .rp-attr-name { font-weight: 600; }
.rp-quote-attr .rp-attr-role { font-style: italic; font-weight: 400; }
.rp-quote-img { width: 496px; max-width: 44%; height: 384px; border-radius: var(--r-lg); object-fit: cover; flex-shrink: 0; display: block; }

/* ---- Red CTA banner ---- */
.rp-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  background-color: var(--red); border-radius: var(--r-lg); min-height: 198px; padding: 40px 64px 40px 79px;
  margin: 96px 0 0;
}
.rp-cta-text {
  margin: 0;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 36px; font-weight: 600; line-height: 1;
  color: #fff; max-width: 538px;
}

/* ---- Related row ---- */
.rp-related { padding-top: 96px; padding-bottom: 40px; }
.rp-related-h {
  margin: 0 0 44px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 48px; font-weight: 600; line-height: 1.2; color: var(--ink);
}
.rp-quote-card {
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  border-radius: var(--r-lg); width: 100%; max-width: 349px; min-height: 500px; margin: 0 auto;
  padding: 20px; color: inherit; text-decoration: none;
  transition: box-shadow .18s ease, transform .18s ease;
}
.rp-quote-card:hover { box-shadow: 0 30px 30px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
.rp-quote-card .res-card-pill { position: static; align-self: flex-start; }
.rp-quote-card-logo { width: 160px; height: auto; display: block; margin: 27px 0 0 -15px; }
.rp-quote-card-text {
  margin: 20px 0 0 10px;
  font-family: Calibre, "Calibre Fallback", Arial, sans-serif; font-size: 24px; font-weight: 500; line-height: 1.1; color: #fff;
}
.rp-quote-card-foot { margin-top: auto; }
.rp-quote-card-foot .res-card-rule { margin: 24px 0 22px; }
.rp-quote-card-foot .res-author-name, .rp-quote-card-foot .res-author-role { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 1199px) {
  .rp-article { grid-template-columns: 264px minmax(0, 1fr); gap: 72px; }
}
@media (max-width: 991px) {
  /* .rp-h1 is defined in public/css/hero.css. */
  .rp-h2, .rp-figure-h, .rp-related-h { font-size: 36px; }
  .rp-h3 { font-size: 26px; }
  .rp-article { grid-template-columns: 1fr; gap: 48px; }
  .rp-sidebar { position: static; }
  .rp-quote { flex-direction: column; align-items: flex-start; padding: 36px; min-height: 0; }
  .rp-quote-img { width: 100%; max-width: 100%; height: auto; }
  .rp-cta { flex-direction: column; align-items: flex-start; padding: 32px; }
  .rp-cta-text { font-size: 28px; }
}
@media (max-width: 479px) {
  /* .rp-h1 is defined in public/css/hero.css. */
  .rp-p, .rp-ul, .rp-ol, .rp-figure p { font-size: 20px; }
  .rp-table { font-size: 16px; }
  .rp-table th, .rp-table td { padding: 12px 14px; }
  .rp-quote-text { font-size: 26px; }
}
