/* SERGEBOT blog v2 (index, topic, paging, post). Loaded after /site.css; header, footer,
   .wrap, .btn and .eyebrow come from site.css. Mobile first. No dependencies. */
.b2 { --b2-surface: #12121b; --b2-line: rgba(167,139,250,0.18); --b2-body: #dcdbe8; --b2-radius: 16px; --b2-measure: 68ch; }
.b2 a:focus-visible, .b2 summary:focus-visible, .b2 button:focus-visible { outline: 3px solid var(--violet-soft); outline-offset: 3px; border-radius: 6px; }
.b2-hero { padding: clamp(120px, 16vh, 160px) 0 8px; }
.b2-hero h1 { font-family: 'Sora', sans-serif; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--text); }
.b2-hero p { max-width: 60ch; font-size: 1.1rem; color: var(--b2-body); margin: 0; }
.b2-meta { font-size: .9rem; color: var(--muted); }
.b2-kicker { font-family: 'Fira Code', monospace; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); font-weight: 500; margin: 0; }

/* topic chips: real links, horizontal scroll on phones */
.b2-chips { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0 28px; margin: 0; list-style: none; scrollbar-width: none; }
.b2-chips::-webkit-scrollbar { display: none; }
.b2-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--b2-line); border-radius: 999px; color: var(--b2-body); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.b2-chip[aria-current] { background: var(--text); border-color: var(--text); color: #050508; }

/* featured + latest */
.b2-featured { display: grid; gap: 24px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--b2-line); border-radius: var(--b2-radius); background: linear-gradient(135deg, #1a1530, var(--b2-surface)); }
.b2-featured h2 { font-family: 'Sora', sans-serif; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin: 10px 0; }
.b2-featured h2 a { color: var(--text); text-decoration: none; }
.b2-featured p { color: var(--b2-body); margin: 0 0 12px; }
.b2-latest { list-style: none; margin: 8px 0 0; padding: 0; }
.b2-latest li { padding: 10px 0; border-bottom: 1px solid var(--b2-line); }
.b2-latest li:last-child { border-bottom: 0; }
.b2-latest a { color: var(--text); text-decoration: none; font-weight: 600; display: block; padding: 4px 0; }
@media (min-width: 900px) { .b2-featured { grid-template-columns: 1.25fr 1fr; gap: 40px; } .b2-latest-wrap { border-left: 1px solid var(--b2-line); padding-left: 28px; } }

/* subscribe card: inline Brevo form (v042, static/blog-subscribe.js) */
.b2-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 20px; margin: 28px 0; border: 1px solid var(--b2-line); border-radius: var(--b2-radius); background: var(--b2-surface); scroll-margin-top: 110px; }
.b2-sub h2 { margin: 0; line-height: 0; }
.b2-sub img { max-width: 100%; height: auto; }
.b2-sub p { margin: 8px 0 0; color: var(--b2-body); }
.b2-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.b2-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.b2-sub-text { flex: 1 1 300px; min-width: 0; }
.b2-sub-form { position: relative; margin: 0; min-width: 0; flex: 1 1 420px; max-width: 100%; container-type: inline-size; }
.b2-sub-row { display: flex; flex-direction: column; gap: 10px; }
.b2-sub-input { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid var(--line-active); border-radius: 999px; background: var(--bg-2); color: var(--text); font: 500 1rem/1.2 'Manrope', sans-serif; color-scheme: dark; transition: border-color .2s ease, box-shadow .2s ease; }
.b2-sub-input::placeholder { color: var(--muted); opacity: 1; }
.b2-sub-input:hover { border-color: var(--violet); }
.b2-sub-input:focus { outline: none; }
.b2-sub-input:focus-visible { outline: 3px solid var(--violet-soft); outline-offset: 2px; border-color: var(--violet); }
.b2-sub-input[aria-invalid="true"] { border-color: var(--danger); }
.b2-sub-form .subscribe-btn { min-height: 48px; padding: 12px 22px; font-size: .95rem; white-space: nowrap; }
.b2-sub-form .subscribe-btn:disabled { opacity: .6; cursor: progress; transform: none; }
.b2 .b2-sub-status { margin: 10px 4px 0; min-height: 1.5em; font-size: .95rem; color: var(--b2-body); }
.b2 .b2-sub-status:empty { margin-top: 0; min-height: 0; }
.b2 .b2-sub-status.is-ok { color: #34d399; }
.b2 .b2-sub-status.is-error { color: #ff8a8a; }
.b2-sub-note { margin: 10px 4px 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }
@container (min-width: 400px) { .b2-sub-row { flex-direction: row; } .b2-sub-input { flex: 1 1 auto; min-width: 0; } .b2-sub-form .subscribe-btn { flex: 0 0 auto; } }
@media (min-width: 700px) { .b2-sub { padding: 24px 32px; } }
@media (forced-colors: active) { .b2-sub-input { border-color: CanvasText; } .b2-sub-input:focus-visible { outline-color: Highlight; } }
@media (prefers-reduced-motion: reduce) { .b2-sub-input { transition: none; } }

/* card grid */
.b2-list-title { font-family: 'Sora', sans-serif; font-size: 1.4rem; margin: 36px 0 0; color: var(--text); }
.b2-grid { display: grid; grid-template-columns: 1fr; gap: 18px; list-style: none; margin: 20px 0 28px; padding: 0; }
@media (min-width: 640px) { .b2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .b2-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.b2-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--b2-line); border-radius: var(--b2-radius); background: var(--b2-surface); }
.b2-card h3 { font-family: 'Sora', sans-serif; font-size: 1.12rem; line-height: 1.3; margin: 0; }
.b2-card h3 a { color: var(--text); text-decoration: none; }
.b2-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--b2-radius); }
.b2-card p { margin: 0; color: var(--b2-body); font-size: .97rem; }
.b2-card .b2-meta { margin-top: auto; }
@media (hover: hover) and (pointer: fine) {
  .b2-card { transition: transform .2s cubic-bezier(0,0,.2,1), border-color .2s; }
  .b2-card:hover { transform: translateY(-2px); border-color: var(--violet); }
}
.b2-pager { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 8px 0 48px; padding: 0; list-style: none; }
.b2-pager a, .b2-pager span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--b2-line); color: var(--b2-body); text-decoration: none; font-weight: 600; }
.b2-pager [aria-current] { background: var(--text); color: #050508; border-color: var(--text); }

/* hub clusters (kept from v040) */
.hub-clusters { padding: 8px 0 56px; }
.hub-clusters .wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .hub-clusters .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cluster-title { font-family: 'Sora', sans-serif; font-size: 1rem; color: var(--text); margin: 0 0 10px; }
.cluster-list { list-style: none; margin: 0; padding: 0; }
.cluster-list a { display: block; padding: 8px 0; color: var(--b2-body); text-decoration: none; }
.cluster-list a:hover { color: var(--violet-soft); }

/* post page */
.b2-crumbs { font-size: .9rem; color: var(--muted); padding-top: clamp(110px, 15vh, 150px); }
.b2-crumbs a { color: var(--muted); display: inline-block; padding: 10px 0; }
.b2-head { max-width: var(--b2-measure); padding: 8px 0 20px; }
.b2-head h1 { font-family: 'Sora', sans-serif; font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 18px; color: var(--text); }
.b2-byline { display: flex; align-items: center; gap: 12px; }
.b2-byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; }
.b2-byline a { color: var(--text); font-weight: 700; text-decoration: none; }
.post-illustrative-note { margin: 18px 0 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.post-illustrative-note .example-badge { display: inline-block; margin: 0 8px 4px 0; padding: 1px 8px; border: 1px solid rgba(196,181,253,.6); border-radius: 999px; background: rgba(167,139,250,.16); color: #c4b5fd; font-family: 'Fira Code', monospace; font-size: 12px; line-height: 1.5; }
.b2-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 56px; }
@media (min-width: 1000px) { .b2-layout { grid-template-columns: minmax(0, var(--b2-measure)) 240px; } }
.b2-prose { min-width: 0; font-size: 1.125rem; line-height: 1.75; color: var(--b2-body); overflow-wrap: break-word; }
.b2-prose > p:first-of-type.lead, .b2-prose .lead { border-left: 4px solid var(--violet); background: var(--b2-surface); padding: 16px 20px; border-radius: 0 var(--b2-radius) var(--b2-radius) 0; color: var(--text); }
.b2-prose h2 { font-family: 'Sora', sans-serif; font-size: 1.55rem; line-height: 1.25; color: var(--text); margin: 44px 0 12px; scroll-margin-top: 110px; }
.b2-prose h3 { font-family: 'Sora', sans-serif; font-size: 1.2rem; color: var(--text); margin: 28px 0 8px; }
.b2-prose a { color: var(--violet-soft); text-underline-offset: 3px; }
.b2-prose strong { color: var(--text); }
.b2-prose li { margin: 8px 0; }
.b2-prose table { border-collapse: collapse; width: 100%; font-size: .97rem; }
.b2-prose th, .b2-prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--b2-line); }
.b2-prose th { color: var(--text); background: var(--b2-surface); }
.b2-tbl { overflow-x: auto; border: 1px solid var(--b2-line); border-radius: var(--b2-radius); margin: 20px 0; }
.b2-faq details { border-bottom: 1px solid var(--b2-line); }
.b2-faq summary { min-height: 44px; padding: 12px 0; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--text); cursor: pointer; }
.b2-faq details p { margin: 0 0 16px; }
.def-block { margin: 8px 0 32px; padding: 20px 22px; background: rgba(167,139,250,.06); border: 1px solid var(--b2-line); border-left: 3px solid var(--violet); border-radius: 12px; }
.def-block p { margin-bottom: 0; color: var(--text); }
.def-kicker { font-family: 'Fira Code', monospace; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); font-weight: 600; display: block; margin-bottom: 10px; }
.post-source { margin-top: 28px; font-size: .95rem; color: var(--muted); }
.b2-toc-m { border: 1px solid var(--b2-line); border-radius: var(--b2-radius); padding: 0 16px; margin: 0 0 24px; }
.b2-toc-m summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--text); cursor: pointer; }
.b2-toc ol, .b2-toc-m ol { list-style: none; margin: 8px 0 12px; padding: 0; font-size: .95rem; }
.b2-toc a, .b2-toc-m a { display: block; padding: 8px 0; color: var(--muted); text-decoration: none; line-height: 1.4; }
.b2-toc a:hover, .b2-toc-m a:hover { color: var(--text); }
/* TOC sidebar CTA: .b2-toc a was overriding .btn-primary color and centering (muted, display:block, padding 8px 0). */
.b2-toc .btn, .b2-toc-m .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--bg);
  padding: 10px 20px;
}
.b2-toc .btn:hover, .b2-toc-m .btn:hover,
.b2-toc .btn:focus-visible, .b2-toc-m .btn:focus-visible {
  color: var(--bg);
}
.b2-toc { display: none; }
@media (min-width: 1000px) {
  .b2-toc { display: block; position: sticky; top: 120px; border-left: 1px solid var(--b2-line); padding-left: 20px; }
  .b2-toc-m { display: none; }
}
.b2-author { display: flex; gap: 16px; align-items: center; padding: 20px; margin: 44px 0 0; border: 1px solid var(--b2-line); border-radius: var(--b2-radius); background: var(--b2-surface); }
.b2-author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.b2-author p { margin: 4px 0 0; font-size: .97rem; line-height: 1.5; }
.b2-author a { color: var(--text); text-decoration: none; }
.b2-next-title { font-family: 'Sora', sans-serif; font-size: 1.3rem; color: var(--text); margin: 40px 0 0; }
.b2-next { grid-template-columns: 1fr !important; }
@media (min-width: 700px) { .b2-next { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .b2-next .b2-card h3 { font-size: 1rem; } }
.b2-cta { margin: 12px 0 0; padding: 24px; border: 1px solid var(--b2-line); border-radius: var(--b2-radius); background: linear-gradient(135deg, #1a1530, var(--b2-surface)); }
.b2-cta h3 { font-family: 'Sora', sans-serif; margin: 0 0 8px; color: var(--text); font-size: 1.25rem; }
.b2-cta p { margin: 0 0 16px; font-size: 1rem; }
.b2 .btn { min-height: 44px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .b2-card { transition: none; } .b2-card:hover { transform: none; } }
.b2-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 !important; }
/* QA fixes 2026-10-30: in-text links underlined (axe link-in-text-block), 44px crumb and mobile TOC targets,
   long CTA labels wrap at 320/390, footer fine print lifted to --muted for 4.5:1 (live site.css --faint fails axe; blog pages only). */
.b2-prose p a, .b2-prose li a, .b2-prose td a { text-decoration: underline; text-decoration-thickness: 1px; }
.b2-crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
.b2-toc-m a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; }
.b2 .b2-cta .btn { white-space: normal; text-align: center; max-width: 100%; }
footer .copy, footer .copy span, footer .copy a { color: var(--muted); }
