/* ==========================================================================
   RESOURCE SINGLE TEMPLATE
   Shared by every resource detail page (case studies, webinars, articles).
   Figma: CanaryLabs-Website › Blog Post Template (desktop 6:2, mobile 47:229)

   Page skeleton
     .rs-progress                 reading progress bar (filled by resource-single.js)
     .rs-breadcrumb               desktop trail; .rs-back is the mobile "← Resources" link
     .rs-layout                   article column + sticky sidebar
       .rs-article
         .rs-title-block          eyebrow, H1, accent line, meta row
         .rs-featured             lead image (or .rs-video) + .rs-caption
         .rs-toc                  "In this article" list
         .rs-body                 h2 / h3 / p / ul / ol + components below
       .rs-sidebar                .rs-contact-card, .rs-panel (client info, share)
     .rs-back-to-top

   Body components (use whichever the content needs)
     .rs-quick-answer   .rs-takeaways   .rs-stats      .rs-lead
     .rs-quote          .rs-callout     .rs-table      .rs-figure
     .rs-video          .rs-cta         .rs-faq        .rs-tags
     .rs-speakers
   ========================================================================== */

.rs-page {
  --rs-ink: var(--canary-ink, #282b2b);
  --rs-gold: var(--canary-gold, #ffbe00);
  --rs-bone: var(--canary-bone, #fafafa);
  --rs-smoke: var(--canary-smoke, #f4f4f4);
  --rs-border: var(--canary-border, #e5e7eb);
  --rs-gray-2: var(--canary-gray-2, #6b7280);
  --rs-warm-fade: var(--canary-warm-fade, #fff6d9);
  --rs-navy: #29313e;
  --rs-text: #1a1a1a;
  --rs-shadow-card: 0 4px 24px rgba(40, 43, 43, 0.1);
  /* sticky nav (76px) sits under the 24px announcement bar */
  --rs-nav-offset: 100px;
  background-color: var(--rs-smoke);
  color: var(--rs-ink);
  font-family: "Montserrat", sans-serif;
}
/* Webflow's global p/h rules set their own font, size and gray color */
.rs-page p,
.rs-page h1,
.rs-page h2,
.rs-page h3 {
  font-family: "Montserrat", sans-serif;
  color: inherit;
  text-transform: none;
}
.rs-page li {
  margin-bottom: 0;
  font-weight: 400;
}

/* ---------- Reading progress ---------- */
.rs-progress {
  position: sticky;
  top: var(--rs-nav-offset);
  z-index: 998;
  height: 4px;
  background-color: var(--rs-smoke);
}
.rs-progress-fill {
  width: 0;
  height: 100%;
  background-color: var(--rs-gold);
}

/* ---------- Breadcrumb ---------- */
.rs-breadcrumb {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 40px 0;
  font-size: 13px;
  color: var(--rs-gray-2);
}
.rs-breadcrumb a { color: inherit; }
.rs-breadcrumb a:hover { color: var(--rs-ink); }
.rs-breadcrumb [aria-current="page"] { color: var(--rs-ink); }
.rs-breadcrumb-sep { margin: 0 4px; }
.rs-back {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--rs-ink);
}

/* ---------- Layout ---------- */
.rs-layout {
  display: grid;
  grid-template-columns: minmax(0, 960px) 360px;
  justify-content: center;
  align-items: start;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 40px 80px;
}
.rs-article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ---------- Title block ---------- */
.rs-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.rs-eyebrow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.rs-eyebrow {
  display: inline-flex;
  padding: 5px 14px;
  border: 1px solid var(--rs-gold);
  border-radius: 999px;
  background-color: var(--rs-warm-fade);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: normal;
}
.rs-partner-logo img {
  display: block;
  width: auto;
  height: 40px;
}
.rs-title {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.006;
  letter-spacing: -0.8px;
  color: var(--rs-ink);
}
.rs-accent {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-image: linear-gradient(90deg, var(--rs-gold), var(--rs-navy));
}
.rs-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
}
.rs-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--rs-ink);
  color: var(--rs-gold);
  font-size: 14px;
  font-weight: 700;
}
.rs-meta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rs-meta-author {
  font-size: 14px;
  font-weight: 600;
}
.rs-meta-details {
  font-size: 12.5px;
  color: var(--rs-gray-2);
  white-space: pre;
}
.rs-meta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 7px 14px;
  border: 1px solid var(--rs-ink);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rs-ink);
  transition: background-color 0.2s ease;
}
.rs-meta-link:hover { background-color: var(--rs-warm-fade); }

/* ---------- Featured media + figures ---------- */
.rs-featured,
.rs-figure {
  position: relative;
  margin: 0;
}
.rs-featured img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 14px;
}
.rs-figure-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rs-border);
  border-radius: 14px;
  background-color: var(--rs-bone);
}
.rs-figure-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
}
.rs-expand {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.45);
  color: var(--rs-bone);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.rs-expand:hover { background-color: rgba(0, 0, 0, 0.65); }
.rs-caption {
  margin: 10px 0 0;
  text-align: left;
  font-size: 12.5px;
  color: var(--rs-gray-2);
}
.rs-video {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background-color: var(--rs-ink);
  aspect-ratio: 16 / 9;
}
.rs-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Lightbox (opened by .rs-expand) */
.rs-lightbox {
  max-width: min(1200px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}
.rs-lightbox::backdrop { background-color: rgba(26, 26, 26, 0.85); }
.rs-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  border-radius: 14px;
}
.rs-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* ---------- Table of contents ---------- */
.rs-toc {
  padding: 18px 24px;
  border: 1px solid var(--rs-border);
  border-radius: 10px;
  background-color: var(--rs-bone);
}
.rs-toc-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.rs-toc ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rs-toc;
}
.rs-toc li { counter-increment: rs-toc; }
.rs-toc a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rs-ink);
}
.rs-toc a::before {
  content: counter(rs-toc);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: var(--rs-warm-fade);
  font-size: 11px;
  font-weight: 700;
}
.rs-toc a:hover { text-decoration: underline; text-decoration-color: var(--rs-gold); }

/* ---------- Quick answer + key takeaways ---------- */
.rs-quick-answer,
.rs-takeaways {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 22px 28px;
  border-radius: 14px;
}
.rs-quick-answer {
  border: 1px solid var(--rs-gold);
  background-color: var(--rs-bone);
  box-shadow: var(--rs-shadow-card);
}
.rs-takeaways {
  gap: 14px;
  padding-top: 24px;
  padding-bottom: 24px;
  background-image: linear-gradient(90deg, var(--rs-ink), var(--rs-navy));
}
.rs-box-label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--rs-navy);
}
.rs-takeaways .rs-box-label { color: var(--rs-gold); }
.rs-box-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: normal;
}
.rs-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 20.25px;
  color: var(--rs-text);
}
.rs-takeaways .rs-checklist {
  gap: 10px;
  color: var(--rs-bone);
}
.rs-checklist li {
  position: relative;
  padding-left: 28px;
}
.rs-checklist li::before {
  content: "✓";
  position: absolute;
  top: 1px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--rs-gold);
  border-radius: 50%;
  background-color: var(--rs-warm-fade);
  font-size: 9px;
  font-weight: 700;
  color: var(--rs-ink);
}
.rs-takeaways .rs-checklist li { padding-left: 30px; }
.rs-takeaways .rs-checklist li::before {
  top: 0;
  width: 20px;
  height: 20px;
  border: 0;
  background-color: var(--rs-gold);
  font-size: 10px;
}

/* ---------- Stat band ---------- */
.rs-stats {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 12px;
}
.rs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 18px;
  border: 1px solid var(--rs-gold);
  border-radius: 14px;
  background-color: var(--rs-bone);
  box-shadow: var(--rs-shadow-card);
  text-align: center;
}
.rs-stat-num {
  font-size: 26px;
  font-weight: 700;
  line-height: normal;
}
.rs-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--rs-gray-2);
}

/* ---------- Body copy ---------- */
.rs-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.rs-body > h2,
.rs-body > section > h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: -0.5px;
  color: var(--rs-ink);
  scroll-margin-top: 140px;
}
.rs-body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  color: var(--rs-ink);
}
.rs-body > section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.rs-body p,
.rs-body ul:not([class]),
.rs-body ol:not([class]) {
  max-width: 700px;
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 28px;
  color: var(--rs-text);
}
.rs-body a:not([class]) {
  color: var(--rs-ink);
  text-decoration: underline;
  text-decoration-color: var(--rs-gold);
  text-underline-offset: 3px;
}
.rs-body ul:not([class]),
.rs-body ol:not([class]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.rs-body ul:not([class]) li,
.rs-body ol:not([class]) li {
  position: relative;
  padding-left: 34px;
}
.rs-body ul:not([class]) li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--rs-gold);
}
.rs-body ol:not([class]) { counter-reset: rs-ol; }
.rs-body ol:not([class]) li { counter-increment: rs-ol; }
.rs-body ol:not([class]) li::before {
  content: counter(rs-ol) ".";
  position: absolute;
  left: 0;
  width: 22px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--rs-gold);
}
.rs-lead {
  max-width: 660px;
  padding-left: 20px;
  border-left: 4px solid var(--rs-gold);
}
.rs-body .rs-lead p,
.rs-article > .rs-lead p {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  line-height: 32px;
  color: var(--rs-ink);
}

/* ---------- Pull-quote + callout ---------- */
.rs-quote,
.rs-callout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 8px 0 8px 28px;
  border-left: 4px solid var(--rs-gold);
}
.rs-quote::before {
  content: "\201C";
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  color: var(--rs-gold);
}
.rs-callout::before {
  content: "\26A0";
  font-size: 28px;
  font-weight: 700;
  line-height: normal;
  color: #e07b00;
}
.rs-body .rs-quote p,
.rs-body .rs-callout p {
  max-width: 880px;
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 700;
  line-height: 30px;
  color: var(--rs-navy);
}
.rs-body .rs-callout p {
  font-size: 19px;
  line-height: 28.5px;
  color: var(--rs-ink);
}
.rs-quote cite {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--rs-gray-2);
}

/* ---------- Comparison table ---------- */
.rs-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--rs-ink);
  border-radius: 14px;
  border-spacing: 0;
  background-color: var(--rs-bone);
  font-size: 14px;
  line-height: 21px;
}
.rs-table th,
.rs-table td {
  padding: 11px 15px;
  text-align: left;
  vertical-align: top;
}
.rs-table th {
  padding-top: 13px;
  padding-bottom: 13px;
  background-color: #faf5e5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.rs-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--rs-ink); }
.rs-table td:first-child { font-weight: 600; }
.rs-signal {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #258036;
}
.rs-signal.is-moderate { color: #996b0d; }

/* ---------- Inline CTA ---------- */
.rs-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border: 1px solid var(--rs-border);
  border-radius: 14px;
  background-color: var(--rs-bone);
}
.rs-cta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rs-cta-title {
  font-size: 16px;
  font-weight: 700;
}
.rs-cta-sub {
  font-size: 13.5px;
  color: var(--rs-gray-2);
}
.rs-cta-button {
  flex-shrink: 0;
  padding: 12px 22px;
  border-radius: 999px;
  background-color: var(--rs-ink);
  color: var(--rs-bone);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.rs-cta-button:hover {
  background-color: var(--rs-gold);
  color: var(--rs-ink);
}

/* ---------- FAQ ---------- */
.rs-faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rs-faq details {
  overflow: hidden;
  border: 1px solid var(--rs-ink);
  border-radius: 14px;
  background-color: var(--rs-bone);
  box-shadow: 0 2px 12px rgba(40, 43, 43, 0.05);
}
.rs-faq details[open] { border-color: var(--rs-gold); }
.rs-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.rs-faq summary::-webkit-details-marker { display: none; }
.rs-faq summary::after {
  content: "+";
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--rs-warm-fade);
  font-size: 14px;
  font-weight: 700;
}
.rs-faq details[open] summary::after {
  content: "\00D7";
  background-color: var(--rs-gold);
}
.rs-faq-answer {
  padding: 0 20px 18px;
  border-top: 1px solid var(--rs-ink);
}
.rs-body .rs-faq-answer p {
  max-width: none;
  padding-top: 14px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  line-height: 23.8px;
}

/* ---------- Topic tags ---------- */
.rs-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.rs-tags-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--rs-gray-2);
}
.rs-tag {
  padding: 6px 12px;
  border: 1px solid var(--rs-ink);
  border-radius: 999px;
  background-color: var(--rs-warm-fade);
  font-size: 12.5px;
  color: var(--rs-ink);
}

/* ---------- Speakers ---------- */
.rs-speakers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.rs-speaker {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--rs-ink);
  border-radius: 14px;
  background-color: var(--rs-bone);
}
.rs-speaker img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--rs-smoke);
}
.rs-body .rs-speaker h3 {
  font-size: 15px;
  font-weight: 600;
}
.rs-body .rs-speaker p {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  line-height: 19px;
  color: var(--rs-gray-2);
}

/* ---------- Sidebar ---------- */
.rs-sidebar {
  position: sticky;
  top: calc(var(--rs-nav-offset) + 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rs-contact-card {
  overflow: hidden;
  border: 1px solid var(--rs-ink);
  border-radius: 20px;
  background-color: var(--rs-bone);
  box-shadow: 0 8px 40px rgba(40, 43, 43, 0.12);
}
.rs-contact-top {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 22px 24px 20px;
  background-image: linear-gradient(90deg, var(--rs-ink), var(--rs-navy));
  color: var(--rs-bone);
}
.rs-contact-top::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -66px;
  width: 234px;
  height: 239px;
  background: url("../images/footer-img.svg") no-repeat center / contain;
  pointer-events: none;
}
.rs-contact-top > * { position: relative; z-index: 1; }
.rs-contact-logo {
  display: block;
  width: 120px;
  height: auto;
}
.rs-contact-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 22.8px;
}
.rs-contact-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 18.75px;
}
.rs-contact-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 20px 20px;
}
.rs-contact-button,
.rs-panel-button {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background-color: var(--rs-gold);
  color: var(--rs-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.rs-contact-button:hover {
  background-color: var(--rs-ink);
  color: var(--rs-gold);
}
.rs-contact-note {
  font-size: 11px;
  color: var(--rs-gray-2);
  text-align: center;
}

.rs-panel {
  overflow: hidden;
  border: 1px solid var(--rs-ink);
  border-radius: 16px;
  background-color: var(--rs-bone);
  box-shadow: 0 2px 10px rgba(40, 43, 43, 0.06);
}
.rs-panel-title {
  margin: 0;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rs-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.rs-panel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}
.rs-panel-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
  font-size: 13px;
}
.rs-panel-row dt { color: var(--rs-gray-2); }
.rs-panel-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.rs-panel dl { margin: 0; }
.rs-panel-button {
  margin-top: 4px;
  background-color: var(--rs-ink);
  color: var(--rs-bone);
}
.rs-panel-button:hover {
  background-color: var(--rs-gold);
  color: var(--rs-ink);
}
.rs-share-row {
  display: flex;
  gap: 8px;
}
.rs-share-link,
.rs-copy-link {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--rs-ink);
  border-radius: 8px;
  background-color: var(--rs-bone);
  color: var(--rs-ink);
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.rs-share-link:hover { background-color: var(--rs-warm-fade); }
.rs-copy-link {
  padding: 9px;
  border-color: var(--rs-gold);
  background-color: var(--rs-warm-fade);
  font-size: 11.5px;
}
.rs-copy-link:hover { background-color: #ffeeb8; }

/* ---------- Back to top ---------- */
.rs-back-to-top {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 997;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--rs-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.rs-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.rs-back-to-top img {
  width: 36px;
  height: 36px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 1199px) {
  .rs-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
}

@media screen and (max-width: 991px) {
  .rs-page { --rs-nav-offset: 88px; }
  .rs-layout { grid-template-columns: minmax(0, 1fr); }
  .rs-sidebar { position: static; }
  /* mobile order: client info, share, then the contact card */
  .rs-contact-card { order: 3; }
}

@media screen and (max-width: 767px) {
  .rs-breadcrumb { padding: 16px 20px 0; }
  .rs-breadcrumb-trail { display: none; }
  .rs-back { display: inline-block; }
  .rs-layout { gap: 24px; padding: 12px 20px 56px; }
  .rs-article,
  .rs-body,
  .rs-body > section { gap: 16px; }

  .rs-title-block { gap: 16px; }
  .rs-title { font-size: 30px; line-height: 1.18; letter-spacing: -0.4px; }
  .rs-avatar { width: 40px; height: 40px; font-size: 12px; color: var(--rs-bone); }
  .rs-meta { gap: 10px; }
  .rs-meta-author { font-size: 13.5px; }
  .rs-meta-details { font-size: 12px; }
  .rs-meta-link { margin-left: 0; }
  /* accent line sits under the meta row on mobile */
  .rs-accent { order: 1; }
  .rs-featured img { height: 190px; }
  .rs-partner-logo img { height: 32px; }

  .rs-stats { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }

  .rs-body > h2,
  .rs-body > section > h2 { font-size: 22px; }
  .rs-body p,
  .rs-body ul:not([class]),
  .rs-body ol:not([class]) { font-size: 15.5px; line-height: 26px; }
  .rs-lead { padding-left: 0; border-left: 0; }
  .rs-body .rs-lead p,
  .rs-article > .rs-lead p { font-family: "Montserrat", sans-serif; font-size: 16px; line-height: 26px; color: var(--rs-text); }

  .rs-quote,
  .rs-callout {
    gap: 8px;
    padding: 18px;
    border-left-width: 3px;
    border-radius: 10px;
    background-color: var(--rs-bone);
  }
  .rs-quote::before { display: none; }
  .rs-callout::before { font-size: 14px; }
  .rs-body .rs-quote p,
  .rs-body .rs-callout p {
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    color: var(--rs-ink);
  }

  /* comparison table collapses to stacked cards */
  .rs-table,
  .rs-table tbody,
  .rs-table tr,
  .rs-table td { display: block; width: auto; }
  .rs-table { overflow: visible; border: 0; background: none; }
  .rs-table thead { display: none; }
  .rs-table tr {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--rs-border);
    border-radius: 10px;
    background-color: var(--rs-smoke);
  }
  .rs-table td,
  .rs-table tbody tr:not(:last-child) td { padding: 0; border: 0; font-size: 13.5px; line-height: normal; }
  .rs-table td:first-child { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
  .rs-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #288028;
  }
  .rs-table td[data-label]:nth-child(2)::before { color: #994a29; }
  .rs-signal {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background-color: #e5f2e5;
    font-size: 9px;
    font-weight: 700;
    color: #288028;
  }
  .rs-signal.is-moderate { background-color: #faf0dc; }

  .rs-figure-media img { max-height: 220px; }
  .rs-expand { top: 10px; right: 10px; }

  .rs-cta { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }
  .rs-cta-button { padding: 13px 22px; }

  .rs-speakers { grid-template-columns: minmax(0, 1fr); }

  .rs-back-to-top { right: 20px; bottom: 20px; width: 44px; height: 44px; }
  .rs-back-to-top img { width: 28px; height: 28px; }
}

/* ---------- Print: article only ---------- */
@media print {
  .nav-bar,
  .div-block-65,
  .footer,
  .rs-progress,
  .rs-breadcrumb,
  .rs-sidebar,
  .rs-cta,
  .rs-expand,
  .rs-back-to-top { display: none !important; }
  .rs-page { background: #fff; }
  .rs-layout { display: block; padding: 0; }
  .rs-body > h2,
  .rs-body > section > h2 { page-break-after: avoid; }
  .rs-quote,
  .rs-figure,
  .rs-stat { page-break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  .rs-back-to-top,
  .rs-cta-button,
  .rs-contact-button { transition: none; }
}
