/**
 * @file verid-critical.css
 * Verid — Kritische Overrides (letzte CSS-Datei, weight: 200)
 */


/* ══════════════════════════════════════════════════════════
   1. HEADER
   ══════════════════════════════════════════════════════════ */

body .site-header {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  border-bottom: 1px solid var(--verid-color-border);
  box-shadow: 0 1px 3px rgba(28,25,22,.06);
}
body .verid-header-row1 { height: 68px; background: #fff; }
body .verid-header-row1__inner {
  display: flex; align-items: center; gap: 1.5rem; height: 100%;
  max-width: 1180px; margin: 0 auto; padding: 0 2rem;
}
body .verid-header-row1__inner .block-system-branding-block {
  background: none !important; border: none !important; padding: 0 !important; flex-shrink: 0;
}

/* Suchfeld: wächst auf ca. 50 % der Header-Leiste */
body .verid-header-row1__inner .block-search,
body .verid-header-row1__inner #block-verid-suchformular {
  margin-left: auto; flex-grow: 1; flex-shrink: 0; max-width: 520px;
}
body .verid-header-row1__inner .block-search .content,
body .verid-header-row1__inner .block-search .container-inline,
body .verid-header-row1__inner .block-search form {
  display: flex !important; align-items: center !important;
  gap: 0.5rem !important; margin: 0 !important; padding: 0 !important;
  width: 100% !important;
}
body .verid-header-row1__inner .block-search .form-item {
  flex: 1 !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important;
}
body .verid-header-row1__inner .block-search .form-actions {
  flex-shrink: 0 !important; margin: 0 !important; padding: 0 !important;
}
body .verid-header-row1__inner input[type="search"],
body .verid-header-row1__inner input[type="text"] {
  width: 100% !important; max-width: none !important; min-width: 0 !important;
  box-sizing: border-box !important;
  background: #F0F8FF !important;
}
body .verid-header-row2 {
  position: relative;
  background: #F0F8FF;
  border-top: 1px solid var(--verid-color-border-light);
}
body .verid-header-row2__inner {
  max-width: 1180px; margin: 0 auto; padding: 0 2rem;
  overflow-x: auto; scrollbar-width: none;
}
body .verid-header-row2__inner::-webkit-scrollbar { display: none; }
body #header-nav { display: flex; align-items: stretch; }
@media (max-width: 960px) {
  body #header-nav { display: none; }
  /* Mobile nav panel — z-index unterhalb des sticky Headers (600) */
  body #header-nav.is-active {
    display: block;
    position: fixed;
    top: 68px; /* direkt unterhalb des sticky Headers (Zeile 1 = 68px) */
    left: 0; right: 0;
    background: var(--verid-color-bg);
    border-bottom: 1px solid var(--verid-color-border);
    box-shadow: 0 4px 24px rgba(28,25,22,.14);
    z-index: 590; /* unter Header (600), über Inhalt */
    max-height: calc(100dvh - 61px);
    overflow-y: auto;
  }
  body #header-nav.is-active .verid-header-row2__inner {
    overflow: visible;
    max-width: none;
    padding: 0.5rem 0 1rem;
  }
  /* Hide "Themen" label + toggle — show level-2 topics directly */
  body #header-nav.is-active a.primary-nav__menu-link--level-1,
  body #header-nav.is-active button.primary-nav__button-toggle {
    display: none !important;
  }
  /* Show level-2 sub-menu as a flat vertical list */
  body #header-nav.is-active ul.primary-nav__menu--level-2 {
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
  }
  body #header-nav.is-active ul.primary-nav__menu--level-2 li a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--verid-color-text);
    border-bottom: 1px solid var(--verid-color-border-light);
    text-decoration: none;
    white-space: normal;
  }
  body #header-nav.is-active ul.primary-nav__menu--level-2 li a:hover {
    background: var(--verid-color-surface);
    color: var(--verid-color-accent);
  }
}
body #header-nav .block__title,
body #header-nav h2.block__title { display: none; }
body #header-nav nav,
body #header-nav .block-menu { display: flex; align-items: stretch; min-width: 0; }

/* ══════════════════════════════════════════════════════════
   2. NAVIGATION — primary-nav__* (echter HTML-Quelltext)
   ══════════════════════════════════════════════════════════ */

/* Level-1 Liste */
body ul.primary-nav__menu--level-1 {
  display: flex; flex-direction: row; flex-wrap: nowrap;
  align-items: stretch; list-style: none; margin: 0; padding: 0;
}
body li.primary-nav__menu-item--level-1 {
  /* display:flex + align-items:stretch sorgt dafür, dass ul.level-2
     die volle Höhe des Eltern-Flex-Containers einnimmt. */
  display: flex; align-items: stretch;
  flex-shrink: 0; position: relative; list-style: none;
  margin: 0 !important;  /* Olivero setzt margin-bottom: 6px → Gap am unteren Rand entfernen */
}

/* Level-1 Link */
body a.primary-nav__menu-link--level-1 {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  font-family: var(--verid-font-body); font-size: 0.875rem; font-weight: 500;
  color: var(--verid-color-text-secondary); text-decoration: none;
  background: none; border-bottom: 2px solid transparent;
  white-space: nowrap; hyphens: none;
  transition: color 150ms, background 150ms, border-color 150ms;
}
body a.primary-nav__menu-link--level-1:hover,
body li.primary-nav__menu-item--level-1:hover > a.primary-nav__menu-link--level-1 {
  color: var(--verid-color-text); background: var(--verid-color-surface-2);
}
body a.primary-nav__menu-link--active-trail.primary-nav__menu-link--level-1 {
  color: var(--verid-color-accent);
  border-bottom-color: var(--verid-color-accent); font-weight: 600;
}
body .primary-nav__menu-link-inner { pointer-events: none; }

/* Toggle-Button: klein, dezent — NICHT versteckt (JS braucht ihn) */
body button.primary-nav__button-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0;
  background: none; border: none; cursor: pointer;
  color: var(--verid-color-text-muted);
  flex-shrink: 0;
}
body button.primary-nav__button-toggle .icon--menu-toggle {
  display: block; width: 10px; height: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 150ms;
}
body button.primary-nav__button-toggle[aria-expanded="true"] .icon--menu-toggle {
  transform: rotate(180deg);
}
/* visually-hidden spans */
body button.primary-nav__button-toggle .visually-hidden { display: none; }

/* Dropdown Level-2: versteckt per Default */
body ul.primary-nav__menu--level-2 {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 300;
  min-width: 220px; flex-direction: column;
  background: #fff;
  border: 1px solid var(--verid-color-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(28,25,22,.10);
  padding: 0.375rem; list-style: none; margin: 0;
}

/* Öffnen: hover (CSS) + aria-expanded (JS via verid-nav.js) */
body li.primary-nav__menu-item--level-1:hover > ul.primary-nav__menu--level-2,
body li.primary-nav__menu-item--level-1:focus-within > ul.primary-nav__menu--level-2,
body li.primary-nav__menu-item--level-1[aria-expanded="true"] > ul.primary-nav__menu--level-2 {
  display: flex;
}

body li.primary-nav__menu-item--level-2 { list-style: none; margin: 0; }
body a.primary-nav__menu-link--level-2 {
  display: block; padding: 0.5rem 0.875rem;
  font-size: 0.875rem; font-weight: 400; color: var(--verid-color-text);
  text-decoration: none; white-space: nowrap; hyphens: none;
  border-radius: 6px; border-bottom: none;
  transition: background 150ms;
}
body a.primary-nav__menu-link--level-2:hover { background: var(--verid-color-surface); }
body a.primary-nav__menu-link--active-trail.primary-nav__menu-link--level-2 {
  color: var(--verid-color-accent); font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   3. SIDEBAR — ul.menu-tree mit Tiefe
      Struktur aus _verid_book_tree_html():
        ul.menu-tree
          li[data-num="01"] > a
          li[data-num="02"].active-parent > a
            ul.menu-tree.menu-tree--sub
              li[data-num="02.1"] > a
              li[data-num="02.2"].active > a.is-active
          li[data-num="03"] > a
   ══════════════════════════════════════════════════════════ */

body .region-sidebar-wrapper {
  position: sticky;
  top: calc(var(--verid-header-height) + 1.5rem);
  max-height: calc(100dvh - var(--verid-header-height) - 3rem);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--verid-color-border) transparent;
}
body .region-sidebar-wrapper .block { background: none; padding: 0; border: none; }
body .region-sidebar-wrapper h2.block__title {
  font-family: var(--verid-font-body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--verid-color-text-muted); margin: 0 0 1rem;
}

/* Reset für alle Ebenen */
body ul.menu-tree { list-style: none; margin: 0; padding: 0; }
body ul.menu-tree li { list-style: none; margin-bottom: 2px; position: relative; }
body ul.menu-tree li::marker { content: none; }

/* ── Toggle-Button für aufklappbare Unterkapitel ── */
body ul.menu-tree li.has-children { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0; }
body .verid-tree-toggle {
  position: absolute; right: 0; top: 3px;
  width: 24px; height: 28px;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--verid-color-text-muted); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: color 150ms, background 150ms;
  z-index: 1;
}
body .verid-tree-toggle:hover { color: var(--verid-color-accent); background: var(--verid-color-surface); }
body .verid-tree-toggle__icon { display: block; line-height: 1; transition: transform 200ms; }
/* Ausgeklappt: Pfeil dreht sich nach unten */
body ul.menu-tree li.has-children.is-open > .verid-tree-toggle .verid-tree-toggle__icon { transform: rotate(90deg); }
/* Unterkapitel-Liste: standardmäßig versteckt, außer is-open */
body ul.menu-tree li.has-children > ul.menu-tree--sub { display: none; width: 100%; }
body ul.menu-tree li.has-children.is-open > ul.menu-tree--sub { display: block; }

/* ── Kapitel-Link (data-num am <a> gesetzt von PHP) ── */
body ul.menu-tree > li > a {
  display: grid; grid-template-columns: 28px 1fr; align-items: start;
  gap: 0.625rem; padding: 0.5rem 0.375rem; border-radius: 6px;
  font-family: var(--verid-font-body); font-size: 0.875rem; font-weight: 500;
  line-height: 1.4; color: var(--verid-color-text-secondary);
  text-decoration: none; hyphens: none;
  transition: color 150ms, background 150ms;
}
/* Nummern-Badge: PHP schreibt data-num direkt ans <a>-Element */
body ul.menu-tree > li > a::before {
  content: attr(data-num);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  background: #F0F8FF;
  font-size: 10px; font-weight: 700; color: var(--verid-color-text-muted);
  margin-top: 1px; transition: background 150ms, color 150ms;
}
body ul.menu-tree > li > a:hover {
  color: var(--verid-color-text); background: var(--verid-color-surface);
}
body ul.menu-tree > li > a.is-active,
body ul.menu-tree > li.active > a {
  color: var(--verid-color-accent); font-weight: 600;
  background: var(--verid-color-accent-light);
}
body ul.menu-tree > li > a.is-active::before,
body ul.menu-tree > li.active > a::before,
body ul.menu-tree > li.active-parent > a::before {
  background: var(--verid-color-accent); color: #fff;
}

/* ── Sub-Liste (Unterkapitel) ── */
body ul.menu-tree--sub {
  margin: 0.25rem 0 0.375rem 4px;
  padding: 0 0 0 0.75rem;
  border-left: 2px solid var(--verid-color-border-light);
}
body ul.menu-tree--sub > li { margin-bottom: 1px; }

body ul.menu-tree--sub > li > a {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: 0.375rem; padding: 0.3rem 0.375rem; border-radius: 5px;
  font-family: var(--verid-font-body); font-size: 0.8125rem; font-weight: 400;
  line-height: 1.4; color: var(--verid-color-text-muted);
  text-decoration: none; hyphens: auto; overflow-wrap: anywhere;
  min-width: 0; flex: 1 1 0;
  transition: color 150ms, background 150ms;
}
body ul.menu-tree--sub > li > a::before {
  content: attr(data-num);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 18px; padding: 0 4px; border-radius: 3px;
  background: #F0F8FF;
  font-size: 8px; font-weight: 700; color: var(--verid-color-text-muted);
  white-space: nowrap; transition: background 150ms, color 150ms;
}
body ul.menu-tree--sub > li > a:hover {
  color: var(--verid-color-text-secondary); background: var(--verid-color-surface);
}
body ul.menu-tree--sub > li > a.is-active,
body ul.menu-tree--sub > li.active > a {
  color: var(--verid-color-accent); font-weight: 500;
  background: var(--verid-color-accent-light);
}
body ul.menu-tree--sub > li > a.is-active::before,
body ul.menu-tree--sub > li.active > a::before {
  background: var(--verid-color-accent); color: #fff;
}

/* ══════════════════════════════════════════════════════════
   4. LAYOUT
   ══════════════════════════════════════════════════════════ */

body .main-content__container {
  max-width: 1180px; margin-inline: auto; padding-inline: 2rem; width: 100%;
}
body .sidebar-grid {
  display: grid; grid-template-columns: 430px 1fr;
  gap: 2.5rem; align-items: start; width: 100%;
}
body .sidebar-grid > .region-sidebar-wrapper { min-width: 0; }
body .sidebar-grid > main.site-main { min-width: 0; max-width: none; }
body .sidebar-grid main .node,
body .sidebar-grid main article { max-width: 720px; }

@media (max-width: 1100px) {
  body .sidebar-grid { grid-template-columns: 1fr; gap: 2rem; }
  body .region-sidebar-wrapper { position: static; max-height: none; }
}

/* ══════════════════════════════════════════════════════════
   5. NODE META
   ══════════════════════════════════════════════════════════ */

body .node__eyebrow {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
body .node__type-badge { color: var(--verid-color-accent); }
body .node__eyebrow-sep { color: var(--verid-color-border); }
body .node__eyebrow-date { color: var(--verid-color-text-muted); font-weight: 500; }
body .node__header {
  margin-bottom: 1.5rem; padding-bottom: 0;
}
body .node__meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.625rem; font-size: 0.875rem; margin-top: 0.75rem;
}
body .node__author-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--verid-color-surface-2);
  font-size: 0.625rem; font-weight: 700; color: var(--verid-color-text-muted);
  text-decoration: none; flex-shrink: 0;
  transition: background 150ms, color 150ms;
}
body a.node__author-avatar:hover {
  background: var(--verid-color-accent-light);
  color: var(--verid-color-accent);
}
body .node__author { font-weight: 600; color: var(--verid-color-text); }
body .node__reading-time {
  display: inline-flex; align-items: center; padding: 0.15rem 0.625rem;
  background: var(--verid-color-surface); border: 1px solid var(--verid-color-border);
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600;
  color: var(--verid-color-text-secondary);
}

/* ══════════════════════════════════════════════════════════
   6. BUCH-PAGER
   ══════════════════════════════════════════════════════════ */

body .verid-book-pager {
  margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--verid-color-border);
}
body .verid-book-pager__inner {
  display: flex; align-items: stretch;
  justify-content: space-between; gap: 1rem;
}
body .verid-book-pager__btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.25rem; max-width: 45%;
  background: #F0F8FF; border: 1px solid var(--verid-color-border);
  border-radius: 8px; font-family: var(--verid-font-body); font-size: 0.875rem;
  color: var(--verid-color-text); text-decoration: none;
  transition: background 150ms;
}
body .verid-book-pager__btn:hover { background: var(--verid-color-surface-2); }
body .verid-book-pager__arrow { font-size: 1.125rem; color: var(--verid-color-accent); flex-shrink: 0; }
body .verid-book-pager__text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
body .verid-book-pager__hint {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--verid-color-text-muted);
}
body .verid-book-pager__title {
  font-weight: 600; color: var(--verid-color-text);
  white-space: normal; overflow-wrap: break-word;
}
body .verid-book-pager__btn--next { margin-left: auto; }
body .verid-book-pager__btn--next .verid-book-pager__text { align-items: flex-end; }
body .verid-book-pager__btn--next .verid-book-pager__title { text-align: right; }

/* ══════════════════════════════════════════════════════════
   7. TYPOGRAFIE & HYPHENS
   ══════════════════════════════════════════════════════════ */

body .node__content h2 {
  font-family: var(--verid-font-display); font-size: 1.75rem; font-weight: 600;
  margin-top: 3rem; margin-bottom: 0.875rem;
  padding-top: 1.25rem; border-top: 1px solid var(--verid-color-border);
}
body .node__content h3 {
  font-family: var(--verid-font-display); font-size: 1.25rem; font-weight: 600;
  margin-top: 2rem; margin-bottom: 0.625rem;
}
body .node__content p { font-size: var(--verid-text-md); line-height: 1.8; margin-bottom: 1.25rem; }
body .node__content ul, body .node__content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
body .node__content li { margin-bottom: 0.375rem; line-height: 1.7; }
body .node__content ol > li::marker { color: var(--verid-color-text); font-weight: 400; font-size: 1em; }

body h1, body h2, body h3, body h4, body h5, body h6,
body a, body button, body label,
body .primary-nav__menu-link, body .primary-nav__menu-link-inner,
body ul.menu-tree a, body ul.menu-tree--sub a { hyphens: none; word-break: normal; }

body .header-nav-overlay { display: none; }

/* ══════════════════════════════════════════════════════════
   9. NAVIGATION FLATTEN
      Menü-Struktur: Level-1 = "Themen" (ausgeblendet),
      Level-2 = alle Themenseiten (visuell als Level-1).
      Level-2 items erscheinen direkt in der Navigationsleiste.
   ══════════════════════════════════════════════════════════ */

/* "Themen" Level-1 Link und Toggle-Button ausblenden */
body ul.primary-nav__menu--level-1 > li.primary-nav__menu-item--level-1 > a.primary-nav__menu-link--level-1,
body ul.primary-nav__menu--level-1 > li.primary-nav__menu-item--level-1 > button.primary-nav__button-toggle {
  display: none !important;
}

/* Level-2 Liste: immer sichtbar, inline als Flex-Row */
body ul.primary-nav__menu--level-2 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  position: static !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  list-style: none !important;
  /* Linke Kante mit Branding/Sidebar ausrichten:
     Link-Padding-Left (0.875rem) durch negativen Margin ausgleichen */
  margin: 0 0 0 -0.875rem !important;
  gap: 0 !important;
}

/* Level-2 Items: flex-Container, damit <a> die volle Höhe ausfüllt */
body li.primary-nav__menu-item--level-2 {
  display: flex !important;
  align-items: stretch !important;
  flex-shrink: 0;
  position: relative;
  list-style: none;
}

body a.primary-nav__menu-link--level-2 {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;           /* füllt die volle Höhe des <li> aus */
  gap: 0.375rem !important;
  padding: 0.625rem 0.875rem !important;
  font-family: var(--verid-font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--verid-color-text-secondary) !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  white-space: nowrap !important;
  hyphens: none !important;
  transition: color 150ms, background 150ms, border-color 150ms !important;
}

body a.primary-nav__menu-link--level-2:hover,
body li.primary-nav__menu-item--level-2:hover > a.primary-nav__menu-link--level-2 {
  color: #fff !important;
  background: var(--verid-color-accent) !important;
  border-bottom-color: var(--verid-color-accent) !important;
}

body a.primary-nav__menu-link--active-trail.primary-nav__menu-link--level-2 {
  color: var(--verid-color-accent) !important;
  border-bottom-color: var(--verid-color-accent) !important;
  font-weight: 600 !important;
}

/* ══════════════════════════════════════════════════════════
   8. PAGE TITLE BLOCK — auf Node-Seiten ausblenden
      Der node--full.html.twig rendert seinen eigenen <h1>,
      der Page-Title-Block würde sonst doppelt rendern.
   ══════════════════════════════════════════════════════════ */
body[class*="node-type--"] .block-page-title-block { display: none; }

/* ══════════════════════════════════════════════════════════
   9. UNVERÖFFENTLICHTE SEITEN — Admin-Hinweisbalken
   ══════════════════════════════════════════════════════════ */
.verid-unpublished-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: #fef3c7;
  border-bottom: 2px solid #f59e0b;
  font-size: 0.875rem;
  font-weight: 600;
  color: #92400e;
}
.verid-unpublished-notice__icon { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════
   10. LOCAL TASKS (Edit-Tabs) — Olivero-Color-Tokens fehlen
       da wir variables.css=false gesetzt haben; eigene Styles.
   ══════════════════════════════════════════════════════════ */
.tabs-wrapper {
  margin-bottom: 1rem;
}

ul.tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  border-bottom: 2px solid var(--verid-color-border);
}

ul.tabs li.tabs__tab {
  display: flex;
  margin: 0;
}

a.tabs__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--verid-color-text-secondary);
  background: var(--verid-color-surface);
  border: 1px solid var(--verid-color-border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
  transition: background 150ms, color 150ms;
}

a.tabs__link:hover {
  background: var(--verid-color-surface-2);
  color: var(--verid-color-text);
}

a.tabs__link.is-active {
  background: #fff;
  color: var(--verid-color-accent);
  border-color: var(--verid-color-border);
  border-bottom-color: #fff;
  margin-bottom: -2px;
}


/* ══════════════════════════════════════════════════════════
   DANKE-SEITE (nid-2366) + IMPRESSUM (nid-2363): h1 ausblenden
   ══════════════════════════════════════════════════════════ */

.nid-2366 .block-system-breadcrumb-block,
.nid-2366 .block-page-title-block,
.nid-2366 .node__title,
.nid-2366 h1,
.nid-2363 .block-page-title-block,
.nid-2363 .node__title,
.nid-2363 h1 {
  display: none;
}

/* ══════════════════════════════════════════════════════════
   IMPRESSUM (nid-2363): Abstände h2 → Inhalt
   Tailwind-Utility-Wrapper hat keine stabile Klasse;
   Overrides direkt über Body-Klasse mit !important.
   ══════════════════════════════════════════════════════════ */

/* h2 → nachfolgender Text (Impressum, Urheberrecht) */
.nid-2363 h2 {
  margin-block-end: 1.25rem !important;
}

/* h2 → h3 auf gleichen visuellen Abstand wie p → h3 bringen */
.nid-2363 h2 + h3 {
  margin-block-start: 0.75rem !important;
}

/* ══════════════════════════════════════════════════════════
   STATUSMELDUNG: Haken-Icon in Markenblau, mehr Abstand
   ══════════════════════════════════════════════════════════ */

.messages--status .messages__icon svg {
  fill: var(--verid-color-accent);
}

.messages--status .messages__header {
  margin-inline-end: var(--verid-space-5, 1.25rem);
}

/* ══════════════════════════════════════════════════════════
   11. RESPONSIVE OVERRIDES
   critical.css verwendet body-Präfix → höhere Spezifität
   als Breakpoint-Regeln in site-header.css / layout.css.
   Diese Sektion überschreibt die Desktop-Defaults zuverlässig.
   ══════════════════════════════════════════════════════════ */

/* ── Tablet (≤960px): Suche kompakter, kein auto-margin ── */
@media (max-width: 960px) {
  body .verid-header-row1__inner .block-search,
  body .verid-header-row1__inner #block-verid-suchformular {
    margin-left: 0;
    flex-grow: 0;
    flex-shrink: 1;
    max-width: 200px;
  }
  body .verid-header-row1__inner .block-system-branding-block {
    flex-grow: 1;
  }
}

/* ── Schmales Tablet (≤768px): Padding angleichen ── */
@media (max-width: 768px) {
  body .verid-header-row1__inner,
  body .verid-header-row2__inner {
    padding-inline: 1.25rem;
  }
  body .main-content__container {
    padding-inline: 1.25rem;
    overflow-x: hidden;
  }
  body .node__title {
    font-size: clamp(1.5rem, 7.5vw, 3.25rem) !important;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  /* h2 ohne Klasse (z.B. Seitentitel wie „Mathematik für Wirtschaftswissenschaften") */
  body h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

/* ── Mobil (≤600px): Zweizeiliger Header als CSS-Grid ──
   Zeile 1: [☰ Menü]  [Welt der BWL]
   Zeile 2: [Suchfeld _________________________ Suchen]
   Kapitel-Button ausgeblendet — Buchnavigation-Toggle im Artikeltext reicht. */
@media (max-width: 600px) {
  body .verid-header-row1 { height: auto; }

  body .verid-header-row1__inner {
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "burger brand"
      "search search";
    padding-block: 0.625rem;
    padding-inline: 1.25rem;
    gap: 0.75rem;
    height: auto;
  }

  body .verid-header-row1__inner .mobile-buttons {
    grid-area: burger;
    margin: 0;
    display: flex;
  }

  body .verid-header-row1__inner .block-system-branding-block {
    grid-area: brand;
    flex-grow: unset;
  }

  /* Kapitel-Button auf ≤600px ausblenden */
  body .mobile-book-nav-btn {
    display: none !important;
  }

  body .verid-header-row1__inner .block-search,
  body .verid-header-row1__inner #block-verid-suchformular {
    grid-area: search;
    max-width: none;
    margin-left: 0;
    flex-basis: unset;
    flex-grow: unset;
    flex-shrink: unset;
    padding-bottom: 0;
  }

  /* Nav-Drawer: unterhalb des zweizeiligen Headers (ca. 100px) */
  body #header-nav.is-active {
    top: 100px;
  }

  /* Inhaltsbereich: Padding angepasst */
  body .main-content__container {
    padding-inline: 1.25rem;
  }
}

/* ── Sehr klein (≤480px): noch weniger Padding ── */
@media (max-width: 480px) {
  body .verid-header-row1__inner,
  body .verid-header-row2__inner {
    padding-inline: 1rem;
  }
  body .main-content__container {
    padding-inline: 1rem;
  }
}
