/* ── Fonts ────────────────────────────────────────────────── */
/* Self-hosted (docs/assets/fonts), no third-party requests. Open Sans in the
   four NOLAI weights (Light 300, Regular 400, SemiBold 600, ExtraBold 800) plus
   Bold 700 for emphasis; JetBrains Mono is the tech-blog voice; Dreaming
   Outloud Pro is the NOLAI handwriting. */
@font-face { font-family: 'Open Sans'; src: url('../assets/fonts/OpenSans-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('../assets/fonts/OpenSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('../assets/fonts/OpenSans-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('../assets/fonts/OpenSans-Semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('../assets/fonts/OpenSans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('../assets/fonts/OpenSans-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/JetBrainsMono-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Dreaming Outloud Pro'; src: url('../assets/fonts/dreaming-outloud-regular-pro.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }

/* ── Variables ────────────────────────────────────────────── */
/* Light values are the NOLAI design-system tokens: inkt, inkt-gedempt,
   petrol, petrol-donker, petrol-tint, lijn-licht, grijs, donkerrood, rood.
   Dark mode keeps the same roles, with petrol-donker as the deep surface and
   petrol-licht as the accent. */

:root,
[data-theme="dark"] {
  --bg:           #061413;
  --bg-2:         #05201f;  /* web-panel (petrol 10%) on the ground */
  --bg-3:         #102d2c;  /* web-line (petrol-light 16%) on the ground */
  --text:         #e2f2f3;  /* petrol-tint */
  --text-2:       #93a9a7;
  --text-3:       #93a9a7;  /* same as text-2: no third grey */
  --border:       rgba(66, 174, 176, 0.16);
  --border-2:     rgba(66, 174, 176, 0.38);
  --petrol:       #008f89;
  --petrol-light: #42aeb0;   /* accent for small text and marks */
  --title:        #42aeb0;   /* headings */
  --petrol-dim:   rgba(0, 143, 137, 0.14);
  --link:         #42aeb0;
  --link-hover:   #e2f2f3;  /* petrol-tint */
  --code-bg:      rgba(0, 143, 137, 0.10);  /* web-code = web-panel */
  --code-border:  rgba(66, 174, 176, 0.16);
  --tag-bg:       rgba(0, 143, 137, 0.16);
  --tag-border:   rgba(66, 174, 176, 0.32);
  --tag-text:     #42aeb0;
  --admon-bg:     rgba(0, 143, 137, 0.10);
  --red:          #e3000b;  /* rood in both modes: large or bold only on dark (3.8:1) */
  --red-dim:      rgba(227, 0, 11, 0.08);
  --warn:         #d97706;  /* amber, one value for both modes (5.9:1 on dark) */
  --kicker:       #93a9a7; /* donkerrood has no contrast on dark: neutral instead */
  --hero-bg:      #005a5a; /* petrol-donker, as on chapter slides */
  --header-bg:    #005a5a; /* the bar goes petrol-donker too, so the top of the page is not a bright stripe on dark */
  --footer-bg:    #005a5a; /* petrol-donker, like the bands */
  --raster:       rgba(255, 255, 255, 0.07);
  /* page background: the NOLAI triangle raster, barely there */
  --page-raster:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='94.74' viewBox='0 0 48 94.74'%3E%3Cpath d='M0 0H48M0 47.37H48M0 0L24 47.37L48 0M24 47.37L0 94.74M24 47.37L48 94.74' fill='none' stroke='%2342aeb0' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E");
  color-scheme: dark;
}

[data-theme="light"] {
  --bg:           #ffffff;  /* wit */
  --bg-2:         #e2f2f3;  /* petrol-tint */
  --bg-3:         #c9e3e4;  /* lijn-licht */
  --text:         #002927;  /* inkt */
  --text-2:       #5f7372;  /* inkt-gedempt */
  --text-3:       #5f7372;  /* same as text-2: no third grey */
  --border:       #c9e3e4;  /* lijn-licht */
  --border-2:     #42aeb0;  /* petrol-licht */
  --petrol:       #008f89;  /* petrol */
  --petrol-light: #005a5a;  /* petrol-donker: small petrol text keeps 7:1 */
  --title:        #008f89;  /* petrol titles, as on the slides */
  --petrol-dim:   #e2f2f3;
  --link:         #005a5a;  /* petrol-donker, 8:1 */
  --link-hover:   #002927;  /* inkt */
  --code-bg:      #f2f2f2;  /* grijs */
  --code-border:  #f2f2f2;
  --tag-bg:       #e2f2f3;
  --tag-border:   #c9e3e4;
  --tag-text:     #005a5a;
  --admon-bg:     #e2f2f3;
  --red:          #e3000b;  /* rood */
  --red-dim:      rgba(227, 0, 11, 0.06);
  --warn:         #d97706;  /* amber */
  --kicker:       #730e04;  /* donkerrood */
  --hero-bg:      #008f89;
  --header-bg:    #008f89;  /* petrol */
  --footer-bg:    #005a5a;  /* petrol-donker */
  --raster:       rgba(255, 255, 255, 0.12);
  --page-raster:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='94.74' viewBox='0 0 48 94.74'%3E%3Cpath d='M0 0H48M0 47.37H48M0 0L24 47.37L48 0M24 47.37L0 94.74M24 47.37L48 94.74' fill='none' stroke='%23008f89' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* ── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Page raster: a fixed layer behind everything, so it stays put while the
   content scrolls (a fixed pseudo-element also works on iOS, where
   background-attachment: fixed does not). A lattice point sits on the
   centre of the viewport, as on the slides. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--page-raster);
  background-position: center center;
  background-repeat: repeat;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

::selection { background: rgba(0, 143, 137, 0.35); }

:focus-visible {
  outline: 2px solid var(--petrol-light);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

/* ── Progress bar ─────────────────────────────────────────── */

#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--petrol-light);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ── Layout ───────────────────────────────────────────────── */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* The content column is a solid page: the raster only shows in the margins
   left and right, never behind the text. */
.site-main > .container {
  flex: 1;
  width: 100%;
  background: var(--bg);
  padding-top: 3rem;
  padding-bottom: 5rem;
}
/* On wide screens give the text some white space before the raster starts;
   the content itself keeps the same width as the header and footer */
@media (min-width: 900px) {
  .site-main > .container {
    max-width: calc(1080px + 3rem);
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* ── Header ───────────────────────────────────────────────── */

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4rem;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.logo:hover { color: #fff; text-decoration: none; opacity: 0.85; }

.logo-prompt {
  color: rgba(255, 255, 255, 0.55);
}

/* NOLAI wordmark — white SVG, baseline-aligned with the logo text */
.logo-wordmark {
  height: 0.8rem;
  width: auto;
  display: block;
  align-self: baseline;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.3rem 0.65rem;
  border-radius: 0;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.15); }

.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  border-radius: 0;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: #fff; color: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-icon-link {
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.header-icon-link:hover { border-color: #fff; color: #fff; text-decoration: none; }
.header-icon-link svg { display: block; }

.lang-toggle {
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.lang-toggle .lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 0;
  display: block;
}
a.lang-toggle:hover { border-color: #fff; }
.lang-toggle--disabled { opacity: 0.35; cursor: default; }

/* Notification block on posts that have a translation */
/* Translation note: same panel as the notes (Vlak: petrol-tint, same padding) */
.post-lang-note {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.4rem;
  background: var(--admon-bg);
  border: none;
  border-radius: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
}
.post-lang-note:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.post-lang-note .lang-flag {
  width: 21px;
  height: 14px;
  border-radius: 0;
  flex-shrink: 0;
  border: 1px solid var(--border-2);
}

/* ── Footer ───────────────────────────────────────────────── */
/* Closing-slide treatment: petrol panel (petrol-donker in dark mode) with the
   triangle raster fading in from the right, the large white logo, a line in
   handwriting, small headings in ExtraBold capitals and links in the mono
   voice. The Nationaal Groeifonds bar sits bottom-left against the edge, as
   on the title slides. */

.site-footer {
  position: relative;
  isolation: isolate;
  background-color: var(--footer-bg);
  color: #fff;
  padding-top: 2.5rem;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='94.74' viewBox='0 0 48 94.74'%3E%3Cpath d='M0 0H48M0 47.37H48M0 0L24 47.37L48 0M24 47.37L0 94.74M24 47.37L48 94.74' fill='none' stroke='white' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E");
  background-position: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 2rem;
}

.footer-brand { display: inline-block; }
.footer-brand:hover { opacity: 0.85; text-decoration: none; }
.footer-logo { display: block; width: 140px; height: auto; }

.footer-head {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.019em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.8rem;
}
.footer-col a {
  display: block;
  width: fit-content;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }

.footer-base {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-groeifonds { display: block; line-height: 0; }
.footer-groeifonds img { display: block; height: 52px; width: auto; }
.footer-groeifonds:hover { opacity: 0.92; }

.footer-legal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  padding: 0 max(1.5rem, calc((100vw - 1080px) / 2 + 1.5rem)) 1.1rem 1.5rem;
}
.footer-legal-sep { margin: 0 0.35rem; color: rgba(255, 255, 255, 0.55); }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-base { flex-direction: column-reverse; align-items: flex-start; gap: 1rem; }
  .footer-legal { padding: 0 1.5rem; line-height: 1.7; }
  .footer-legal span { display: block; }
  .footer-legal .footer-legal-sep { display: none; }
}

.logo-prompt { color: var(--petrol-light); }

/* ── Page / Regular content ───────────────────────────────── */

.page-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.content-body { min-width: 0; flex: 1; }


.post-body h1:first-child {
  display: none;
}
/* ── TOC sidebar ──────────────────────────────────────────── */

.toc {
  flex-shrink: 0;
  width: 220px;
  position: sticky;
  top: 5rem;
  order: 2;
}

.toc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--petrol-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.toc-link {
  display: block;
  font-size: 0.8rem;
  color: var(--text-2);
  padding: 0.15rem 0;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.toc-link:hover { color: var(--petrol-light); border-color: var(--petrol-light); text-decoration: none; }
.toc-l2 { padding-left: 0.75rem; }
.toc-l3 { padding-left: 1.5rem; font-size: 0.75rem; }

/* ── Markdown content styles ──────────────────────────────── */

/* NOLAI type scale, as in the slide template and design system:
   titel 44 · kop-24 · kop-20 · kleine-kop 16. Every heading is Open Sans
   ExtraBold with the deck's condensed tracking (-2.1pt at 44pt = -0.048em);
   the small heading is set in capitals with a little air instead. */
.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.048em;
  color: var(--title);
  margin: 2em 0 0.55em;
}
.md-content h1 { font-size: 2.75rem; line-height: 1.05; margin-top: 0; }
.md-content h2 { font-size: 1.5rem; margin-top: 2.25em; }
/* Colour carries the hierarchy, as on the slides: petrol titles,
   ink sub-headings, the small capitals heading in the kicker colour. */
.md-content h3 { font-size: 1.25rem; color: var(--text); }
.md-content h4,
.md-content h5,
.md-content h6 {
  font-size: 0.95rem;
  color: var(--kicker);
  line-height: 1.3;
  letter-spacing: 0.019em;
  text-transform: uppercase;
}
.md-content h3 + h4 { margin-top: 1em; }

/* Heading permalinks — hide the ¶ symbol everywhere, show # on hover */
.headerlink { display: none !important; }

/* Anchored headings are deep-link targets — keep them clear of the sticky header */
h2[id], h3[id], h4[id] { cursor: pointer; }
/* Every deep-link target (headings, footnotes and their back-references)
   stays clear of the sticky header */
h2[id], h3[id], h4[id],
.md-content [id] { scroll-margin-top: 5rem; }

h2[id]:hover::after,
h3[id]:hover::after,
h4[id]:hover::after {
  content: ' #';
  color: var(--petrol-light);
  font-weight: 400;
  font-size: 0.65em;
  opacity: 0.55;
  vertical-align: middle;
}

/* RU house style: content links are underlined in the brand color */
.md-content a:not(.md-button):not(.post-tag) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.md-content p { margin: 1em 0; }
.md-content p:first-child { margin-top: 0; }

/* Lede: the opening paragraph in SemiBold, like the intro under a project title */
.post-body > p:first-of-type {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.55;
}

.md-content ul,
.md-content ol { padding-left: 1.75em; margin: 1em 0; }
.md-content li { margin: 0.35em 0; }

/* NOLAI bullets as in the slide template: a petrol triangle on level 1, a
   lying hexagon (points left and right) on level 2, then the triangle again.
   Drawn with clip-path so they follow the colour tokens. */
.md-content ul { list-style: none; padding-left: 1.5em; }
.md-content ul > li { position: relative; }
.md-content ul > li::before {
  content: '';
  position: absolute;
  left: -1.3em;
  top: 0.52em;
  width: 0.62em;
  height: 0.56em;
  background: var(--petrol);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.md-content ul ul > li::before {
  top: 0.56em;
  left: -1.27em;
  width: 0.56em;   /* regular hexagon: width = 2/sqrt(3) x height; */
  height: 0.485em; /* about the same ink as the triangle bullet */
  clip-path: polygon(0 50%, 25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%);
}
.md-content ul ul ul > li::before {
  top: 0.52em;
  width: 0.62em;
  height: 0.56em;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.md-content ol > li::marker { color: var(--text); font-weight: 600; }
.md-content li > ul,
.md-content li > ol { margin: 0.25em 0; }

/* Quote (design system: Citaat): handwriting in red, a large petrol quote
   mark hanging to the left, the source as a small petrol heading. Put the
   source in a <cite> or a final line starting with an em dash wrapped in
   <cite>: `> Text\n>\n> <cite>Name, role</cite>`. */
.md-content blockquote {
  position: relative;
  margin: 2em 0 2em 0;
  padding: 0.2em 0 0 3.6rem;
  border: none;
  background: none;
  font-family: 'Dreaming Outloud Pro', 'Segoe Print', 'Bradley Hand', cursive;
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--red);
}
.md-content blockquote::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -0.12em;
  font-family: 'Open Sans', sans-serif;
  font-weight: 800;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--petrol);
}
.md-content blockquote p { margin: 0 0 0.4em; }
.md-content blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: 'Open Sans', sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.3;
  letter-spacing: 0.019em;
  text-transform: uppercase;
  color: var(--title);
}

.md-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9em;
  overflow-x: auto;
  display: block;
}
.md-content th,
.md-content td {
  border: none;
  padding: 0.5em 0.85em;
  text-align: left;
  vertical-align: top;
}
.md-content th {
  background: var(--petrol);
  color: #fff;
  font-weight: 700;
}
.md-content tbody tr:nth-child(odd) td { background: var(--petrol-dim); }
.md-content tbody tr:last-child td { border-bottom: 2px solid var(--petrol); }

/* Inline code */
.md-content code:not(.highlight code):not(pre code) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  color: var(--petrol-light);
  border: none;
  border-radius: 0;
  padding: 0.1em 0.38em;
}

/* Code blocks */
.md-content pre,
.highlight {
  margin: 1.5em 0;
  border-radius: 0;
  overflow-x: auto;
  background: var(--code-bg) !important;
  border: 1px solid var(--code-border);
}

/* Pygments emits .highlight > pre > code; the outer div already carries
   the box, so the inner pre must not repeat margin/border/radius */
.highlight pre {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent !important;
}

.md-content pre code,
.highlight code {
  display: block;
  padding: 1.1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  line-height: 1.7;
  color: var(--text);
  background: transparent;
  border: none;
}

/* Mermaid diagrams (rendered client-side from pre.mermaid) */
.md-content pre.mermaid {
  background: transparent !important;
  border: none;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}
.md-content pre.mermaid code {
  padding: 0;
}

/* Hand-drawn inline SVG diagrams */
.post-diagram {
  margin: 1.75em 0;
}
.post-diagram svg {
  display: block;
  width: 100%;
  max-width: 880px;
  height: auto;
  margin: 0 auto;
}

/* Code block with language label */
.highlight [class^="language-"] { background: transparent; }

/* Line numbers */
.highlight .linenodiv pre {
  color: var(--text-3);
  border-right: 1px solid var(--border);
  padding-right: 0.75em;
  user-select: none;
}

/* ── Pygments — dark ──────────────────────────────────────── */

/* Code, dark: four colours from the palette, like the design system (web.md). */
.highlight .hll { background: rgba(66,174,176,0.16); }
.highlight .c,  .highlight .c1, .highlight .cm, .highlight .cs  { color: #93a9a7; font-style: italic; }
.highlight .k,  .highlight .kd, .highlight .kn, .highlight .kr  { color: #42aeb0; font-weight: 500; }
.highlight .kt, .highlight .kp, .highlight .nb, .highlight .bp,
.highlight .nf, .highlight .fm, .highlight .na, .highlight .nc,
.highlight .nn, .highlight .nd, .highlight .nt                   { color: #42aeb0; }
.highlight .s,  .highlight .s1, .highlight .s2, .highlight .sb,
.highlight .sc, .highlight .se, .highlight .sh, .highlight .si,
.highlight .sx, .highlight .ss, .highlight .sa,
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo  { color: #d97706; }
.highlight .o,  .highlight .ow, .highlight .p,
.highlight .nv, .highlight .vi, .highlight .vm, .highlight .ni  { color: var(--text); }
.highlight .ne                                                    { color: var(--red); }
.highlight .err  { color: var(--red); background: none; }
.highlight .gd   { color: var(--red); background: var(--red-dim); }
.highlight .gi   { color: var(--petrol-light); background: rgba(66,174,176,0.08); }
.highlight .gh   { color: #42aeb0; font-weight: 600; }
.highlight .gu   { color: #42aeb0; }
.highlight .gr   { color: var(--red); }

/* Light code colours from the NOLAI palette: keywords petrol, functions and
   types petrol-donker, strings donkerrood, numbers and operators rood,
   comments inkt-gedempt, punctuation and names inkt. */
[data-theme="light"] .highlight .p,
[data-theme="light"] .highlight .nv,
[data-theme="light"] .highlight .vi,
[data-theme="light"] .highlight .vm,
[data-theme="light"] .highlight .ni,
[data-theme="light"] .highlight .n   { color: #002927; }
[data-theme="light"] .highlight .c,
[data-theme="light"] .highlight .c1,
[data-theme="light"] .highlight .cm,
[data-theme="light"] .highlight .cs  { color: #5f7372; }
[data-theme="light"] .highlight .k,
[data-theme="light"] .highlight .kd,
[data-theme="light"] .highlight .kn,
[data-theme="light"] .highlight .kr,
[data-theme="light"] .highlight .kt,
[data-theme="light"] .highlight .kp,
[data-theme="light"] .highlight .nb,
[data-theme="light"] .highlight .bp  { color: #005a5a; }
[data-theme="light"] .highlight .nf,
[data-theme="light"] .highlight .fm,
[data-theme="light"] .highlight .na,
[data-theme="light"] .highlight .nc,
[data-theme="light"] .highlight .nn,
[data-theme="light"] .highlight .nd,
[data-theme="light"] .highlight .nt,
[data-theme="light"] .highlight .gh,
[data-theme="light"] .highlight .gu  { color: #005a5a; }
[data-theme="light"] .highlight .s,
[data-theme="light"] .highlight .s1,
[data-theme="light"] .highlight .s2,
[data-theme="light"] .highlight .sb,
[data-theme="light"] .highlight .sc,
[data-theme="light"] .highlight .se,
[data-theme="light"] .highlight .sh,
[data-theme="light"] .highlight .si,
[data-theme="light"] .highlight .sx,
[data-theme="light"] .highlight .ss,
[data-theme="light"] .highlight .sa  { color: #730e04; }
[data-theme="light"] .highlight .mi,
[data-theme="light"] .highlight .mf,
[data-theme="light"] .highlight .mh,
[data-theme="light"] .highlight .mo  { color: #730e04; }
[data-theme="light"] .highlight .o,
[data-theme="light"] .highlight .ow  { color: #002927; }
[data-theme="light"] .highlight .hll { background: #e2f2f3; }

/* ── Admonitions ──────────────────────────────────────────── */
/* Design system: Vlak (petrol-tint panel, small petrol heading) for notes and
   tips; Uitlegkader (thin red frame, red marker on the top edge, dark-red
   text) for warnings. Titles stay in the mono tech-blog voice. */

.md-content .admonition,
.md-content details {
  position: relative;
  border: none;
  border-radius: 0;
  background: var(--admon-bg);
  padding: 1.1rem 1.4rem;
  margin: 1.75em 0;
}
.md-content .admonition > :last-child,
.md-content details > :last-child { margin-bottom: 0; }

.md-content .admonition-title,
.md-content summary {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--petrol-light);
  margin-bottom: 0.3em;
  cursor: default;
}
.md-content summary { cursor: pointer; }
.md-content .admonition-title + *,
.md-content summary + * { margin-top: 0; }

/* Alert boxes (design system: uitlegkader): an outlined frame with a
   down-pointing triangle, frame, triangle and title in one signal colour.
   Amber for warnings, red for danger and errors. */
.md-content .warning,
.md-content .caution,
.md-content .attention { --alert: var(--warn); }
.md-content .danger,
.md-content .error,
.md-content .bug,
.md-content .failure { --alert: var(--red); }

.md-content .warning,
.md-content .caution,
.md-content .attention,
.md-content .danger,
.md-content .error,
.md-content .bug,
.md-content .failure {
  background: transparent;
  border: 1px solid var(--alert);
  padding-top: 1.6rem;
}
.md-content .warning::before,
.md-content .caution::before,
.md-content .attention::before,
.md-content .danger::before,
.md-content .error::before,
.md-content .bug::before,
.md-content .failure::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.4rem;
  width: 0.9rem;
  height: 0.75rem;
  background: var(--alert);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.md-content .warning .admonition-title,
.md-content .caution .admonition-title,
.md-content .attention .admonition-title,
.md-content .danger .admonition-title,
.md-content .error .admonition-title,
.md-content .bug .admonition-title,
.md-content .failure .admonition-title { color: var(--alert); }

/* Figures and captions (attr_list / md_in_html) */
.md-content figure { margin: 1.75em 0; }
.md-content figcaption,
.md-content .caption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-2);
}

/* ── Blog index ───────────────────────────────────────────── */

.blog-index-header {
  margin-bottom: 3rem;
}

/* Topic pages keep the plain underlined header */
.blog-index-header.topic-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

/* Landing hero — petrol panel like the slide deck's title slide:
   brand color block, white type, NOLAI wordmark language */
.blog-index-header:not(.topic-header) {
  position: relative;
  isolation: isolate;
  background-color: var(--hero-bg);
  padding: 2.75rem 3rem;
}
/* NOLAI triangle raster (magazine cell 30.44 x 30.04, a lattice point on the
   panel centre), faded in from the right: flat petrol behind the text on the
   left, the raster only where there is room for it. */
.blog-index-header:not(.topic-header)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='94.74' viewBox='0 0 48 94.74'%3E%3Cpath d='M0 0H48M0 47.37H48M0 0L24 47.37L48 0M24 47.37L0 94.74M24 47.37L48 94.74' fill='none' stroke='white' stroke-opacity='0.2' stroke-width='1'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 45%, #000 92%);
          mask-image: linear-gradient(to right, transparent 0%, transparent 45%, #000 92%);
}
.blog-index-header:not(.topic-header) p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 50rem;
}
.blog-index-header:not(.topic-header) p:first-of-type:not(:first-child),
.blog-index-header:not(.topic-header) h1 + p {
  font-weight: 600;
  font-size: 1.05rem;
}
.blog-index-header:not(.topic-header) a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.blog-index-header:not(.topic-header) a:hover { color: rgba(255,255,255,0.8); }

/* Row of call-to-action buttons; gap keeps spacing even when they wrap */
.blog-index-header:not(.topic-header) p:has(> a.md-button) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}
.blog-index-header:not(.topic-header) a.md-button {
  display: inline-block;
  padding: 0.55em 1.2em;
  border: 2px solid #fff;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.blog-index-header:not(.topic-header) a.md-button:hover {
  background: #fff;
  color: var(--petrol);
  text-decoration: none;
}
.blog-index-header:not(.topic-header) a.md-button--primary {
  background: #fff;
  color: var(--petrol);
}
.blog-index-header:not(.topic-header) a.md-button--primary:hover {
  background: transparent;
  color: #fff;
}

.blog-index-header h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
  margin-bottom: 0.5rem;
}

.blog-index-header:not(.topic-header) h1 { color: #fff; margin-bottom: 0.75rem; line-height: 1.15; }
.blog-index-header:not(.topic-header) p + p { margin-top: 0.75em; }

/* Topic (category) page header — "topic:" label with the topic as a pill */
.topic-header h1 { color: var(--text-2); }

.topic-pill {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  border-radius: 0;
  padding: 0 0.45em;
  line-height: 1.4;
}

.post-list { display: flex; flex-direction: column; gap: 0; }

.post-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.post-card:first-child { padding-top: 0; }

.post-card--has-image {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.post-card-body { flex: 1; min-width: 0; }

.post-card-content { display: flex; flex-direction: row; gap: 1.5rem; justify-content: space-between}
.post-card-thumb {
  flex-shrink: 0;
  display: block;
  width: 140px;
  height: 100px;
  border-radius: 0;
  overflow: hidden;
  line-height: 0;
  align-self: center;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}
.post-card-thumb:hover img { opacity: 0.85; }

@media (max-width: 480px) {
  .post-card-thumb { width: 90px; height: 70px; }
}

/* Card meta echoes the post kicker: full caps, normal tracking, dark red,
   sized ~0.36 of the card title (template 16:44 ratio) */
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--kicker);
}

/* Small NOLAI-style triangle (▴) separating date and reading time.
   The glyph sits on the baseline, so nudge it to the optical middle:
   vertical-align handles inline contexts (kicker), line-height 1 tightens
   the box so flex centering (card meta) lands on the glyph itself. */
.post-sep {
  color: var(--petrol-light);
  font-size: 0.8rem;
  line-height: 1;
  vertical-align: middle;
}

.post-readtime {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--kicker);
}

.post-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.post-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: lowercase;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  border-radius: 0;
  padding: 0.1em 0.5em;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.post-tag:hover { background: var(--petrol-dim); border-color: var(--petrol); color: var(--petrol-light); text-decoration: none; }

/* Card titles get the template's title treatment: ExtraBold, condensed
   tracking, petrol */
.toclink {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.048em;
  line-height: 1.3;
  margin: 0 0 0.65rem;
}
.toclink {
  color: var(--title);
  text-decoration: none;
  transition: color 0.15s;
}
.toclink:hover { color: var(--link-hover); text-decoration: none; }

.post-card-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.048em;
  color: var(--title);
  text-decoration: none;
  margin: 0 0 0.65rem;
  line-height: 1.15;
  transition: color 0.15s;
}
.post-card-title:hover { color: var(--link-hover); text-decoration: none; }

.post-excerpt {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.post-excerpt p { margin: 0; }

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.post-authors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Portraits sit in a lying hexagon, like the author card and the
   level-2 bullet */
.author-avatar-sm {
  width: 32px;     /* regular hexagon: 2/sqrt(3) x 28 */
  height: 28px;
  object-fit: cover;
  clip-path: polygon(0 50%, 25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%);
  flex-shrink: 0;
}

.author-name-sm {
  font-size: 0.8rem;
  color: var(--text-2);
}

.read-more {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--petrol-light);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  white-space: nowrap;
  transition: color 0.15s;
  margin-left: auto;
}
.read-more:hover { color: var(--link-hover); text-decoration: underline; }

.no-posts {
  color: var(--text-2);
  font-style: italic;
  padding: 2rem 0;
}

/* ── Pagination ───────────────────────────────────────────── */

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--petrol-light);
  text-decoration: none;
}
.pagination-link.disabled { color: var(--text-3); cursor: default; }
.pagination-link:not(.disabled):hover { color: var(--link-hover); text-decoration: none; }

/* ── Blog post ────────────────────────────────────────────── */

.post-back {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}
.post-back:hover { color: var(--petrol-light); text-decoration: none; }

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* Kicker above the post title — mirrors the slide template's dark-red
   full-caps tagline ("NOLAI CO-CREATIEPROJECT ... | YYYY") above the petrol
   title. Template spec: 16pt vs the 44pt title (ratio 0.36), normal tracking,
   dark red #730E04. Carries the post meta (date / read time / authors); an
   optional `type:` frontmatter value (e.g. Whitepaper) renders bold in front. */
.post-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: normal;
  color: var(--kicker);
  margin-bottom: 0.5rem;
}
/* Inline context: word spaces alone read too tight next to the triangle,
   so pad it out to match the index card meta's 0.5rem flex gap */
.post-kicker .post-sep { font-size: 0.65em; margin: 0 0.3rem; }
.post-kicker-type { font-weight: 700; }
.post-kicker-sep { color: var(--text-3); margin: 0 0.3rem; }

/* Template spec: 44pt Open Sans ExtraBold, tracking condensed 2.1pt
   (-2.1/44 = -0.048em), petrol */
.post-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--title);
  letter-spacing: -0.048em;
  margin-bottom: 0.75rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 0.85rem;
}

.post-author { color: var(--text-2); }

.post-body { margin-top: 0; }

/* Post hero image */
.post-hero {
  margin-bottom: 2.5rem;
  border-radius: 0;
  overflow: hidden;
  line-height: 0;
  border: 1px solid var(--border);
}
.post-hero img {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: none;
}

/* Author card at post bottom */
.post-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.author-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--petrol-dim);
  border: none;
  border-radius: 0;
}
.author-card + .author-card { margin-top: 1rem; }

/* Portrait in a lying hexagon, the same shape as the level-2 bullet */
.author-avatar {
  width: 104px;    /* regular hexagon: 2/sqrt(3) x 90 */
  height: 90px;
  object-fit: cover;
  border-radius: 0;
  clip-path: polygon(0 50%, 25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%);
  flex-shrink: 0;
}

.author-info { display: flex; flex-direction: column; gap: 0.35rem; }
.author-name { font-weight: 800; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.048em; color: var(--title); }
.author-desc { font-size: 0.95rem; line-height: 1.5; color: var(--text-2); }

@media (max-width: 640px) {
  .author-card { gap: 1.1rem; padding: 1.25rem; }
  .author-avatar { width: 81px; height: 70px; }
  .author-name { font-size: 1.1rem; }
}

/* Prev/next navigation */
.post-nav {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-nav-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 45%;
  text-decoration: none;
}

.post-nav-next { align-items: flex-end; text-align: right; }

.post-nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-3);
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--title);
  transition: color 0.15s;
}
.post-nav-link:hover .post-nav-title { color: var(--link-hover); }

/* ── Home page ────────────────────────────────────────────── */

.page-content .content-body h1:first-child {
  font-size: 2.75rem;
  letter-spacing: -0.048em;
  color: var(--title);
}

/* Button links (via attr_list) */
.md-content a.md-button {
  display: inline-block;
  padding: 0.55em 1.2em;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  border: 2px solid var(--petrol);
  color: var(--petrol-light);
  margin-right: 0.5em;
  margin-top: 0.5em;
}
.md-content a.md-button:hover { background: var(--petrol); color: #fff; text-decoration: none; }
.md-content a.md-button--primary { background: var(--petrol); color: #fff; }
.md-content a.md-button--primary:hover { background: var(--petrol-light); border-color: var(--petrol-light); }

/* ── 404 page ─────────────────────────────────────────────── */

.error-page {
  padding: 5rem 0;
  text-align: center;
}

/* Botty (from the NOLAI slide template) wondering where the page went */
.error-botty {
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  display: block;
  border: 1px solid var(--border);
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 6rem;
  font-weight: 700;
  color: var(--border-2);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 2rem;
  line-height: 1.9;
}
.error-msg p { margin: 0; }
.error-path { color: var(--petrol-light); word-break: break-all; }

.error-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--petrol-light);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .page-content { flex-direction: column; }
  .toc { width: 100%; position: static; order: -1; display: none; }
}

@media (max-width: 640px) {
  .site-header .logo-name { display: none; }
  .blog-index-header:not(.topic-header) { padding: 2rem 1.5rem; }
  .blog-index-header h1 { font-size: 1.75rem; }
  .post-body > p:first-of-type { font-size: 1rem; }
  .md-content h1 { font-size: 2rem; }
  .md-content blockquote { font-size: 1.35rem; padding-left: 2.8rem; }
  .md-content blockquote::before { font-size: 3.5rem; }
  .post-title { font-size: 2rem; }
  .post-kicker { font-size: 0.75rem; }
  .post-nav-inner { flex-direction: column; }
  .post-nav-link { max-width: 100%; }
  .post-nav-next { align-items: flex-start; text-align: left; }
}

/* ── Archive page ─────────────────────────────────────────── */

.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.archive-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--title);
  margin: 0;
}

.archive-search-wrap {
  flex-shrink: 0;
}

.archive-search {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 0;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  padding: 0.45em 0.85em;
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}
.archive-search::placeholder { color: var(--text-3); }
.archive-search:focus { border-color: var(--petrol-light); }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.archive-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color 0.15s, transform 0.15s;
}
.archive-card:hover {
  border-color: var(--petrol-light);
  transform: translateY(-2px);
  text-decoration: none;
}

.archive-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  overflow: hidden;
  line-height: 0;
}
.archive-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}
.archive-card:hover .archive-card-img img { opacity: 0.85; }

.archive-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  padding: 0 0.75rem 0.75rem;
  line-height: 1.4;
  transition: color 0.15s;
}
.archive-card:hover .archive-card-title { color: var(--petrol-light); }

.archive-no-results {
  color: var(--text-2);
  font-style: italic;
  padding: 2rem 0;
}

/* ── Newsletter (monthly tech newsletter edition) ─────────── */

/* Editions often use a square/portrait hero (e.g. the team photo); crop to
   frame it rather than the default object-fit:none center-band slice. */
.newsletter .post-hero img {
  height: 400px;
  object-fit: cover;
  object-position: center 30%;
}

/* Half-width images that text wraps around, mirroring the Word/ODF layout
   where a picture sits inside a column of text. Tag an image `{ .float-right }`
   or `{ .float-left }` (via attr_list). Section headings clear the float so a
   picture never bleeds into the next section. */
.newsletter-body img.float-right,
.newsletter-body img.float-left {
  width: 48%;
  max-width: 360px;
  height: auto;
  margin: 0.5rem 0 1rem;
}
.newsletter-body img.float-right { float: right; margin-left: 1.75rem; }
.newsletter-body img.float-left  { float: left;  margin-right: 1.75rem; }
.newsletter-body h2,
.newsletter-body h3 { clear: both; }

@media (max-width: 640px) {
  .newsletter-body img.float-right,
  .newsletter-body img.float-left {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
  }
}

.edition-toc {
  background: var(--petrol-dim);
  border: none;
  border-radius: 0;
  padding: 1.1rem 1.5rem 1.25rem;
  margin: 0 0 2.5rem;
}

.edition-toc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--petrol-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
}

.edition-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: edition;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 640px) {
  .edition-toc-list { columns: 1; }
}

.edition-toc-list li {
  counter-increment: edition;
  break-inside: avoid;
  margin: 0.15em 0;
}

.edition-toc-list a {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  padding: 0.15rem 0;
  transition: color 0.15s;
}
.edition-toc-list a::before {
  content: counter(edition, decimal-leading-zero) ' ';
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8em;
  color: var(--text-3);
  margin-right: 0.4em;
}
.edition-toc-list a:hover { color: var(--petrol-light); text-decoration: none; }

/* Per-heading "copy link" button — replaces the hover-# on newsletter headings */
.newsletter-body h2[id]:hover::after,
.newsletter-body h3[id]:hover::after { content: none; }

.heading-anchor-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6em;
  vertical-align: middle;
  margin-left: 0.6em;
  padding: 0.15em 0.5em;
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.newsletter-body h2:hover .heading-anchor-copy,
.newsletter-body h3:hover .heading-anchor-copy,
.heading-anchor-copy:focus-visible { opacity: 1; }
.heading-anchor-copy:hover { color: var(--petrol-light); border-color: var(--petrol-light); }
.heading-anchor-copy.copied { color: var(--petrol-light); border-color: var(--border-2); opacity: 1; }

@media (hover: none) {
  .heading-anchor-copy { opacity: 1; }
}

/* ── Scrollbar ────────────────────────────────────────────── */

[data-theme="dark"] ::-webkit-scrollbar { width: 6px; height: 6px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--petrol); border-radius: 0; }
