/* Article engagement kit (v3): series breadcrumb, rail CTA, one-liner, inline CTAs, newsletter, end wordmark. Loaded last. */

/* 1. breadcrumb: the series is the last crumb, shown on its own line as the series lockup */
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.crumb li { display: inline-flex; gap: 8px; }
.crumb li + li:not(.crumb__series)::before { content: "/"; opacity: .7; }
.crumb li.crumb__series { flex-basis: 100%; margin-top: 18px; }
.crumb__series a { font-family: var(--font-head); font-size: 22px; line-height: 1.2; font-weight: 400; letter-spacing: -.005em; color: #fff; }
.crumb__series a b { font-weight: 400; color: #B48CF2; }
.crumb__series a:hover { opacity: .85; }
.ahero .crumb { margin-bottom: 14px; }
.crumb--ink .crumb__series a, .chero .crumb__series a { color: var(--ink); }
.crumb--ink .crumb__series a b, .chero .crumb__series a b { color: var(--violet); }

/* 2. left rail: share, contents, then a CTA that arrives once the reader is past the opening */
.toc { gap: 14px; }
.toc .share--rail { margin: 0 0 10px; padding-bottom: 18px; border-bottom: 1px solid #EEF1F6; display: flex; align-items: center; gap: 12px; }
.toc .share--rail .toc__h { margin: 0; }
.toc .share--rail .share__list a { width: 34px; height: 34px; }
.rail-cta { margin-top: 18px; padding: 20px; border-radius: 16px; background: var(--ink); color: rgba(255,255,255,.78); display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
.rail-cta__k { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red-light); }
.rail-cta__t { font-family: var(--font-head); font-size: 17px; line-height: 1.35; font-weight: 500; color: #fff; }
.rail-cta .btn { justify-self: start; margin-top: 4px; padding: 10px 16px; font-size: 14px; }
.rail-cta--light { background: var(--warm); color: var(--ink-2); }
.rail-cta--light .rail-cta__k { color: var(--red); }
.rail-cta--light .rail-cta__t { color: var(--ink); }
.rail-cta__doc { display: flex; gap: 12px; align-items: center; }
.rail-cta__doc img { width: 64px; height: auto; border-radius: 8px; border: 1px solid rgba(16,24,40,.1); }
.rail-line { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.rail-line b { color: var(--violet); font-weight: 600; }
.rail-line:hover b { text-decoration: underline; text-underline-offset: 3px; }
@supports (animation-timeline: scroll()) {
  @media (min-width: 1001px) and (prefers-reduced-motion: no-preference) {
    .rail-cta, .rail-line { animation: railin linear both; animation-timeline: scroll(root); animation-range: 520px 820px; }
    @keyframes railin { from { opacity: 0; transform: translateY(14px); visibility: hidden; } to { opacity: 1; transform: none; visibility: visible; } }
  }
}
@media (max-width: 1000px) {
  .rail-cta, .rail-line { display: none; }
  .toc .share--rail { display: flex; }
}

/* 3. inline CTAs inside long educational articles */
.icta { margin: 48px 0 0; padding: 24px 26px; border-radius: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 28px; align-items: center; }
.icta__k { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.prose .icta__t { margin: 0; font-family: var(--font-head); font-size: 20px; line-height: 1.35; font-weight: 500; }
.prose .icta__d { margin: 4px 0 0; font-size: 15px; line-height: 1.55; }
.icta .btn { white-space: nowrap; }
.icta--demo { background: var(--ink); color: rgba(255,255,255,.78); }
.icta--demo .icta__k { color: var(--red-light); }
.icta--demo .icta__t { color: #fff; }
.icta--read { border: 1px solid #E4E7EC; background: #fff; }
.icta--read .icta__k { color: var(--red); }
.icta--read .icta__t { color: var(--ink); }
.icta--read .icta__go { font-size: 15px; font-weight: 600; color: var(--violet); white-space: nowrap; }
.icta--doc { background: var(--warm); }
.icta--doc .icta__k { color: var(--red); }
.icta--doc .icta__t { color: var(--ink); }
.prose .icta + h2, .prose .icta + section { margin-top: 64px; }
.prose section > .icta:last-child { margin-bottom: 0; }

/* 4. newsletter after the article */
.nl { margin-top: 40px; padding: 30px 30px 26px; border-radius: 20px; background: var(--ink); color: rgba(255,255,255,.78); }
.prose .nl h2 { margin: 0; font-size: 24px; line-height: 1.3; color: #fff; }
.prose .nl__d { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; }
.nl__f { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.nl__f input { min-width: 0; height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 15.5px; }
.nl__f input::placeholder { color: rgba(255,255,255,.55); }
.nl__f input:focus-visible { outline: 2px solid #C9B3EE; outline-offset: 2px; }
.nl__f button { height: 50px; padding: 0 24px; border: 0; border-radius: 999px; background: #fff; color: var(--violet); font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.nl__f button:hover { background: #F1EAFB; }
.prose .nl__x { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.55); }
.nl__x a { color: rgba(255,255,255,.8); text-decoration: underline; text-underline-offset: 2px; }

/* 5. end wordmark revealed behind the footer (CSS only: pinned to the viewport bottom under the page) */
main, .sf { position: relative; z-index: 1; }
main { background: var(--white); }
.endmark { position: sticky; bottom: 0; z-index: 0; height: clamp(180px, 22vw, 340px); display: grid; align-items: end; padding: 0 24px 28px; background: #0A0F1C; }
.endmark__w { width: 100%; aspect-ratio: 2400 / 252; background: linear-gradient(90deg, #5F27A8 0%, #7034C4 55%, #A56EF4 100%); -webkit-mask: url(images/cyfirma-wordmark.png) center / contain no-repeat; mask: url(images/cyfirma-wordmark.png) center / contain no-repeat; }

@media (max-width: 640px) {
  .icta, .icta--doc { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .nl { padding: 24px 20px; }
  .nl__f { grid-template-columns: minmax(0, 1fr); }
  .crumb__series a { font-size: 19px; }
}

/* urgent alert bar on the article header (replaces the alert line above the title) */
.abar { margin: -40px 0 32px; padding: 12px 0; background: var(--red); color: #fff; font-size: 14px; line-height: 1.4; font-weight: 500; }
.abar .container { display: flex; align-items: center; gap: 14px; }
.abar__act { flex: none; padding: 3px 10px; border-radius: 6px; background: #fff; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ahero:has(.abar) { overflow: hidden; }
@media (max-width: 760px) { .abar .container { flex-direction: column; align-items: flex-start; gap: 8px; } .abar { margin-top: -28px; } }
.btn--white { background: #fff; color: var(--ink); border-color: #fff; }
.btn--white:hover { background: #F1EAFB; border-color: #F1EAFB; }

/* ===== Dark mode (html[data-theme="dark"]) ===== */
/* intentionally-dark panels: pin background so the global --ink text-color
   flip doesn't lighten them — they already carry literal white/
   rgba(255,255,255,…) text. */
html[data-theme="dark"] .rail-cta,
html[data-theme="dark"] .icta--demo,
html[data-theme="dark"] .nl { background: #101828; }

/* .rail-cta--light and .icta--read/--doc use var(--warm) / literal #fff as a
   LIGHT surface with var(--ink) text on top — these need the card-surface
   swap, not the dark-panel pin above. */
html[data-theme="dark"] .rail-cta--light,
html[data-theme="dark"] .icta--read,
html[data-theme="dark"] .icta--doc { background: #1D2939; border-color: rgba(255,255,255,.1); }

/* .btn--white keeps its literal white background intentionally (it's the
   "secondary" button on a dark hero), but its text uses var(--ink), which
   flips to light in dark mode — pin the text dark so it stays readable on
   the still-white button. */
html[data-theme="dark"] .btn--white { color: #101828; }

/* share-rail icon border + rail divider are literal light-grey */
html[data-theme="dark"] .toc .share--rail { border-color: rgba(255,255,255,.12); }
