/* Kennis (nl) and Blog (en): overview, tag and article pages. Builds on site.css and its tokens. */

.article-page,
.section-page {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem));
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

/* ---------- Breadcrumb ---------- */

.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0; font-size: 0.8125rem; color: var(--text-3); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; margin: 0 0.6rem; color: var(--line-strong); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); }
.crumbs [aria-current] { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32ch; }

/* ---------- Article header ---------- */

.article { max-width: 46rem; }
.article-head { margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.article-title { font-size: clamp(2rem, 5.2vw, 3.75rem); overflow-wrap: break-word; }
.article-lede {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: clamp(1.1875rem, 1.9vw, 1.4375rem);
  line-height: 1.45;
  color: var(--text);
  max-width: 40ch;
  text-wrap: pretty;
}
.article-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-3);
}
.article-meta span + span::before { content: "·"; margin-right: 1.25rem; color: var(--line-strong); }

.byline {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.25rem;
  font-size: 0.9375rem;
}
.byline-name { font-weight: 620; font-stretch: 112%; color: var(--text); }
.byline-bio { color: var(--text-2); max-width: 60ch; }
.byline-bio a { color: var(--text); white-space: nowrap; }

.draft-note,
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  background: var(--gold);
  border-radius: 999px;
}
.draft-note { margin-bottom: 1.25rem; padding: 0.4rem 0.85rem; }
.badge { margin-left: 0.5rem; padding: 0.15rem 0.55rem; vertical-align: 0.1em; }

/* Disclosure and "how we tested": before the first word of the article. */
.disclosure,
.tested {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: var(--ink-1);
  font-size: 0.9375rem;
  color: var(--text-2);
}
.disclosure a { color: var(--text); }
.tested h2 { font-size: 0.75rem; font-weight: 620; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet-soft); margin-bottom: 0.4rem; }

/* ---------- Long-form text ---------- */

.prose {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-2);
}
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  margin-top: 2.5em;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}
.prose h3 {
  margin-top: 2em;
  font-size: 1.25rem;
  font-weight: 640;
  font-stretch: 112%;
  line-height: 1.3;
  color: var(--text);
}
.prose h2 + *, .prose h3 + * { margin-top: 0.75em; }
.prose strong { color: var(--text); font-weight: 620; }
.prose a { color: var(--text); text-decoration-color: var(--violet-soft); }
.prose a:hover { text-decoration-color: var(--gold); }

.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { padding-left: 0.25em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--violet-soft); }
.prose li > ul, .prose li > ol { margin-top: 0.5em; }

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--violet);
  color: var(--text);
  font-size: 1.1875rem;
}

.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }

.prose img { height: auto; border-radius: var(--radius-m); border: 1px solid var(--line); }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 0.6rem; font-size: 0.875rem; color: var(--text-3); }

.prose mark.todo {
  background: rgba(240, 195, 90, 0.16);
  color: var(--gold-hi);
  border: 1px dashed rgba(240, 195, 90, 0.6);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Tables scroll inside their box on small screens. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--ink-1);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th {
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-soft);
  white-space: nowrap;
}
.prose tr:last-child td { border-bottom: 0; }
.prose td { min-width: 8rem; }

/* ---------- Code ---------- */

.prose code,
.prose pre {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-stretch: normal;
}
.prose :not(pre) > code {
  font-size: 0.875em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  overflow-wrap: break-word;
}
.prose pre {
  overflow-x: auto;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--ink-1);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
  tab-size: 2;
}
.prose pre code { white-space: pre; }

/* Prism tokens (highlighted at build time), all at least 4.5:1 on --ink-1. */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--text-3); }
.token.punctuation, .token.operator { color: var(--text-2); }
.token.keyword, .token.atrule, .token.important, .token.selector, .token.tag { color: var(--violet-soft); }
.token.string, .token.char, .token.attr-value, .token.regex, .token.inserted { color: var(--gold); }
.token.number, .token.boolean, .token.constant, .token.symbol { color: var(--gold-hi); }
.token.property, .token.key, .token.attr-name, .token.function, .token.class-name, .token.variable { color: #d2ccff; }
.token.builtin, .token.url { color: var(--text); }
.token.deleted { color: var(--danger); }
.token.bold, .token.important { font-weight: 640; }

/* ---------- Tags ---------- */

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 560;
  letter-spacing: 0.04em;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.tag:hover { color: var(--text); border-color: var(--violet-soft); background: rgba(143, 128, 255, 0.12); }
.tag-count { color: var(--text-3); font-variant-numeric: tabular-nums; }
.article-tags { margin-top: 3rem; }

/* ---------- Overview ---------- */

.section-head-k { display: grid; gap: 1.25rem; max-width: 52rem; }
.section-head-k > * { min-width: 0; }
.section-head-k .crumbs { margin-bottom: 0.5rem; }
.section-title { font-size: clamp(2.75rem, 9vw, 6rem); overflow-wrap: break-word; }
/* Tag names can be one long word ("automatisatie"): smaller, and hyphenated as a last resort. */
.section-title.is-tag { font-size: clamp(1.875rem, 8vw, 4.5rem); hyphens: auto; }
.section-intro { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--text-2); max-width: 46ch; }
.section-feed { font-size: 0.875rem; }
.section-feed a { color: var(--text-3); }
.section-feed a:hover { color: var(--text); }

.tag-nav { margin-top: clamp(2rem, 5vw, 3rem); }

.post-list { margin-top: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); }
.post-card {
  position: relative;
  display: grid;
  gap: 0.6rem;
  padding-block: clamp(1.5rem, 3.5vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}
.post-card-title {
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  font-weight: 680;
  font-stretch: 112%;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 34ch;
  text-wrap: balance;
}
.post-card-title a { text-decoration: none; }
.post-card-title a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.post-card-meta { font-size: 0.875rem; color: var(--text-3); order: -1; }
.post-card-desc { color: var(--text-2); max-width: 62ch; }
.post-card .tag-list { margin-top: 0.4rem; }
.post-card .tag { min-height: 2rem; padding-block: 0.25rem; font-size: 0.75rem; }

.section-empty {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  color: var(--text-2);
  max-width: 52rem;
}
.section-all { margin-top: 2rem; }

/* ---------- Call to action and related posts ---------- */

.article-cta {
  position: relative;
  isolation: isolate;
  margin-top: clamp(4rem, 10vw, 6.5rem);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid rgba(160, 146, 255, 0.14);
  border-radius: var(--radius-l);
  background:
    radial-gradient(34rem circle at var(--mx, 12%) var(--my, 0%), rgba(110, 90, 255, 0.2), transparent 46%),
    radial-gradient(60% 90% at 100% 100%, rgba(76, 52, 230, 0.3), transparent 70%),
    linear-gradient(155deg, rgba(143, 128, 255, 0.1), rgba(14, 12, 26, 0.6) 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.article-cta h2 { font-size: clamp(2rem, 4.6vw, 3.75rem); }
.article-cta-body { display: grid; gap: 1.5rem; justify-items: start; }
.article-cta-body p { color: var(--text-2); font-size: 1.125rem; max-width: 38ch; }

.related { margin-top: clamp(4rem, 9vw, 6rem); }
.related-title {
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-soft);
}
.related .post-list { margin-top: 1.25rem; }
.related .post-card-title { font-size: clamp(1.25rem, 2vw, 1.5rem); }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .article-cta { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .prose { font-size: 1.0625rem; }
  .prose pre { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
  .crumbs [aria-current] { max-width: 18ch; }
  .article-cta .btn { width: 100%; }
}

@media print {
  .article-cta, .related, .crumbs { display: none !important; }
  .prose, .article-lede, .byline-bio { color: #000; }
}
