/* =====================================================================
   Blog detail — Unipay (matches the "Blogs" Figma design tokens)
   Add to your theme stylesheet (or enqueue this file) AFTER Bootstrap.
   ===================================================================== */
:root {
  --up-primary: #705edd;
  --up-navy: #0c083b;
  --up-text: rgba(12, 8, 59, .6);
  --up-text-strong: rgba(12, 8, 59, .8);
  --up-soft: #f8f7fd;
  --up-line: rgba(0, 0, 0, .08);
  --up-radius: 10px;
}

/* Safety net: stops any stray wide element from creating a page-level horizontal
   scrollbar. `clip` (unlike `hidden`) keeps position: sticky working. */
.up-bhero,
.up-single,
.up-related { overflow-x: clip; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Hero ---------- */
.up-bhero {
  background: linear-gradient(135deg, #ebe8ff 0%, #f8f7fd 55%, #fff 100%);
  padding:  4rem 0.5rem 2rem 0.5rem;
}
@media (min-width: 992px) { .up-bhero { padding: 6rem 0 4rem; } }

.up-bhero__crumbs { --bs-breadcrumb-divider-color: var(--up-text); font-size: .9375rem; flex-wrap: nowrap; }
.up-bhero__crumbs a { color: var(--up-text); text-decoration: none; }
.up-bhero__crumbs a:hover { color: var(--up-primary); }
.up-bhero__crumbs .active { color: var(--up-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.up-bhero__inner { max-width: 860px; }
.up-bhero__title {
  color: #484848;
  font-weight: 500;
  line-height: 1.3;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.375rem); /* 28px → 54px */
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
.up-bhero__lead,
.up-bhero__lead p {
  color: rgba(50, 50, 50, .8);
  font-size: clamp(1rem, .9rem + .45vw, 1.25rem);       /* 16px → 20px */
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.up-bhero__meta { color: var(--up-text); font-size: 1rem; }
.up-bhero__sep { margin: 0 .75rem; opacity: .6; }

/* Category chip (same pill as the blog filter buttons) */
.up-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 1.5rem; border-radius: 45px;
  border: 1px solid rgba(0, 0, 0, .3); color: #484848;
  font-weight: 500; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.up-pill--active { background: var(--up-primary); border-color: var(--up-primary); color: #fff; }
.up-pill:hover { color: #fff; background: var(--up-primary); border-color: var(--up-primary); }

/* ---------- Article shell ---------- */
.up-single { padding: 1.5rem 0 3rem; }
@media (min-width: 992px) { .up-single { padding: 2.5rem 0 5rem; } }

.up-single__img { margin: 0 0 2rem; border-radius: var(--up-radius); overflow: hidden; }
.up-single__img img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; }

/* ---------- TOC ---------- */
.up-toc-wrap { height: 100%; }
.up-toc {
  background: var(--up-soft);
  border-radius: var(--up-radius);
  padding: 1rem 1.25rem;
}
.up-toc__toggle {
  background: none; border: 0; padding: 0;
  color: var(--up-navy); font-weight: 600; font-size: 1rem;
}
.up-toc__toggle:focus-visible,
.up-toc__link:focus-visible { outline: 2px solid var(--up-primary); outline-offset: 2px; }
.up-toc__chev { transition: transform .2s; flex: none; }
.up-toc__toggle:not(.collapsed) .up-toc__chev { transform: rotate(180deg); }
.up-toc__heading { color: var(--up-navy); font-weight: 600; font-size: 1.0625rem; margin: 0 0 .75rem; }
.up-toc__nav { padding-top: .75rem; gap: .125rem; }

.up-toc__link {
  position: relative;
  padding: .5rem .75rem;
  border-left: 2px solid transparent;
  color: var(--up-text);
  font-size: .9375rem; line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color .15s, background-color .15s, border-color .15s;
}
.up-toc__link--sub { padding-left: 1.5rem; font-size: .875rem; }
.up-toc__link:hover { color: var(--up-primary); }
.up-toc__link.active {
  color: var(--up-primary);
  font-weight: 500;
  border-left-color: var(--up-primary);
  background: #fff;
  border-radius: 0 6px 6px 0;
}

@media (min-width: 992px) {
  .up-toc-wrap { position: sticky; top: 110px; align-self: flex-start; height: auto; }
  .up-toc { padding: 1.5rem; max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain; }
  .up-toc__nav { padding-top: 0; }
}

/* Offset anchor jumps so headings don't hide under the sticky header */
.up-prose [id] { scroll-margin-top: 110px; }

/* ---------- Article body ---------- */
.up-single__body { max-width: 900px; min-width: 0; overflow-wrap: anywhere; color: var(--up-text-strong); }
.up-single__body:focus { outline: 0; }

.up-single__body p,
.up-single__body li { font-size: 1.0625rem; line-height: 1.75; }
.up-single__body p { margin-bottom: 1.25rem; }
.up-single__body .up-lead,
.up-single__body .up-lead p { font-size: 1.1875rem; line-height: 1.7; color: var(--up-navy); }

.up-single__body h2 { color: var(--up-navy); font-weight: 500; font-size: clamp(1.375rem, 1.1rem + 1.1vw, 2rem); line-height: 1.3; margin: 2.5rem 0 1rem; }
.up-single__body h3 { color: var(--up-navy); font-weight: 500; font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); line-height: 1.35; margin: 2rem 0 .75rem; }
.up-single__body > :first-child { margin-top: 0; }
.up-single__body a:not(.up-btn) { color: var(--up-primary); text-underline-offset: 3px; }

.up-single__line { font-weight: 500; color: var(--up-navy); }

/* Media never wider than the column */
.up-single__body img,
.up-single__body video,
.up-single__body iframe,
.up-single__body embed { max-width: 100%; height: auto; }
.up-single__body iframe { aspect-ratio: 16 / 9; width: 100%; }
.up-single__body pre { max-width: 100%; overflow-x: auto; }
.up-single__body table { max-width: 100%; }
.up-single__fig { margin: 2rem 0; }
.up-single__fig img,
.up-single__thumb { border-radius: var(--up-radius); }
.up-single__thumb { aspect-ratio: 4 / 3; object-fit: cover; }

/* Lists */
.up-single__body ul,
.up-single__body ol { padding-left: 1.25rem; margin-bottom: 1.5rem; }
.up-single__body li { margin-bottom: .5rem; }
.up-single__body li::marker { color: var(--up-primary); }
.up-ticks { list-style: none; padding-left: 0 !important; }
.up-ticks li { position: relative; padding-left: 2rem; }
.up-ticks li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--up-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* Quote */
.up-single__quote { margin: 2rem 0; padding: 1.5rem 1.5rem 1.5rem 1.75rem; background: var(--up-soft); border-left: 4px solid var(--up-primary); border-radius: 0 var(--up-radius) var(--up-radius) 0; }
.up-single__quote p { font-size: 1.1875rem; color: var(--up-navy); margin-bottom: .75rem; }
.up-single__quote footer { color: var(--up-text); font-size: .9375rem; }
.up-single__quote footer strong { color: var(--up-navy); }

/* Inline CTA */
.up-single__cta { margin: 2.5rem 0; padding: 2rem 1.5rem; background: var(--up-primary); color: #fff; border-radius: var(--up-radius); }
.up-single__cta h2 { color: #fff; margin: 0 0 .5rem; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.up-single__cta p { color: rgba(255, 255, 255, .9); }
@media (min-width: 768px) { .up-single__cta { padding: 2.5rem; } }

/* Author */
.up-single__author { margin: 2rem 0; padding: 1.5rem; background: var(--up-soft); border-radius: var(--up-radius); }
.up-single__author strong { display: block; color: var(--up-navy); font-size: 1.125rem; }
.up-single__author span { display: block; color: var(--up-text); margin-bottom: .75rem; }
.up-single__author p:last-child { margin-bottom: 0; }

.up-single__tags { color: var(--up-primary); font-weight: 500; margin-top: 2rem; }

/* Table */
.up-single__table { border: 1px solid var(--up-line); border-radius: var(--up-radius); }
.up-single__table table { --bs-table-border-color: var(--up-line); font-size: .9375rem; min-width: 480px; }
.up-single__table th { background: var(--up-soft); color: var(--up-navy); font-weight: 600; white-space: nowrap; }

/* FAQ accordion */
.up-faq { --bs-accordion-border-color: var(--up-line); --bs-accordion-border-radius: var(--up-radius); --bs-accordion-inner-border-radius: var(--up-radius);
  --bs-accordion-active-bg: var(--up-soft); --bs-accordion-active-color: var(--up-primary); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(112, 94, 221, .25); }
.up-faq .accordion-item { margin-bottom: .75rem; border-radius: var(--up-radius); overflow: hidden; }
.up-faq .accordion-button { font-weight: 500; color: var(--up-navy); font-size: 1.0625rem; }
.up-faq .accordion-button:not(.collapsed) { color: var(--up-primary); }
.up-faq .accordion-body { color: var(--up-text-strong); }

/* ---------- "Let's Talk" ---------- */
.up-single__talk { margin-top: 3rem; background: var(--up-soft); border-radius: var(--up-radius); overflow: hidden; }
.up-single__talk-body { padding: 1.5rem; }
@media (min-width: 768px) { .up-single__talk-body { padding: 2rem 2.5rem; } }
.up-single__talk-title { color: var(--up-navy); font-weight: 500; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); margin-bottom: .5rem; }

/* ---------- Related articles (same card as the blog listing) ---------- */
.up-related { padding: 3rem 0 4rem; border-top: 1px solid var(--up-line); }
@media (min-width: 992px) { .up-related { padding: 4.5rem 0 5.5rem; } }
.up-related__head { max-width: 720px; margin-bottom: 2rem; }
.up-related__eyebrow { color: var(--up-primary); font-weight: 500; margin: 0 0 .5rem; }
.up-related__title { color: var(--up-navy); font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); margin: 0 0 .75rem; }
.up-related__intro { color: var(--up-text); margin: 0; }

.up-rcard { display: flex; flex-direction: column; position: relative; }
.up-rcard__img { --bs-aspect-ratio: 89.6%; /* 444 × 398 */ border-radius: var(--up-radius); overflow: hidden; background: var(--up-soft); }
.up-rcard__img img { transition: transform .4s ease; }
.up-rcard:hover .up-rcard__img img { transform: scale(1.04); }
.up-rcard__body { display: flex; flex-direction: column; flex: 1; gap: .5rem; padding-top: 1.5rem; }
.up-rcard__title { font-size: 1.25rem; line-height: 1.4; font-weight: 500; color: var(--up-text-strong); margin: 0; }
.up-rcard__title a { color: inherit; text-decoration: none; }
.up-rcard__title a:hover,
.up-rcard__title a:focus-visible { color: var(--up-primary); }
.up-rcard__text { color: var(--up-text); line-height: 1.625; margin: 0 0 .5rem; }
.up-rcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; }
.up-rcard__meta { color: var(--up-text); font-size: 1rem; }
.up-rcard__sep { margin: 0 .75rem; }
.up-rcard__arrow { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--up-soft); color: var(--up-navy); transition: background-color .2s, color .2s; }
.up-rcard:hover .up-rcard__arrow { background: var(--up-primary); color: #fff; }