/*
  PegaBook shared styles. Used by the generated topic pages (pegabook/entries/<slug>/index.html),
  chapter pages (pegabook/chapters/<id>/index.html) and meant to be reused by the PegaBook listing page (pegabook/index.html).
  Palette and type follow the site (paper/ink, serif headings, system sans), light and dark.

  Theme: set data-theme="light|dark" on <html> (pegabook.js does this, stored in localStorage "theme",
  shared with the mentoring pages). Without JS the OS preference is used.

  Layout
    .pb-topbar > .pb-container.pb-topbar-inner   sticky top bar
      .pb-brand            site link (Aman Rawat)
      .pb-section-link     link to /pegabook/ (section name)
      .pb-topbar-actions   right side; holds .pb-theme-button (id="pb-theme-toggle")
    .pb-container          centred column (max 1120px); add .pb-narrow for reading width (760px)
    .pb-page               main padding
    .pb-footer             page footer; .pb-footer-note for the Pegasystems note
  Book navigation (PegaBook = chapters of topics)
    .pb-breadcrumbs > ol > li   "PegaBook / Chapter n: title"; current item is <span aria-current="page">
    .pb-pager              chapter nav; .pb-pager-link (.pb-pager-prev / .pb-pager-next),
                           .pb-pager-dir, .pb-pager-title, .pb-pager-gap (empty side),
                           .pb-pager-all (link back to the chapter list)
    .pb-toc                numbered topic list on chapter pages (and usable on the listing page):
                           .pb-toc-item > a.pb-toc-link > .pb-toc-num + .pb-toc-body
                           (.pb-toc-title, .pb-toc-summary, .pb-toc-meta)
  Topic header
    .pb-back               plain back link to /pegabook/ (optional; topic pages use .pb-breadcrumbs)
    .pb-eyebrow            small uppercase label ("Topic 1.2 · Security", "Chapter 1")
    .pb-title              h1
    .pb-summary            lead paragraph
    .pb-meta               ul of meta items (li); .pb-meta-sep is not needed, separators are CSS
    .pb-tags > .pb-tag     tag chips
    .pb-draft-banner       shown on draft pages generated with --drafts
  Video
    .pb-video              16:9 frame
    .pb-video-facade       <button data-youtube-id data-title> with .pb-video-thumb <img> and .pb-play
    .pb-video iframe       inserted by pegabook.js on click
    .pb-video-soon         calm "Video coming soon" card when there is no youtubeId
  Content
    .pb-section            content block; .pb-section-title its h2
    .pb-prose              free text (topic description): p, ul, ol
    .pb-list               bullet list (learn, prerequisites, key points)
    .pb-steps > .pb-step   ordered chapters; .pb-step-head, .pb-step-num, .pb-step-title, .pb-step-body
    .pb-time               timestamp link (<a data-seek="seconds">), seeks the player
    .pb-empty              friendly empty state (e.g. steps not written yet)
    .pb-resources          link list
  Cards (related entries and listing grid)
    .pb-cards              responsive grid
    .pb-card               <a> card; .pb-card-thumb (img or .pb-card-thumb-empty), .pb-card-body,
                           .pb-card-topic, .pb-card-title, .pb-card-summary, .pb-card-meta
  Controls
    .pb-btn                pill button/link (44px); .pb-btn-primary, .pb-btn-ghost
    .pb-share              row of share buttons
    .pb-toast              live status message (role="status")
    .pb-chip               filter chip (listing page); [aria-pressed="true"] = selected
    .pb-visually-hidden    screen-reader only text
*/

:root {
  color-scheme: light;
  --pb-paper: #fbfaf7;
  --pb-surface: #fff;
  --pb-tint: #f3f1ec;
  --pb-ink: #16181d;
  --pb-ink-2: #4a4f59;
  --pb-ink-3: #626875;
  --pb-line: #e4e1da;
  --pb-accent: #1f4fd1;
  --pb-accent-hover: #173da6;
  --pb-soft: #e8eefc;
  --pb-focus: #1f4fd1;
  --pb-warn-bg: #fff4e5;
  --pb-warn-ink: #8a3b00;
  --pb-shadow: 0 18px 54px -40px rgba(20, 29, 55, .32);
  --pb-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --pb-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --pb-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --pb-paper: #15171c; --pb-surface: #202329; --pb-tint: #292d35; --pb-ink: #f5f4f0; --pb-ink-2: #c4c7cf;
    --pb-ink-3: #aab0bb; --pb-line: #3a3e47; --pb-accent: #91b1ff; --pb-accent-hover: #b2c8ff; --pb-soft: #273c68;
    --pb-focus: #b2c8ff; --pb-warn-bg: #3a2a14; --pb-warn-ink: #ffcf99; --pb-shadow: 0 18px 54px -40px rgba(0, 0, 0, .9);
  }
}
[data-theme="dark"] {
  color-scheme: dark;
  --pb-paper: #15171c; --pb-surface: #202329; --pb-tint: #292d35; --pb-ink: #f5f4f0; --pb-ink-2: #c4c7cf;
  --pb-ink-3: #aab0bb; --pb-line: #3a3e47; --pb-accent: #91b1ff; --pb-accent-hover: #b2c8ff; --pb-soft: #273c68;
  --pb-focus: #b2c8ff; --pb-warn-bg: #3a2a14; --pb-warn-ink: #ffcf99; --pb-shadow: 0 18px 54px -40px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--pb-paper); color: var(--pb-ink); font: 17px/1.65 var(--pb-sans); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol { margin-top: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pb-focus); outline-offset: 3px; border-radius: 6px; }
.pb-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pb-skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--pb-ink); color: var(--pb-paper); text-decoration: none; font-weight: 600; }
.pb-skip:focus { top: 12px; }

.pb-container { width: min(100% - 40px, 1120px); margin-inline: auto; }
.pb-narrow { width: min(100% - 40px, 760px); }

/* top bar */
.pb-topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--pb-paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--pb-line); }
.pb-topbar-inner { min-height: 64px; display: flex; align-items: center; gap: 14px; }
.pb-brand, .pb-section-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; white-space: nowrap; }
.pb-brand { font-weight: 680; }
.pb-section-link { color: var(--pb-ink-2); border-left: 1px solid var(--pb-line); padding-left: 14px; font-family: var(--pb-serif); font-size: 18px; }
.pb-brand:hover, .pb-section-link:hover { color: var(--pb-accent); }
.pb-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* buttons */
.pb-btn, .pb-theme-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--pb-line); background: var(--pb-surface); color: var(--pb-ink); font: 600 14px/1 var(--pb-sans); text-decoration: none; white-space: nowrap; transition: border-color .15s, background-color .15s, transform .15s; }
.pb-btn:hover, .pb-theme-button:hover { border-color: var(--pb-accent); }
.pb-btn svg { width: 18px; height: 18px; flex: none; }
.pb-btn-primary { background: var(--pb-ink); border-color: var(--pb-ink); color: var(--pb-paper); }
.pb-btn-primary:hover { background: var(--pb-accent); border-color: var(--pb-accent); color: #fff; }
.pb-btn-ghost { background: transparent; }
.pb-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pb-line); background: var(--pb-surface); color: var(--pb-ink-2); font-size: 14px; font-weight: 600; }
.pb-chip:hover { border-color: var(--pb-accent); color: var(--pb-ink); }
.pb-chip[aria-pressed="true"] { background: var(--pb-ink); border-color: var(--pb-ink); color: var(--pb-paper); }

/* page */
.pb-page { padding: clamp(28px, 5vw, 64px) 0 96px; }
.pb-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 0 18px -4px; padding: 0 4px; color: var(--pb-ink-2); font-size: 15px; font-weight: 600; text-decoration: none; }
.pb-back:hover { color: var(--pb-accent); }
.pb-eyebrow { margin: 0 0 12px; color: var(--pb-accent); font-size: 12.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.pb-title { margin: 0 0 16px; font: 400 clamp(32px, 5vw, 54px)/1.1 var(--pb-serif); letter-spacing: -.02em; text-wrap: balance; }
.pb-summary { margin: 0 0 20px; color: var(--pb-ink-2); font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; }
.pb-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 16px; padding: 0; list-style: none; color: var(--pb-ink-3); font-size: 14.5px; }
.pb-meta li { display: inline-flex; align-items: center; }
.pb-meta li + li::before { content: "·"; margin: 0 10px; color: var(--pb-line); font-weight: 700; }
.pb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.pb-tag { padding: 4px 11px; border-radius: 999px; background: var(--pb-tint); color: var(--pb-ink-2); font-size: 13px; font-weight: 600; }
.pb-draft-banner { margin: 0 0 24px; padding: 12px 16px; border-radius: 14px; background: var(--pb-warn-bg); color: var(--pb-warn-ink); font-size: 14.5px; font-weight: 600; }

/* video */
.pb-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 40px; border-radius: 20px; overflow: hidden; background: #0b0c0f; border: 1px solid var(--pb-line); box-shadow: var(--pb-shadow); }
.pb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pb-video-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #0b0c0f; display: block; }
.pb-video-facade:focus-visible { outline-offset: -4px; border-radius: 20px; }
.pb-video-thumb { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s, transform .4s; }
.pb-video-facade:hover .pb-video-thumb { opacity: 1; transform: scale(1.015); }
.pb-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(15, 17, 22, .78); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: background-color .2s, transform .2s; }
.pb-play svg { width: 30px; height: 30px; margin-left: 4px; fill: #fff; }
.pb-video-facade:hover .pb-play, .pb-video-facade:focus-visible .pb-play { background: #e62117; transform: scale(1.06); }
.pb-video-label { position: absolute; left: 16px; bottom: 14px; right: 16px; color: #fff; font-size: 13.5px; font-weight: 600; text-align: left; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.pb-video-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: auto; min-height: 220px; padding: 36px 24px; background: var(--pb-tint); color: var(--pb-ink-2); text-align: center; box-shadow: none; }
.pb-video-soon svg { width: 40px; height: 40px; stroke: var(--pb-ink-3); fill: none; stroke-width: 1.6; }
.pb-video-soon strong { color: var(--pb-ink); font: 400 24px/1.2 var(--pb-serif); }
.pb-video-soon p { margin: 0; max-width: 420px; font-size: 15px; }

/* sections */
.pb-section { margin: 0 0 40px; }
.pb-section-title { margin: 0 0 14px; font: 400 clamp(24px, 2.4vw, 30px)/1.2 var(--pb-serif); letter-spacing: -.015em; }
.pb-list { margin: 0; padding-left: 1.2em; color: var(--pb-ink-2); }
.pb-list li { margin: 0 0 8px; padding-left: 4px; }
.pb-list li::marker { color: var(--pb-accent); }
.pb-steps { margin: 0; padding: 0; list-style: none; counter-reset: pbstep; }
.pb-step { position: relative; margin: 0 0 14px; padding: 20px 22px; border: 1px solid var(--pb-line); border-radius: 18px; background: var(--pb-surface); }
.pb-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; }
.pb-step-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--pb-soft); color: var(--pb-accent); font-size: 14px; font-weight: 700; }
.pb-step-title { flex: 1 1 200px; margin: 0; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.pb-step-body { color: var(--pb-ink-2); }
.pb-step-body p { margin: 0 0 10px; }
.pb-step-body p:last-child { margin-bottom: 0; }
.pb-time { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--pb-line); color: var(--pb-accent); font: 600 13.5px/1 var(--pb-mono); text-decoration: none; }
.pb-time:hover { border-color: var(--pb-accent); background: var(--pb-soft); }
.pb-time svg { width: 12px; height: 12px; fill: currentColor; }
.pb-empty { padding: 22px 24px; border: 1px dashed var(--pb-line); border-radius: 18px; background: var(--pb-tint); color: var(--pb-ink-2); }
.pb-empty strong { display: block; margin-bottom: 4px; color: var(--pb-ink); }
.pb-empty p { margin: 0; }
.pb-resources { margin: 0; padding: 0; list-style: none; }
.pb-resources li { border-bottom: 1px solid var(--pb-line); }
.pb-resources a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 2px; color: var(--pb-ink); font-weight: 600; text-decoration: none; }
.pb-resources a:hover { color: var(--pb-accent); }
.pb-resources a::after { content: "↗"; color: var(--pb-ink-3); }

.pb-prose { color: var(--pb-ink-2); }
.pb-prose p { margin: 0 0 14px; }
.pb-prose ul, .pb-prose ol { margin: 0 0 14px; padding-left: 1.3em; }
.pb-prose li { margin: 0 0 6px; padding-left: 4px; }
.pb-prose li::marker { color: var(--pb-accent); }
.pb-prose > :last-child { margin-bottom: 0; }
.pb-prose code,
.pb-prose a code {
    font: 700 14px/1.2 var(--pb-mono);
    background: var(--pb-surface);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--pb-ink);
    font-size: 0.85em;
    break-inside: avoid;
}

/* breadcrumbs */
.pb-breadcrumbs { margin: 0 0 18px; font-size: 15px; }
.pb-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.pb-breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.pb-breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: var(--pb-ink-3); }
.pb-breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pb-ink-2); font-weight: 600; text-decoration: none; }
.pb-breadcrumbs a:hover { color: var(--pb-accent); text-decoration: underline; text-underline-offset: 3px; }
.pb-breadcrumbs [aria-current="page"] { color: var(--pb-ink-3); }

/* previous / next */
.pb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 0; padding-top: 28px; border-top: 1px solid var(--pb-line); }
.pb-pager-link { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 16px 18px; border: 1px solid var(--pb-line); border-radius: 18px; background: var(--pb-surface); text-decoration: none; transition: border-color .15s; }
.pb-pager-link:hover { border-color: var(--pb-accent); }
.pb-pager-next { text-align: right; }
.pb-pager-dir { color: var(--pb-ink-3); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pb-pager-title { color: var(--pb-ink); font-weight: 600; line-height: 1.35; }
.pb-pager-all {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--pb-line);
  border-radius: 999px;
  background: var(--pb-surface);
  color: var(--pb-ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .15s;
}
.pb-pager-all:hover { border-color: var(--pb-accent); }

/* chapter topic list */
.pb-toc { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.pb-toc-link { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--pb-line); border-radius: 18px; background: var(--pb-surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.pb-toc-link:hover { border-color: var(--pb-accent); transform: translateY(-2px); }
.pb-toc-num { flex: none; min-width: 44px; padding: 6px 10px; border-radius: 999px; background: var(--pb-soft); color: var(--pb-accent); font: 700 14px/1.2 var(--pb-mono); text-align: center; }
.pb-toc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pb-toc-title { color: var(--pb-ink); font-size: 18px; font-weight: 650; line-height: 1.35; letter-spacing: -.01em; }
.pb-toc-summary { color: var(--pb-ink-2); font-size: 15px; line-height: 1.5; }
.pb-toc-meta { color: var(--pb-ink-3); font-size: 13.5px; }

/* share */
.pb-share { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-toast { min-height: 1.5em; margin: 10px 0 0; color: var(--pb-ink-3); font-size: 14px; }

/* cards */
  .pb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
  .pb-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--pb-line); border-radius: 20px; background: var(--pb-surface); color: inherit; text-decoration: none; box-shadow: var(--pb-shadow); transition: transform .2s, border-color .2s; }
  .pb-card:hover { transform: translateY(-3px); border-color: var(--pb-accent); }
  .pb-card-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--pb-tint); overflow: hidden; }
  .pb-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .pb-card-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--pb-ink-3); font-size: 13.5px; font-weight: 600; }
  .pb-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
  .pb-card-topic { color: var(--pb-accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .pb-card-title { margin: 0; font-size: 17.5px; line-height: 1.35; letter-spacing: -.01em; }
  .pb-card-summary { margin: 0; color: var(--pb-ink-2); font-size: 14.5px; line-height: 1.5; }
  .pb-card-meta { margin-top: auto; padding-top: 6px; color: var(--pb-ink-3); font-size: 13px; }

  /* subtopics (In this video) */
  .pb-subtopics { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
  .pb-subtopic { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--pb-line); border-radius: 14px; background: var(--pb-surface); transition: border-color .15s; }
  .pb-subtopic:hover { border-color: var(--pb-accent); }
  .pb-subtopic-num { flex: none; min-width: 36px; padding: 4px 8px; border-radius: 999px; background: var(--pb-soft); color: var(--pb-accent); font: 700 13px/1.2 var(--pb-mono); text-align: center; }
  .pb-subtopic-title { flex: 1; color: var(--pb-ink); font-size: 16px; line-height: 1.4; }
  .pb-subtopic-text { flex: 1; color: var(--pb-ink-2); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pb-subtopic .pb-time { flex: none; margin-left: auto; }

  /* practical use case */
  .pb-usecase { padding: 20px 24px; border: 1px solid var(--pb-line); border-radius: 18px; background: var(--pb-surface); }
  .pb-usecase-title { margin: 0 0 12px; color: var(--pb-accent); font: 400 clamp(20px, 2vw, 24px)/1.2 var(--pb-serif); letter-spacing: -.015em; }
  .pb-usecase p { margin: 0; color: var(--pb-ink-2); }

  /* footer */
.pb-footer { border-top: 1px solid var(--pb-line); padding: 28px 0 40px; color: var(--pb-ink-3); font-size: 14px; }
.pb-footer .pb-container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.pb-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.pb-footer-note { margin: 0; align-self: center; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .pb-container, .pb-narrow { width: min(100% - 32px, 1120px); }
  .pb-topbar-inner { gap: 10px; }
  .pb-section-link { padding-left: 10px; font-size: 16px; }
  .pb-theme-button { padding: 0 12px; font-size: 13px; }
  .pb-video { border-radius: 14px; margin-inline: -4px; }
  .pb-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .pb-step { padding: 16px; }
  .pb-share .pb-btn { flex: 1 1 140px; }
  .pb-pager { grid-template-columns: 1fr; }
  .pb-pager-gap { display: none; }
  .pb-pager-next { text-align: left; }
  .pb-toc-link { flex-direction: column; gap: 10px; padding: 16px; }
}
@media (max-width: 380px) {
  .pb-brand { display: none; }
  .pb-section-link { border-left: 0; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .pb-card:hover, .pb-toc-link:hover, .pb-video-facade:hover .pb-video-thumb, .pb-video-facade:hover .pb-play { transform: none; }
}
@media print {
  .pb-topbar, .pb-share, .pb-video, .pb-footer, .pb-pager { display: none; }
}

/* chapter cover */
.pb-cover { margin: 0 0 28px; overflow: hidden; border-radius: 20px; border: 1px solid var(--pb-line); background: var(--pb-surface); }
.pb-cover img { display: block; width: 100%; height: auto; }
.pb-cover figcaption { padding: 12px 18px; color: var(--pb-ink-3); font-size: 14px; }

/* article body */
.pb-article { max-width: 720px; }
.pb-article-h { margin: 44px 0 12px; font: 400 clamp(26px, 3vw, 32px)/1.2 var(--pb-serif); letter-spacing: -.01em; scroll-margin-top: 80px; }
.pb-article > .pb-article-h:first-child { margin-top: 8px; }
.pb-article p, .pb-article li { font-size: 17px; line-height: 1.7; }
.pb-article ul, .pb-article ol { padding-left: 1.3em; margin: 0 0 18px; }
.pb-article li { margin-bottom: 8px; }
.pb-figure { margin: 26px 0 30px; border: 1px solid var(--pb-line); border-radius: 18px; overflow: hidden; background: #f4f6fb; }
.pb-figure img { display: block; width: 100%; height: auto; }
.pb-figure figcaption { padding: 10px 16px 12px; background: var(--pb-surface); border-top: 1px solid var(--pb-line); color: var(--pb-ink-3); font-size: 14px; }
.pb-toc { max-width: 720px; margin: 0 0 8px; padding: 18px 22px; border: 1px solid var(--pb-line); border-radius: 16px; background: var(--pb-surface); }
.pb-toc ol { margin: 8px 0 0; padding-left: 1.3em; }
.pb-toc li { margin: 4px 0; }
.pb-toc a { color: var(--pb-accent); text-decoration: none; }
.pb-toc a:hover { text-decoration: underline; }

/* "In Pega" callout */
.pb-callout { display: grid; gap: 6px; margin: 22px 0; padding: 16px 20px 16px 22px; border-left: 4px solid var(--pb-accent); border-radius: 4px 14px 14px 4px; background: var(--pb-tint); }
.pb-callout-tag { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--pb-accent); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pb-callout p { margin: 0; font-size: 16px; line-height: 1.6; }

/* download button inside articles */
.pb-download { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; background: var(--pb-accent); color: #fff !important; font-weight: 650; text-decoration: none !important; }
.pb-download::before { content: "\2193"; font-weight: 700; }
.pb-download:hover { filter: brightness(1.08); }

/* Shared site header (same markup and styles as the main site) */
body { padding-top: 57px; }
.legacy-nav, .legacy-mobile { --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Helvetica, Arial, sans-serif; }
.pb-footer .pb-theme-button { margin-bottom: 14px; }
@media print { .legacy-nav, .legacy-mobile { display: none; } body { padding-top: 0; } }

/* Coming-soon chapter pages */
.pb-cover-soon { position: relative; }
.pb-soon-badge { position: absolute; left: 16px; top: 16px; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #3b3f9a; font: 700 12.5px/1.4 var(--pb-sans); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 18px -8px rgba(15, 17, 40, .5); }
.pb-soon { margin: 22px 0 0; padding: 18px 22px; border: 1px solid var(--pb-line); border-left: 4px solid var(--pb-accent); border-radius: 14px; background: var(--pb-tint); }
.pb-soon strong { display: block; margin-bottom: 4px; color: var(--pb-ink); font-size: 17px; }
.pb-soon p { margin: 0; color: var(--pb-ink-2); font-size: 15.5px; line-height: 1.55; }
