/* Article layout and prose for /kennisbank posts.
   Linked by every post page; per-post extras stay in the page's own <style>. */

/* base.css sets `overflow-x: hidden` on html/body, which makes them scroll
   containers and stops the sidebar's `position: sticky` from ever engaging.
   `clip` gives the same overflow protection without creating a scrollport. */
html, body {
  overflow-x: clip;
}

/* ── Reading progress ───────────────────────────────────────────────────── */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #FFD12E;
  z-index: 300;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.blog-hero-section {
  background: linear-gradient(145deg, #0a1640 0%, #0F1F5C 55%, #0a1e6e 100%);
  padding: 48px 24px 56px;
  position: relative;
  overflow: hidden;
}
.blog-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── Two-column layout: article + sticky sidebar ────────────────────────── */
.blog-layout {
  max-width: 1148px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
}
/* The sidebar comes first in the source so it lands above the article on
   mobile (where it collapses into a plain table of contents). */
.blog-layout > .blog-aside { grid-column: 2; grid-row: 1; }
.blog-layout > .blog-article { grid-column: 1; grid-row: 1; }

/* ── Article prose ──────────────────────────────────────────────────────── */
.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  font-size: 16px;
  color: #3a4a6a;
  line-height: 1.75;
  counter-reset: blog-h2;
}
.blog-layout > .blog-article {
  max-width: none;
  margin: 0;
  padding: 0;
}
.blog-article h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0F1F5C;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  line-height: 1.25;
  scroll-margin-top: 74px;
  text-wrap: balance;
}
/* Short yellow rule above every top-level section heading. */
.blog-article > h2 {
  position: relative;
  padding-top: 17px;
}
.blog-article > h2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: #FFD12E;
}
/* Every linkable top-level section is numbered, and the sidebar mirrors the
   same sequence. Unnumbered sections (key box, samenvatting, bronnen) simply
   carry no id. */
.blog-article > h2[id] {
  counter-increment: blog-h2;
}
.blog-article > h2[id]::before {
  content: counter(blog-h2) ". ";
}
.blog-article h3 {
  font-size: 19px;
  font-weight: 700;
  color: #0F1F5C;
  margin: 32px 0 12px;
  line-height: 1.3;
  scroll-margin-top: 74px;
}
.blog-article p {
  margin-bottom: 18px;
}
.blog-article strong {
  color: #0F1F5C;
  font-weight: 700;
}
.blog-article a {
  color: #003CAA;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-article a:hover {
  color: #0F1F5C;
}

/* Lists. Only unclassed lists get the decorated markers, so per-post lists
   (.blog-checklist, .blog-source-list, …) keep their own styling. */
.blog-article ul, .blog-article ol {
  margin: 0 0 18px 24px;
  padding: 0;
}
.blog-article li {
  margin-bottom: 8px;
}
.blog-article ul:not([class]) {
  list-style: none;
  margin-left: 0;
}
.blog-article ul:not([class]) > li {
  position: relative;
  padding-left: 26px;
}
.blog-article ul:not([class]) > li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #003CAA;
}
.blog-article ol:not([class]) {
  list-style: none;
  margin-left: 0;
  counter-reset: blog-ol;
}
.blog-article ol:not([class]) > li {
  position: relative;
  padding-left: 30px;
  counter-increment: blog-ol;
}
/* Plain hanging number, same treatment as the numbered section headings. */
.blog-article ol:not([class]) > li::before {
  content: counter(blog-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  text-align: right;
  color: #0F1F5C;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Pull quote */
.blog-article blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 4px solid #FFD12E;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 500;
  font-style: italic;
  color: #0F1F5C;
  letter-spacing: -0.01em;
}
.blog-article blockquote p:last-child {
  margin-bottom: 0;
}
.blog-article blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  color: #8a96b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.blog-article blockquote cite::before { content: '— '; }

/* Media */
.blog-article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}
.blog-article figure {
  margin: 32px 0;
}
.blog-article figure img {
  margin: 0;
}
.blog-article figcaption {
  font-size: 13px;
  color: #8a96b8;
  margin-top: 10px;
  line-height: 1.5;
  text-align: center;
}

/* Tables */
.blog-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}
/* A wide table scrolls inside its wrapper, which on a phone hides whole columns
   with nothing on screen to say so. js/blog-article.js wraps each scrollable
   table in .blog-table-scroll and tracks which end you are at; the fade below is
   the only hint that there is more to the right. */
.blog-table-scroll {
  position: relative;
}
.blog-table-scroll::before,
.blog-table-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 1;
}
.blog-table-scroll::after {
  right: 0;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff 78%);
}
.blog-table-scroll::before {
  left: 0;
  background: linear-gradient(to left, rgba(255,255,255,0), #fff 78%);
}
.blog-table-scroll.is-scrollable:not(.at-end)::after { opacity: 1; }
.blog-table-scroll.is-scrollable:not(.at-start)::before { opacity: 1; }
/* Inserted by the same script, only for tables that actually overflow. */
.blog-table-hint {
  margin: -14px 0 24px;
  font-size: 12.5px;
  color: #8a96b8;
}
.blog-article table {
  width: 100%;
  min-width: 480px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  background: white;
  border: 1px solid #e8eaf5;
  border-radius: 12px;
  overflow: hidden;
}
.blog-article th,
.blog-article td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f8;
  vertical-align: top;
}
.blog-article th {
  background: #f8f9fd;
  color: #0F1F5C;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #e8eaf5;
}
.blog-article tbody tr:last-child td {
  border-bottom: none;
}
.blog-article td.num,
.blog-article th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Callouts ───────────────────────────────────────────────────────────── */
.blog-key-box {
  background: #0F1F5C;
  border-radius: 14px;
  padding: 24px 26px;
  margin: 28px 0;
  color: rgba(255,255,255,0.82);
}
.blog-key-box h2 {
  font-size: 13px !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FFD12E !important;
  margin: 0 0 12px !important;
}
.blog-key-box strong {
  color: white;
}
.blog-key-box a {
  color: #9dc0ff;
}
.blog-key-box a:hover {
  color: white;
}
.blog-key-box p:last-child,
.blog-key-box ul:last-child,
.blog-key-box ol:last-child {
  margin-bottom: 0;
}
/* The key box is navy, so the blue bullet needs to lighten to stay visible. */
.blog-key-box ul:not([class]) > li::before {
  background: #9dc0ff;
}

.blog-callout {
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0;
}
.blog-callout > strong:first-child {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-callout p:last-child,
.blog-callout ul:last-child,
.blog-callout ol:last-child {
  margin-bottom: 0;
}
.blog-callout--info {
  background: #eef4ff;
  border: 1px solid #d4dffb;
}
.blog-callout--info > strong:first-child { color: #003CAA; }
.blog-callout--warn {
  background: #fff5e6;
  border: 1px solid #ffe0b3;
}
.blog-callout--warn > strong:first-child { color: #b45309; }
.blog-callout--tip {
  background: #e8faf2;
  border: 1px solid #b9ecd4;
}
.blog-callout--tip > strong:first-child { color: #15803d; }

/* ── In-article CTA ─────────────────────────────────────────────────────── */
.blog-cta-box {
  background: linear-gradient(135deg, #0a1640 0%, #0F1F5C 100%);
  border-radius: 16px;
  padding: 32px;
  margin: 36px 0;
  color: white;
  text-align: center;
}
.blog-cta-box h3 {
  color: white;
  margin: 0 0 8px;
  font-size: 20px;
}
.blog-cta-box p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.blog-cta-box a {
  display: inline-block;
  background: #FFD12E;
  color: #0a1640;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.blog-aside {
  min-width: 0;
}
/* The grid uses align-items:start, so the sidebar column would otherwise be only
   as tall as its own content and the sticky block would scroll away with it. */
.blog-layout > .blog-aside {
  align-self: stretch;
}
.blog-aside-inner {
  position: sticky;
  top: 74px;
}
.blog-toc {
  background: white;
  border: 1px solid #e8eaf5;
  border-radius: 14px;
}
/* Padding lives on the summary rather than the card so the whole strip is a
   comfortable tap target on mobile, where the list starts collapsed. */
.blog-toc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0F1F5C;
}
.blog-toc > summary::-webkit-details-marker { display: none; }
.blog-toc > summary::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: #FFD12E;
  clip-path: polygon(0 8%, 100% 8%, 100% 26%, 0 26%, 0 46%, 100% 46%, 100% 64%, 0 64%, 0 84%, 62% 84%, 62% 100%, 0 100%);
}
.blog-toc > summary::after {
  content: '';
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid #aab0c8;
  border-bottom: 2px solid #aab0c8;
  transform: rotate(-135deg);
  transition: transform .15s;
}
.blog-toc:not([open]) > summary::after {
  transform: rotate(45deg);
}
.blog-toc ol {
  list-style: none;
  margin: 0;
  padding: 0 14px 14px;
  counter-reset: blog-toc;
  font-size: 13.5px;
  /* A 20-item list is taller than the viewport, so the list scrolls inside the
     sticky card rather than pushing the CTA off screen. */
  max-height: calc(100vh - 265px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.blog-toc ol::-webkit-scrollbar {
  width: 5px;
}
.blog-toc ol::-webkit-scrollbar-thumb {
  background: #d8def0;
  border-radius: 99px;
}
.blog-toc li {
  margin: 0 0 2px;
  counter-increment: blog-toc;
}
.blog-toc a {
  display: flex;
  gap: 10px;
  color: #5a6a8a;
  text-decoration: none;
  padding: 7px 10px 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
  font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.blog-toc a::before {
  content: counter(blog-toc);
  flex: 0 0 auto;
  min-width: 15px;
  font-size: 11px;
  font-weight: 800;
  color: #aab0c8;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.blog-toc a:hover {
  background: #f5f7fc;
  color: #0F1F5C;
}
.blog-toc a.is-active {
  background: #eef4ff;
  border-left-color: #003CAA;
  color: #003CAA;
  font-weight: 700;
}
.blog-toc a.is-active::before {
  color: #003CAA;
}
.blog-aside-cta {
  background: linear-gradient(135deg, #0a1640 0%, #0F1F5C 100%);
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
  color: white;
}
.blog-aside-cta strong {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #FFD12E;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-aside-cta p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
}
.blog-aside-cta a {
  display: block;
  background: #FFD12E;
  color: #0F1F5C;
  font-size: 13px;
  font-weight: 800;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
}

/* ── Author + prev/next (rendered into #okk-author-root) ────────────────── */
.blog-author {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e8eaf5;
}
.blog-author-card {
  background: white;
  border: 1px solid #e8eaf5;
  border-radius: 16px;
  padding: 26px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.blog-author-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD12E 0%, #ffba00 100%);
  color: #0F1F5C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}
/* Photo variant: the gradient stays as the backdrop if the image fails to load. */
.blog-author-avatar-photo {
  background: linear-gradient(150deg, #0F1F5C 0%, #0a1e6e 100%);
  overflow: hidden;
}
.blog-author-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-author-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #8a96b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.blog-author-name {
  font-size: 18px;
  font-weight: 800;
  color: #0F1F5C;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
/* The byline links to the author page when one exists; it should still read as
   the heading of the card rather than as body-copy link. */
.blog-author-name a {
  color: inherit;
  text-decoration: none;
}
.blog-author-name a:hover {
  color: #003CAA;
  text-decoration: underline;
}
.blog-author-bio {
  font-size: 14px;
  color: #5a6a8a;
  line-height: 1.6;
  margin: 0 0 12px;
}
.blog-author-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
}
.blog-author-links a {
  color: #003CAA;
  text-decoration: none;
}
.blog-author-links a:hover {
  text-decoration: underline;
}

.blog-prevnext {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.blog-prevnext a {
  background: white;
  border: 1px solid #e8eaf5;
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s, transform .15s;
}
.blog-prevnext a:hover {
  border-color: #d4dffb;
  transform: translateY(-2px);
}
.blog-prevnext-label {
  font-size: 11px;
  color: #8a96b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.blog-prevnext-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F1F5C;
  line-height: 1.3;
}
.blog-prevnext .blog-prevnext-next {
  text-align: right;
}

.blog-source-list {
  font-size: 14px;
  color: #8a96b8;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .blog-layout > .blog-aside,
  .blog-layout > .blog-article {
    grid-column: 1;
    grid-row: auto;
  }
  .blog-layout > .blog-aside { margin-bottom: 32px; }
  .blog-aside-inner { position: static; }
  .blog-aside-cta { display: none; }
  /* No sticky card to fit into here — the list expands in place. */
  .blog-toc ol { max-height: none; overflow-y: visible; }
}

@media (max-width: 640px) {
  .blog-hero-section { padding: 32px 16px 40px; }
  .blog-layout { padding: 32px 16px 48px; }
  .blog-article { padding: 32px 16px 48px; }
  .blog-layout > .blog-article { padding: 0; }
  .blog-article h2 { font-size: 20px; margin-top: 40px; }
  .blog-article h3 { font-size: 17px; }
  .blog-article > h2 { padding-top: 15px; }
  .blog-key-box { padding: 20px; }
  .blog-cta-box { padding: 24px 20px; }
  /* Tighter cells so a wide table hides as few columns as possible; the 480px
     floor is what pushed even four-column tables off screen. */
  .blog-article table { font-size: 13px; min-width: 0; }
  .blog-article th,
  .blog-article td { padding: 10px 7px; }
  .blog-article th { font-size: 10.5px; letter-spacing: 0.03em; }
  .blog-author-card { flex-direction: column; gap: 14px; padding: 22px; }
  .blog-prevnext { grid-template-columns: 1fr; }
  .blog-prevnext .blog-prevnext-next { text-align: left; }
}
