/* ==========================================================================
   Krebber Lab – site design
   Header, footer, page building blocks (kl-*), global accessibility rules.
   Replaces the CSS that lived in a Custom HTML block inside the header.

   Idea: the page is a microscope slide. The yeast field (plugin
   "yeast-background") is the specimen; text sits on glass – full-width
   slides (.kl-slide) and smaller cover slips (.kl-card).
   ========================================================================== */

:root {
  --kl-accent: #6a1b9a;
  --kl-accent-hover: #7d2bb0;
  --kl-accent-dark: #561481;
  --kl-accent-soft: rgba(106, 27, 154, 0.1);
  --kl-ink: #1d1530;
  --kl-text: #2a2438;
  --kl-muted: #5a5370;
  --kl-rule: rgba(48, 22, 92, 0.12);
  --kl-radius: 16px;
  --kl-radius-sm: 12px;
  /* Verdana for running text (as before), Jost for titles, navigation, buttons and labels */
  --kl-font-text: Verdana, Geneva, sans-serif;
  --kl-font-display: Jost, system-ui, sans-serif;
  --kl-header-h: 72px;
  --kl-ease: cubic-bezier(0.3, 0.7, 0.2, 1);
  --kl-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* glass: light gradient + blur/saturation tuned to the lavender field */
  --kl-glass-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.44) 100%);
  --kl-glass-filter: blur(22px) saturate(1.7);
  --kl-glass-edge: rgba(255, 255, 255, 0.72);
  --kl-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(48, 22, 92, 0.06), 0 8px 24px rgba(48, 22, 92, 0.06);
}

/* --------------------------------------------------------------- global */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html {
  scrollbar-color: rgba(106, 27, 154, 0.4) transparent;
  accent-color: var(--kl-accent);
  caret-color: var(--kl-accent);
}
.wp-site-blocks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.wp-block-template-part { max-width: 100%; }

::selection { color: #fff; background: var(--kl-accent); }

/* all headings (also Team, Publications, posts) in Jost */
.wp-site-blocks :is(h1, h2, h3, h4, h5, h6) { font-family: var(--kl-font-display); }

/* Focus ring only for keyboard users (the theme draws one on every click) */
:where(.wp-site-blocks) :focus:not(:focus-visible) { outline: none !important; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.wp-element-button:focus-visible {
  outline: 3px solid #b35eea;
  outline-offset: 3px;
  border-radius: 6px;
}
.publication-card:focus-visible { outline: 3px solid #b35eea; outline-offset: 3px; }

/* glass sections of the old home page (block colour "Base 2") */
.has-base-2-background-color {
  background-color: #dce0e617 !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid #ffffffbd;
  border-bottom: 1.5px solid #ffffffbd;
}

/* --------------------------------------------------------------- header */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  font-family: var(--kl-font-display);
}
body.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.wp-block-template-part { top: 46px; } }

header.wp-block-template-part > .wp-block-group {
  min-height: var(--kl-header-h);
  padding: 8px clamp(16px, 4vw, 40px) !important;
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--kl-ink) !important;
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 0 rgba(60, 30, 110, 0.05);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
}
body.kl-scrolled header.wp-block-template-part > .wp-block-group {
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 6px 24px rgba(48, 22, 92, 0.09);
}
header.wp-block-template-part > .wp-block-group > .wp-block-group {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  align-items: center;
  gap: 24px;
}

/* logo + site title / tagline (group with class kl-brand) */
header .wp-block-site-logo a,
header .wp-block-site-logo img { padding: 0; display: block; }
header .wp-block-site-logo img {
  width: 52px !important;
  height: auto;
  transition: opacity 0.2s ease;
}
header .wp-block-site-logo a:hover img { opacity: 0.82; }
header .logo_hover::after { display: none !important; }   /* old pulse effect */
header .logo_hover:hover, header .logo_hover:focus { animation: none !important; }

.kl-brand { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.kl-brand__text { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 0 !important; line-height: 1.15; text-align: left; }
.kl-brand .wp-block-site-title,
.kl-brand .wp-block-site-title a {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--kl-ink) !important;
  text-decoration: none;
}
.kl-brand .wp-block-site-tagline { margin: 0; font-size: 0.78rem; font-weight: 500; color: var(--kl-muted); }
@media (max-width: 480px) { .kl-brand .wp-block-site-tagline { display: none; } }

/* navigation links */
header .wp-block-navigation__container { gap: 2px !important; position: relative; }
header .wp-block-navigation-item { margin: 0 !important; position: relative; z-index: 1; }
header .wp-block-navigation-item__content {
  display: inline-block;
  padding: 8px 13px !important;
  border-radius: 999px;
  color: var(--kl-ink) !important;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}
header .wp-block-navigation-item__content:hover { background: var(--kl-accent-soft); color: var(--kl-accent) !important; }
header .current-menu-item > .wp-block-navigation-item__content,
header .wp-block-navigation-item__content[aria-current="page"],
header .wp-block-navigation-item__content.kl-current {
  background: var(--kl-accent-soft);
  color: var(--kl-accent) !important;
  font-weight: 600;
}
/* gliding pill (krebberlab-design.js): items lose their own background */
.kl-nav-pill {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  border-radius: 999px;
  background: var(--kl-accent-soft);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: transform 0.38s var(--kl-ease), width 0.38s var(--kl-ease), height 0.38s var(--kl-ease), opacity 0.2s ease;
}
.kl-nav-pill.is-visible { opacity: 1; }
.kl-nav-pill.no-anim { transition: none; }
.kl-pill-ready header .wp-block-navigation-item__content,
.kl-pill-ready header .wp-block-navigation-item__content:hover,
.kl-pill-ready header .current-menu-item > .wp-block-navigation-item__content,
.kl-pill-ready header .wp-block-navigation-item__content[aria-current="page"],
.kl-pill-ready header .wp-block-navigation-item__content.kl-current { background: transparent; }

/* neutralise the old "navbar-animation" plugin, in case it is still active */
header .wp-block-navigation__container,
header .wp-block-navigation__container > * { visibility: visible !important; }
header .wp-block-navigation__container:hover > * { opacity: 1 !important; filter: none !important; }
header .wp-block-navigation-item__content::after { content: none !important; display: none !important; }
header .wp-block-navigation-item__content:hover .wp-block-navigation-item__label { transform: none !important; opacity: 1 !important; }

/* hamburger below 1100 px (7 menu items do not fit in one row earlier) */
header .wp-block-navigation__responsive-container-open,
header .wp-block-navigation__responsive-container-close {
  color: var(--kl-ink) !important;
  padding: 8px;
  border-radius: 12px;
}
header .wp-block-navigation__responsive-container-open:hover { background: var(--kl-accent-soft); }
header .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
@media (max-width: 1099px) {
  header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}

/* mobile overlay menu */
/* A backdrop-filter on the header would trap and wash out the fixed overlay. */
header.wp-block-template-part > .wp-block-group:has(.is-menu-open) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgb(246, 243, 255) !important;
}
header .wp-block-navigation__responsive-container.is-menu-open {
  background: rgb(246, 243, 255) !important;
  color: var(--kl-ink) !important;
  padding: 24px clamp(20px, 6vw, 48px) !important;
  height: 100vh !important;
}
header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 56px !important; }
header .is-menu-open .wp-block-navigation__container { gap: 6px !important; align-items: flex-start !important; }
header .is-menu-open .wp-block-navigation-item__content { font-size: 1.35rem; font-weight: 600; padding: 10px 16px !important; }

/* --------------------------------------------------------------- footer */
footer.wp-block-template-part > .wp-block-group {
  min-height: 0 !important;
  margin-top: 0 !important;
  padding-block: clamp(40px, 6vw, 64px) !important;
  background: linear-gradient(160deg, #2a1d47 0%, #1b1430 100%) !important;
  color: rgba(255, 255, 255, 0.86) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--kl-font-text);
}
footer.wp-block-template-part p { line-height: 1.6; margin-block: 0.15em; }
footer.wp-block-template-part strong { font-family: var(--kl-font-display); color: #fff; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; }
footer.wp-block-template-part a {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}
footer.wp-block-template-part a:hover { color: #fff !important; text-decoration-color: #d9b8ff; }
footer .wp-block-site-logo img { width: 96px !important; height: auto; }

/* ==========================================================================
   Page building blocks – used by the redesigned pages (template "Page No Title")
   ========================================================================== */
/* The template "Page No Title" wraps the content in a glass box (.content-container,
   Custom HTML block in the template). Team and Publications need it; the kl pages
   bring their own cards, so the box is switched off around them. */
.content-container:has(.kl-page) {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  -webkit-backdrop-filter: none !important;
          backdrop-filter: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: inherit !important;
  letter-spacing: normal !important;
  line-height: inherit !important;
  hyphens: manual !important;
}
/* the theme's own side padding plus .kl-page's would double the margin on phones */
.has-global-padding:has(> .kl-page) { padding-left: 0 !important; padding-right: 0 !important; }
.kl-page {
  --gap: clamp(20px, 3vw, 32px);
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 24px) clamp(40px, 6vw, 72px);
  color: var(--kl-text);
  font-family: var(--kl-font-text);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: normal;
  hyphens: manual;
}
.kl-page > * + * { margin-top: var(--gap) !important; }
/* a heading that opens a new part of the page gets more room above than below */
.kl-page > h2:not(:first-child) { margin-top: calc(var(--gap) * 2.2) !important; }
.kl-page > h2 + * { margin-top: calc(var(--gap) * 0.75) !important; }
.kl-page h1, .kl-page h2, .kl-page h3, .kl-page h4 {
  color: var(--kl-ink);
  font-family: var(--kl-font-display);
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
}
.kl-page h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.kl-page h3 { font-weight: 700; }
.kl-page p { margin: 0; text-wrap: pretty; }
.kl-page li { text-wrap: pretty; }
.kl-page p + p { margin-top: 0.85em; }
/* (links inside publication cards keep the publications plugin's own style) */
.kl-page a:not(.wp-element-button, .publication-card *) {
  color: var(--kl-accent);
  text-decoration: underline;
  text-decoration-color: rgba(106, 27, 154, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.kl-page a:not(.wp-element-button, .publication-card *):hover { text-decoration-color: currentColor; }

/* page title block */
.kl-hero { text-align: center; max-width: 760px; margin-inline: auto !important; }
.kl-hero h1 { margin: 0 0 16px !important; font-size: clamp(2.2rem, 5vw, 3.4rem) !important; font-weight: 750; letter-spacing: -0.025em; }
.kl-lead { font-size: clamp(1.02rem, 1.4vw, 1.12rem); color: var(--kl-muted); }
/* short labels and UI text use the title font */
.kl-page :is(.kl-chips a, .kl-date, .kl-role, .kl-link a, .kl-contact strong, .kl-figure-value, .kl-figure-label, summary, .wp-block-query-pagination) { font-family: var(--kl-font-display); }
.kl-hero .wp-block-buttons { justify-content: center; margin-top: 26px !important; }

/* glass card ("cover slip") */
.kl-card {
  position: relative;
  display: flow-root;          /* contains floated figures (Research) */
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--kl-radius);
  background: var(--kl-glass-bg);
  backdrop-filter: var(--kl-glass-filter);
  -webkit-backdrop-filter: var(--kl-glass-filter);
  border: 1px solid var(--kl-glass-edge);
  box-shadow: var(--kl-glass-shadow);
}
.kl-card > * + * { margin-top: 1rem !important; }
.kl-card > * + h2, .kl-card > * + h3 { margin-top: 1.8rem !important; }
.kl-card h2 { margin-bottom: 0 !important; font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 700; }
.kl-card h3 { margin-bottom: 0 !important; font-size: 1.2rem; font-weight: 700; }
.kl-card > :first-child { margin-top: 0 !important; }
.kl-card--cta {
  background: linear-gradient(135deg, #6a1b9a 0%, #8b24a8 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 36px rgba(76, 20, 110, 0.24);
}
.kl-card--cta h2, .kl-card--cta h3, .kl-card--cta p, .kl-card--cta li, .kl-card--cta strong { color: #fff !important; }
.kl-card--cta a:not(.wp-element-button) { color: #fff !important; text-decoration-color: rgba(255, 255, 255, 0.6); }

/* grids */
.kl-grid { display: grid !important; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kl-grid > * { margin: 0 !important; }

/* main column + side column (Career) */
.kl-split { display: grid !important; gap: var(--gap); grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: stretch; }
.kl-split > * { margin: 0 !important; }
.kl-split--start { align-items: start; }
@media (max-width: 860px) { .kl-split { grid-template-columns: 1fr; } }

/* figures that the text flows around (Research) */
.kl-page .wp-block-image { margin: 0 !important; }
.kl-page .wp-block-image img { display: block; width: 100%; height: auto; }
.kl-figure img,
.kl-float img,
.kl-figs img {
  border-radius: var(--kl-radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(48, 22, 92, 0.06), 0 4px 14px rgba(48, 22, 92, 0.08);
}
.kl-card > .kl-float {
  float: right;
  width: min(50%, 540px);
  margin: 1rem 0 1rem clamp(20px, 3vw, 36px) !important;
}
.kl-card > .kl-float--narrow { width: min(36%, 320px); }
.kl-float > * + * { margin-top: 12px !important; }
@media (max-width: 760px) {
  .kl-card > .kl-float, .kl-card > .kl-float--narrow { float: none; width: 100%; margin: 1rem 0 !important; }
}
.kl-card > .kl-figs { max-width: 760px; margin-inline: auto !important; }
.kl-card > .kl-figs--narrow { max-width: 420px; }
.kl-figs > * + * { margin-top: 14px !important; }
.kl-page--narrow { max-width: 980px !important; }
.kl-page .wp-element-caption,
.kl-page figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--kl-muted); text-align: left; }

/* collapsible text (figure legends, references) – animated by krebberlab-design.js */
.kl-page details { overflow: hidden; }
.kl-legend { padding: 0; background: none; border: 0; font-size: 0.93rem; line-height: 1.6; }
.kl-legend summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  line-height: 1.4;
  color: var(--kl-accent);
  transition: color 0.18s ease-out;
}
.kl-legend summary:hover { color: var(--kl-accent-hover); }
.kl-legend summary::-webkit-details-marker { display: none; }
.kl-legend summary::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--kl-chevron) center / contain no-repeat;
          mask: var(--kl-chevron) center / contain no-repeat;
  transition: transform 0.28s var(--kl-ease);
}
.kl-legend[open]:not(.is-closing) summary::before { transform: rotate(90deg); }
.kl-legend > :not(summary) { padding-left: 22px; color: var(--kl-text); }
.kl-legend > :nth-child(2) { margin-top: 8px !important; }
.kl-legend > p + p { margin-top: 0.85em; }

/* topic chips (in-page navigation) */
.kl-chips {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0 !important;
  margin-inline: auto !important;
}
.kl-chips li { margin: 0 !important; }
.kl-page .kl-chips a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 3px rgba(48, 22, 92, 0.08);
  color: var(--kl-ink) !important;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.kl-page .kl-chips a:hover { background: #fff; color: var(--kl-accent) !important; }
.kl-page [id] { scroll-margin-top: calc(var(--kl-header-h) + 24px); }

/* buttons – flat; hover lightens (primary) or tints (outline), like the nav pill */
.kl-page .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.kl-page .wp-block-button__link {
  display: inline-block;
  box-sizing: border-box;
  padding: 12px 24px !important;
  border-radius: 999px !important;
  font-family: var(--kl-font-display) !important;
  font-weight: 600 !important;
  font-size: 0.98rem !important;
  font-style: normal !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: none !important;
  border: 1.5px solid var(--kl-accent) !important;
  box-shadow: none !important;
  transition: background-color 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out;
}
.kl-page .wp-block-button__link,
.kl-page .wp-block-button__link:focus { background: var(--kl-accent) !important; color: #fff !important; }
.kl-page .wp-block-button__link:hover { background: var(--kl-accent-hover) !important; border-color: var(--kl-accent-hover) !important; }
.kl-page .wp-block-button__link:active { background: var(--kl-accent-dark) !important; border-color: var(--kl-accent-dark) !important; }
.kl-page .is-style-outline .wp-block-button__link,
.kl-page .is-style-outline .wp-block-button__link:focus {
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--kl-accent) !important;
  border-color: rgba(106, 27, 154, 0.45) !important;
}
.kl-page .is-style-outline .wp-block-button__link:hover { background: var(--kl-accent-soft) !important; border-color: var(--kl-accent) !important; }
.kl-page .is-style-outline .wp-block-button__link:active { background: rgba(106, 27, 154, 0.16) !important; }
.kl-card--cta .wp-block-button__link,
.kl-card--cta .wp-block-button__link:focus { background: #fff !important; color: var(--kl-accent) !important; border-color: #fff !important; }
.kl-card--cta .wp-block-button__link:hover { background: #f4ebfa !important; border-color: #f4ebfa !important; }
.kl-card--cta .is-style-outline .wp-block-button__link,
.kl-card--cta .is-style-outline .wp-block-button__link:focus { background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, 0.7) !important; }
.kl-card--cta .is-style-outline .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.14) !important; border-color: #fff !important; }

/* text link with a chevron ("All publications", "All research topics") */
.kl-page .kl-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration-color: transparent;
}
.kl-page .kl-link a::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  background: currentColor;
  -webkit-mask: var(--kl-chevron) center / contain no-repeat;
          mask: var(--kl-chevron) center / contain no-repeat;
}
.kl-page .kl-link a:hover { text-decoration-color: currentColor; }

/* Labels in buttons and pills: trim the line box to cap height and baseline,
   so the text sits in the optical middle whatever the font's built-in
   ascent/descent (which Chrome and Firefox round differently). One pixel
   more below than above, because lower-case letters sit low in the cap box. */
@supports (text-box: trim-both cap alphabetic) {
  .kl-page .wp-block-button__link { text-box: trim-both cap alphabetic; padding-block: 15px 16px !important; }
  header .wp-block-navigation-item__content { text-box: trim-both cap alphabetic; padding-block: 13px 14px !important; }
  header .is-menu-open .wp-block-navigation-item__content { padding-block: 14px 15px !important; }
  .kl-page .kl-chips a { text-box: trim-both cap alphabetic; padding-block: 12px 13px; }
  .kl-date { text-box: trim-both cap alphabetic; padding-block: 8px 9px !important; }
}

/* text card with a key figure beside it (Boosting: key insights) */
.kl-insight {
  display: grid !important;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.kl-insight > * { margin: 0 !important; }
.kl-insight > * > * + * { margin-top: 1rem !important; }
.kl-figure-note { padding-left: clamp(24px, 4vw, 48px); border-left: 1px solid var(--kl-rule); }
.kl-figure-note > * + * { margin-top: 8px !important; }
.kl-figure-value {
  font-size: clamp(2.8rem, 6vw, 3.6rem) !important;
  font-weight: 700;
  line-height: 1 !important;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--kl-accent) !important;
}
.kl-figure-label { font-weight: 600; color: var(--kl-ink); }
@media (max-width: 760px) {
  .kl-insight { grid-template-columns: 1fr; }
  .kl-figure-note { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--kl-rule); }
}

/* several short, equal items in one panel, separated by hairlines (Boosting: applications) */
.kl-specs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0;
  padding: 0 !important;
}
.kl-specs > * { margin: 0 !important; padding: clamp(22px, 3vw, 34px); }
.kl-specs > * + * { border-left: 1px solid var(--kl-rule); }
.kl-specs > * > * + * { margin-top: 0.6rem !important; }
.kl-specs h3 { font-size: 1.12rem !important; }
@media (max-width: 760px) {
  .kl-specs > * + * { border-left: 0; border-top: 1px solid var(--kl-rule); }
}

/* rows inside one card (Career: positions) */
.kl-rows > .kl-row { padding: 18px 0 0; margin-top: 18px !important; border-top: 1px solid var(--kl-rule); }
.kl-rows > h2 + .kl-row { border-top: 0; padding-top: 0; }
.kl-row > * + * { margin-top: 6px !important; }
.kl-row h3 { font-size: 1.1rem !important; }
.kl-row p { color: var(--kl-muted); }

/* person / contact card */
.kl-person { display: flex !important; flex-direction: column; }
.kl-person-head { display: flex !important; align-items: center; gap: 16px; }
.kl-person-head > * { margin: 0 !important; }
.kl-person-head .wp-block-image { flex: none; width: 88px; }
.kl-person-head .wp-block-image img {
  width: 88px; height: 88px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 52% 26%;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.kl-person-head .wp-block-group > * { margin: 0 !important; }
.kl-person-head h3, .kl-person-head h4 { font-size: 1.05rem !important; font-weight: 700; line-height: 1.3; }
.kl-person-head .kl-role { margin-top: 2px !important; }
.kl-role { color: var(--kl-accent); font-weight: 600; font-size: 0.9rem; }
.kl-contact { list-style: none; padding: 0 !important; margin: 0; font-size: 0.95rem; }
.kl-contact li { display: flex; flex-direction: column; gap: 0; padding: 10px 0; border-bottom: 1px solid var(--kl-rule); margin: 0 !important; }
.kl-contact li:last-child { border-bottom: 0; }
.kl-contact strong { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--kl-muted); }
.kl-contact a { overflow-wrap: anywhere; }
.kl-person .wp-block-buttons { margin-top: auto !important; padding-top: 1.25rem; flex-direction: column; align-items: stretch; }
.kl-person .wp-block-button { width: 100%; }
.kl-person .wp-block-button__link { width: 100%; text-align: center; }

/* news item */
.kl-news {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  padding: 0 !important;
  overflow: hidden;
  align-items: stretch;
}
.kl-news > * { margin: 0 !important; }
.kl-news > .wp-block-image { min-height: 100%; }
.kl-news > .wp-block-image img { height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; background: none; }
.kl-news > .wp-block-group { padding: clamp(24px, 4vw, 44px); align-self: center; }
.kl-news > .wp-block-group > * + * { margin-top: 0.85rem !important; }
.kl-news h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem) !important; }
@media (max-width: 760px) {
  .kl-news { grid-template-columns: 1fr; }
  .kl-news > :is(.wp-block-image, .wp-block-post-featured-image) img { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
}
.kl-date {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--kl-accent-soft);
  color: var(--kl-accent) !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* references */
.kl-legend > .kl-refs { padding: 0 0 0 calc(22px + 1.6em) !important; margin: 0; font-size: 0.9rem; line-height: 1.55; }
.kl-refs li { margin: 0 0 0.7em !important; padding-left: 0.3em; overflow-wrap: anywhere; }
.kl-refs li::marker { color: var(--kl-accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Home page (template "Blog-Startseite")
   ========================================================================== */

/* full-width glass slide; its content sits in a .kl-page inside */
.kl-slide {
  position: relative;
  margin: 0 !important;
  padding: clamp(56px, 8vw, 104px) 0 !important;
  /* clear enough to see the specimen through it, blurred like glass out of focus */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.24) 100%);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  /* ground glass edges: a bright line on the glass, a faint shade outside */
  border-top: 1.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 -1px 0 rgba(72, 38, 128, 0.08), 0 1px 0 rgba(72, 38, 128, 0.08);
}
.kl-slide > .kl-page { padding-block: 0 !important; }
.kl-slide + .kl-page { padding-top: clamp(72px, 10vw, 128px); }

/* opening: title, then the group photo, which reaches into the first slide */
.kl-home { text-align: center; padding-bottom: 0 !important; }
.kl-home h1 {
  margin: 0 !important;
  font-size: clamp(2.3rem, 5.2vw, 3.7rem) !important;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.kl-home .kl-lead { max-width: 34em; margin: 16px auto 0 !important; }
.kl-home .kl-photo { position: relative; z-index: 1; margin-top: clamp(28px, 4vw, 48px) !important; }
.kl-home .kl-photo img {
  aspect-ratio: 1024 / 754;
  object-fit: cover;
  border-radius: var(--kl-radius);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 2px 4px rgba(48, 22, 92, 0.06), 0 24px 56px rgba(48, 22, 92, 0.16);
}
.kl-slide--under-photo {
  margin-top: calc(-1 * clamp(48px, 13vw, 190px)) !important;
  padding-top: calc(clamp(48px, 13vw, 190px) + clamp(48px, 6vw, 88px)) !important;
}

/* heading on one side, introduction (or a link) on the other */
.kl-headrow {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px clamp(24px, 5vw, 72px);
  align-items: end;
}
.kl-headrow > * { margin: 0 !important; }
.kl-headrow h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem) !important; letter-spacing: -0.025em; }
.kl-headrow > .wp-block-group > * + * { margin-top: 1rem !important; }
.kl-headrow--top { align-items: start; }
.kl-headrow--link { grid-template-columns: minmax(0, 1fr) auto; }
.kl-headrow--link .kl-link { justify-self: end; }
.kl-headrow .wp-block-buttons { margin-top: 1.5rem !important; }
.kl-headrow p { font-size: 1.02rem; }
@media (max-width: 760px) {
  .kl-headrow, .kl-headrow--link { grid-template-columns: 1fr; }
  .kl-headrow--link .kl-link { justify-self: start; }
}

/* research index: two topic groups with linked entries */
.kl-index {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px clamp(28px, 5vw, 72px);
  margin-top: clamp(36px, 5vw, 56px) !important;
}
.kl-index > * { margin: 0 !important; }
.kl-index h3 { font-size: 1.2rem !important; padding-bottom: 14px; border-bottom: 1px solid rgba(48, 22, 92, 0.24); }
.kl-entry {
  position: relative;
  margin: 0 !important;
  padding: 16px 40px 16px 0;
  border-bottom: 1px solid var(--kl-rule);
}
.kl-entry > * { margin: 0 !important; }
.kl-entry h4 { font-size: 1.05rem !important; font-weight: 650; }
.kl-entry p { margin-top: 4px !important; color: var(--kl-muted); font-size: 0.92rem; line-height: 1.6; }
.kl-page .kl-entry h4 a {
  color: var(--kl-ink);
  text-decoration: none;
  transition: color 0.18s ease-out;
}
.kl-page .kl-entry h4 a::after { content: ""; position: absolute; inset: 0; }   /* the whole entry is the link */
.kl-entry::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  background: var(--kl-muted);
  opacity: 0.5;
  -webkit-mask: var(--kl-chevron) center / contain no-repeat;
          mask: var(--kl-chevron) center / contain no-repeat;
  transition: background-color 0.18s ease-out, opacity 0.18s ease-out;
}
.kl-page .kl-entry:hover h4 a { color: var(--kl-accent); }
.kl-entry:hover::after { background: var(--kl-accent); opacity: 1; }
.kl-entry:has(a:focus-visible) { outline: 3px solid #b35eea; outline-offset: 2px; border-radius: 8px; }
.kl-entry a:focus-visible { outline: none; }
@media (max-width: 760px) { .kl-index { grid-template-columns: 1fr; } }

/* sections on the open field */
.kl-page > .kl-section { margin-top: clamp(72px, 10vw, 128px) !important; }
.kl-section > * + * { margin-top: clamp(24px, 3vw, 36px) !important; }

/* recent publications (filled by the publications plugin); last block before the footer */
.kl-page:has(.kl-pubs):last-child { padding-bottom: clamp(72px, 10vw, 112px); }
.kl-pubs { display: grid !important; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.kl-pubs > * { margin: 0 !important; }

/* ==========================================================================
   News (blog posts): page "News", category archives, single posts
   ========================================================================== */
.kl-feed .wp-block-post-template { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.kl-feed .wp-block-post-template > li { margin: 0; }
.kl-news > .wp-block-post-featured-image { margin: 0 !important; min-height: 100%; }
.kl-news > .wp-block-post-featured-image a { display: block; height: 100%; }
.kl-news > .wp-block-post-featured-image img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; border-radius: 0; }
.kl-news:not(:has(> .wp-block-post-featured-image, > .wp-block-image)) { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .kl-news > .wp-block-post-featured-image img { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
}
.kl-news .wp-block-post-title { margin: 0; font-size: clamp(1.35rem, 2.3vw, 1.7rem) !important; }
.kl-page .kl-news .wp-block-post-title a { color: var(--kl-ink); text-decoration: none; transition: color 0.18s ease-out; }
.kl-page .kl-news .wp-block-post-title a:hover { color: var(--kl-accent); }
.kl-news .wp-block-post-excerpt { margin: 0; }
.kl-page .wp-block-post-excerpt__more-text { margin-top: 0.7rem !important; font-family: var(--kl-font-display); font-weight: 600; }
.kl-page .wp-block-post-excerpt__more-text a { text-decoration-color: transparent; }
.kl-page .wp-block-post-excerpt__more-text a:hover { text-decoration-color: currentColor; }

/* categories of a post: small labels */
.kl-terms { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--kl-font-display); font-size: 0.82rem; }
.kl-terms .wp-block-post-terms__separator { display: none; }
.kl-page .kl-terms a {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(106, 27, 154, 0.3);
  color: var(--kl-accent);
  font-weight: 600;
  text-decoration: none;
}
.kl-page .kl-terms a:hover { background: var(--kl-accent-soft); }
.kl-chips .current-cat a { background: var(--kl-accent) !important; color: #fff !important; }

.kl-feed .wp-block-query-pagination { margin-top: calc(var(--gap) * 1.5) !important; gap: 6px; font-weight: 600; }
.kl-feed .wp-block-query-pagination a,
.kl-feed .wp-block-query-pagination .page-numbers { padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.kl-feed .wp-block-query-pagination .current { background: var(--kl-accent-soft); color: var(--kl-accent); }

/* single post */
.kl-post-head { display: flex !important; flex-direction: column; align-items: center; gap: 14px; }
.kl-post-head > * { margin: 0 !important; }
.kl-post-head .wp-block-post-title { font-size: clamp(2rem, 4.4vw, 3rem) !important; font-weight: 750; letter-spacing: -0.025em; }
.kl-post-head .kl-terms { justify-content: center; }
.kl-post-image img { width: 100%; height: auto; border-radius: var(--kl-radius); box-shadow: 0 2px 4px rgba(48, 22, 92, 0.06), 0 18px 44px rgba(48, 22, 92, 0.14); }
.kl-post-body { --pad: clamp(22px, 3.5vw, 40px); padding: var(--pad); }
.kl-post-body .wp-block-post-content > * { margin-block: 0 !important; }
.kl-post-body .wp-block-post-content > * + * { margin-top: 1.1em !important; }
.kl-post-body .wp-block-post-content p:empty { display: none; }
.kl-post-body .wp-block-post-content img { border-radius: var(--kl-radius-sm); }
/* an image at the very start of a post runs edge to edge, as the card's cover */
.kl-post-body .wp-block-post-content > .wp-block-image:first-child {
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) calc(var(--pad) - 1.1em) !important;
}
.kl-post-body .wp-block-post-content > .wp-block-image:first-child img {
  display: block; width: 100%; height: auto;
  border-radius: calc(var(--kl-radius) - 1px) calc(var(--kl-radius) - 1px) 0 0;
}
/* phones: no card around a post – just the text on the page, full width */
@media (max-width: 640px) {
  .kl-post-body {
    --pad: 0px; padding: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .kl-post-body .wp-block-post-content > .wp-block-image:first-child { margin: 0 !important; }
  .kl-post-body .wp-block-post-content > .wp-block-image:first-child img { border-radius: var(--kl-radius-sm); }
}
.kl-post-body .wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kl-post > .kl-link { text-align: center; }

.kl-center { text-align: center; }
.kl-muted { color: var(--kl-muted); }
.kl-small { font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  .kl-page *, header.wp-block-template-part *, .kl-nav-pill { transition: none !important; }
}
