:root {
      --cms-accent: ;
      --cms-link: ;
      --cms-link-hover: ;
      --cms-card-radius: px;
      --cms-tag-box-max-h: px;
      --cms-shelf-cols: ;
    }
    .cms-tag-box { max-height: var(--cms-tag-box-max-h); overflow-y: auto; }
    .glass-card { border-radius: var(--cms-card-radius); }
    .article-content a { color: var(--cms-link); border-bottom: 1px solid color-mix(in srgb, var(--cms-link) 45%, transparent); text-decoration: none; }
    .article-content a:hover, .article-content a:focus-visible { color: var(--cms-link-hover); }
    .cms-shelf-grid,
    .cms-shelf-row {
      display: grid;
      grid-template-columns: repeat(var(--cms-row-cols, var(--cms-shelf-cols)), minmax(0, 1fr));
      gap: 0.75rem;
    }
    @media (max-width: 991.98px) {
      .cms-shelf-grid,
      .cms-shelf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 575.98px) {
      .cms-shelf-grid,
      .cms-shelf-row { grid-template-columns: minmax(0, 1fr); }
    }
    :root {
      --tech-cyan: #22d3ee;
      --tech-bg: #070b12;
      --tech-glass: rgba(15, 23, 42, 0.88);
      --tech-border: rgba(34, 211, 238, 0.24);
      --tech-text: #f1f5f9;
      --tech-muted: #cbd5e1;
    }

    html {
      scroll-behavior: smooth;
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    body {
      background: radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.08), transparent 40%),
                  radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.07), transparent 45%),
                  var(--tech-bg);
      color: var(--tech-text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      padding-top: 4.5rem;
      line-height: 1.65;
    }

    /* Barrierefreier Skip-Link (sichtbar bei Tastatur-Fokus) */
    .skip-link {
      position: fixed;
      top: -100px;
      left: 1rem;
      z-index: 2000;
      background: var(--tech-cyan);
      color: #041019;
      font-weight: 700;
      padding: 0.65rem 1.1rem;
      border-radius: 0.5rem;
      text-decoration: none;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    .skip-link:focus {
      top: 0.75rem;
    }

    /* Klarer Tastatur-Fokusrahmen nach WCAG 2.1 AA */
    :focus-visible {
      outline: 3px solid var(--tech-cyan) !important;
      outline-offset: 2px !important;
    }

    /* Erhöhter Kontrast für sekundären Text */
    .text-secondary {
      color: var(--tech-muted) !important;
    }

    body.a11y-large-text {
      font-size: 1.15rem;
    }

    body.a11y-high-contrast {
      background: #000000 !important;
      color: #ffffff !important;
    }
    body.a11y-high-contrast .glass-card,
    body.a11y-high-contrast .glass-nav,
    body.a11y-high-contrast .admin-sidebar {
      background: #09090b !important;
      border-color: #ffffff !important;
      box-shadow: none !important;
    }
    body.a11y-high-contrast a:not(.btn) {
      color: #67e8f9 !important;
      text-decoration: underline !important;
    }

    .mono {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    }

    .glass-nav {
      background: rgba(9, 14, 24, 0.92);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--tech-border);
    }

    /* Top-Navbar auf Desktop immer in einer sauberen Zeile halten */
    .navbar {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: space-between;
    }
    @media (min-width: 992px) {
      .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        flex-grow: 1;
        align-items: center;
        justify-content: space-between;
      }
      .navbar-toggler {
        display: none !important;
      }
    }
    .navbar-nav {
      display: flex !important;
      flex-direction: row !important;
      align-items: center;
      gap: 0.35rem;
      margin: 0;
      padding: 0;
      list-style: none;
    }
    @media (max-width: 991.98px) {
      .navbar {
        flex-wrap: wrap;
      }
      .navbar-collapse:not(.show) {
        display: none !important;
      }
      .navbar-collapse.show {
        display: block !important;
        flex-basis: 100% !important;
        margin-top: 0.5rem;
      }
      .navbar-nav {
        flex-direction: column !important;
        align-items: flex-start;
      }
    }

    .glass-card {
      background: var(--tech-glass);
      backdrop-filter: blur(12px);
      border: 1px solid var(--tech-border);
      transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }

    .glass-card:hover {
      border-color: rgba(34, 211, 238, 0.55);
      box-shadow: 0 8px 28px rgba(34, 211, 238, 0.08);
    }

    .hover-info:hover {
      color: var(--tech-cyan) !important;
    }

    .admin-sidebar .nav-link {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: #e2e8f0;
      border-radius: 0.5rem;
      padding: 0.45rem 0.75rem;
      font-size: 0.92rem;
    }
    .admin-sidebar .nav-link:hover,
    .admin-sidebar .nav-link.active {
      background: rgba(34, 211, 238, 0.16);
      color: var(--tech-cyan);
      font-weight: 600;
    }

    .cms-ico {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.15rem;
      height: 1.15rem;
      flex: 0 0 auto;
      color: var(--tech-cyan);
    }
    .cms-ico svg {
      width: 100%;
      height: 100%;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6 {
      clear: both;
    }
    .article-content h2[id],
    .article-content h3[id] {
      scroll-margin-top: 5.5rem;
    }

    .article-content pre {
      position: relative;
      background: #0d1117;
      border: 1px solid rgba(148, 163, 184, 0.25);
      border-radius: 0.5rem;
      padding: 1rem;
    }

    .copy-code-btn {
      position: absolute;
      top: 0.5rem;
      right: 0.5rem;
      font-size: 0.75rem;
    }

    .EasyMDEContainer .CodeMirror,
    .EasyMDEContainer .editor-toolbar {
      background: #0b1220;
      color: #f1f5f9;
      border-color: rgba(148, 163, 184, 0.3);
    }

    .EasyMDEContainer .editor-toolbar button {
      color: #e2e8f0 !important;
    }

    .EasyMDEContainer .editor-toolbar button:hover,
    .EasyMDEContainer .editor-toolbar button.active {
      background: rgba(34, 211, 238, 0.18);
      border-color: rgba(34, 211, 238, 0.4);
      color: var(--tech-cyan) !important;
    }

    .EasyMDEContainer .CodeMirror-cursor {
      border-left-color: var(--tech-cyan);
    }
  
    .navbar.fixed-top {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      width: 100% !important;
      z-index: 1030 !important;
    }
    .navbar > .container,
    .navbar > .container-fluid {
      display: flex !important;
      flex-wrap: nowrap !important;
      align-items: center !important;
      justify-content: space-between !important;
      width: 100% !important;
    }
    .navbar-collapse {
      display: flex !important;
      flex-basis: auto !important;
      flex-grow: 1 !important;
      align-items: center !important;
      justify-content: space-between !important;
    }
    .navbar-nav {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      flex-wrap: wrap !important;
      gap: 0.35rem !important;
      margin: 0 !important;
      padding: 0 !important;
      list-style: none !important;
    }
    @media (max-width: 991.98px) {
      .navbar > .container,
      .navbar > .container-fluid {
        flex-wrap: wrap !important;
      }
      .navbar-collapse:not(.show) {
        display: none !important;
      }
      .navbar-collapse.show {
        display: block !important;
        flex-basis: 100% !important;
        margin-top: 0.5rem !important;
      }
      .navbar-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
      }
    }
    .navbar .dropdown-menu li {
      list-style: none !important;
      margin: 0 !important;
      padding: 0 !important;
    }
    .navbar .dropdown-item {
      border-radius: 0.5rem !important;
      padding: 0.48rem 0.75rem !important;
      color: #e2e8f0 !important;
      transition: background-color 0.15s ease, color 0.15s ease !important;
    }
    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus {
      background: rgba(56, 189, 248, 0.14) !important;
      color: #38bdf8 !important;
    }
    .navbar .dropdown-item.active {
      background: rgba(56, 189, 248, 0.22) !important;
      color: #38bdf8 !important;
      font-weight: 600 !important;
    }
    .navbar .dropdown-divider {
      border-top-color: rgba(148, 163, 184, 0.18) !important;
      margin: 0.35rem 0 !important;
    }

  
    .cms-hover-dropdown {
      position: relative;
    }
    .cms-hover-dropdown > .dropdown-menu {
      display: none;
      position: absolute;
      right: 0;
      top: 100%;
      margin-top: 0 !important;
      padding-top: 0.45rem !important;
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      min-width: 12.5rem !important;
      z-index: 1050;
    }
    .cms-hover-dropdown > .dropdown-menu > .cms-menu-inner {
      background: rgba(9, 17, 26, 0.96);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(56, 189, 248, 0.28);
      border-radius: 0.75rem;
      padding: 0.45rem;
      box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
      list-style: none;
    }
    @media (hover: hover) and (pointer: fine) {
      .cms-hover-dropdown:hover > .dropdown-menu {
        display: block;
      }
    }
    .cms-hover-dropdown:focus-within > .dropdown-menu,
    .cms-hover-dropdown > .dropdown-menu.show {
      display: block;
    }
    .cms-menu-inner .dropdown-item {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      border-radius: 0.5rem !important;
      padding: 0.48rem 0.75rem !important;
      color: #e2e8f0 !important;
      text-decoration: none !important;
      transition: background-color 0.15s ease, color 0.15s ease !important;
    }
    .cms-menu-inner .dropdown-item:hover,
    .cms-menu-inner .dropdown-item:focus {
      background: rgba(56, 189, 248, 0.14) !important;
      color: #38bdf8 !important;
    }
    .cms-menu-inner .dropdown-item.active {
      background: rgba(56, 189, 248, 0.22) !important;
      color: #38bdf8 !important;
      font-weight: 600 !important;
    }
    .cms-flag {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      align-self: center;
      vertical-align: middle;
      line-height: 1;
      width: 1.15rem;
      height: 0.8rem;
      border-radius: 2px;
      overflow: hidden;
      flex: 0 0 auto;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.16);
    }
    .cms-flag svg {
      width: 100%;
      height: 100%;
      display: block;
    }
    .dropdown-toggle .cms-flag {
      transform: translateY(-0.5px);
    }

  
    .main-shell, .container-fluid, .container {
      max-width: 100%;
    }
    .cms-profile-wrap {
      width: 100%;
      max-width: 100%;
    }

  
    .navbar > .container,
    .container {
      max-width: 1360px !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }
    .cms-hover-dropdown > .dropdown-menu {
      right: 0 !important;
      left: auto !important;
      max-width: min(16rem, calc(100vw - 1.5rem)) !important;
      overflow: visible !important;
    }
    @media (max-width: 991.98px) {
      .cms-hover-dropdown > .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        max-width: calc(100vw - 2rem) !important;
      }
      .cms-hover-dropdown > .dropdown-menu > .cms-menu-inner {
        min-width: 11rem !important;
        width: max-content !important;
        max-width: calc(100vw - 2rem) !important;
      }
    }
    .cms-hover-dropdown > .dropdown-menu > .cms-menu-inner {
      min-width: 11.5rem !important;
      max-width: 100% !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    body {
      overflow-x: hidden;
    }

    .cms-admin-shell {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }
    .cms-admin-aside {
      width: 100%;
      flex: 0 0 auto;
    }
    .cms-admin-main {
      width: 100%;
      min-width: 0;
      flex: 1 1 auto;
    }
    @media (min-width: 992px) {
      .cms-admin-shell {
        flex-direction: row;
        align-items: flex-start;
      }
      .cms-admin-aside {
        width: 265px;
        flex: 0 0 265px;
      }
    }
    .cms-grid-2 {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.25rem;
    }
    @media (min-width: 992px) {
      .cms-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    .cms-check-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      padding: 0.65rem 0.9rem;
      border-radius: 0.65rem;
      background: rgba(11, 18, 32, 0.85);
      border: 1px solid rgba(148, 163, 184, 0.22);
    }
    .cms-page-head {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

    .article-content pre,
    .cms-code-box pre {
      position: relative;
      background: #080d18 !important;
      border: 1px solid rgba(34, 211, 238, 0.28);
      border-left: 4px solid #22d3ee;
      border-radius: 0.75rem;
      padding: 2.35rem 1rem 1rem 1rem !important;
      margin: 1.25rem 0;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
      overflow-x: auto;
    }
    .article-content pre code,
    .cms-code-box pre code {
      background: transparent !important;
      padding: 0 !important;
      font-size: 0.9rem;
      line-height: 1.55;
    }
    .copy-code-btn {
      position: absolute;
      top: 0.55rem;
      right: 0.6rem;
      z-index: 2;
      padding: 0.2rem 0.6rem;
      font-size: 0.75rem;
      line-height: 1.2;
      background: rgba(15, 23, 42, 0.92);
      border-color: rgba(148, 163, 184, 0.45);
      color: #e2e8f0;
    }
    .copy-code-btn:hover,
    .copy-code-btn:focus-visible {
      background: #22d3ee;
      border-color: #22d3ee;
      color: #09111e;
    }

    .article-content::after {
      content: "";
      display: table;
      clear: both;
    }
    .cms-img-wrap {
      position: relative;
      display: block;
      max-width: 100%;
      margin: 1rem 0;
    }
    .cms-img-wrap img,
    .article-content img {
      display: block;
      max-width: 100%;
      width: 100%;
      height: auto;
      border-radius: 0.75rem;
    }
    .cms-img-wrap.cms-img-size-sm { width: min(260px, 100%); }
    .cms-img-wrap.cms-img-size-md { width: min(420px, 100%); }
    .cms-img-wrap.cms-img-size-lg { width: min(680px, 100%); }
    .cms-img-wrap.cms-img-size-full { width: 100%; }
    .cms-img-wrap.cms-img-size-auto { width: auto; max-width: 100%; }

    .cms-img-wrap.cms-img-align-left {
      float: left;
      margin: 0.35rem 1.35rem 0.9rem 0;
    }
    .cms-img-wrap.cms-img-align-right {
      float: right;
      margin: 0.35rem 0 0.9rem 1.35rem;
    }
    .cms-img-wrap.cms-img-align-center {
      margin-left: auto;
      margin-right: auto;
    }
    @media (max-width: 640px) {
      .cms-img-wrap.cms-img-align-left,
      .cms-img-wrap.cms-img-align-right {
        float: none;
        width: 100%;
        margin: 1rem 0;
      }
    }
    .cms-img-zoom-btn {
      position: absolute;
      top: 0.55rem;
      right: 0.55rem;
      z-index: 3;
      width: 2.1rem;
      height: 2.1rem;
      border-radius: 999px;
      border: 1px solid rgba(34, 211, 238, 0.55);
      background: rgba(8, 13, 24, 0.85);
      color: #22d3ee;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
      transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    }
    .cms-img-zoom-btn:hover,
    .cms-img-zoom-btn:focus-visible {
      transform: scale(1.06);
      background: #22d3ee;
      color: #08101c;
      outline: none;
    }
    .cms-lightbox-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2000;
      background: rgba(3, 7, 18, 0.88);
      backdrop-filter: blur(6px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
    }
    .cms-lightbox-backdrop.is-open {
      display: flex;
    }
    .cms-lightbox-dialog {
      position: relative;
      max-width: min(92vw, 1200px);
      max-height: 90vh;
      background: #0b1220;
      border: 1px solid rgba(34, 211, 238, 0.35);
      border-radius: 1rem;
      padding: 1rem;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
    }
    .cms-lightbox-img {
      max-width: 100%;
      max-height: 76vh;
      width: auto;
      height: auto;
      border-radius: 0.65rem;
      object-fit: contain;
    }
    .cms-lightbox-close {
      position: absolute;
      top: 0.6rem;
      right: 0.6rem;
      z-index: 2;
      width: 2.2rem;
      height: 2.2rem;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.4);
      background: rgba(15, 23, 42, 0.92);
      color: #f8fafc;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .cms-lightbox-close:hover,
    .cms-lightbox-close:focus-visible {
      border-color: #22d3ee;
      color: #22d3ee;
      outline: none;
    }

    .article-content a {
      color: #38bdf8;
      text-decoration: none;
      border-bottom: 1px solid rgba(56, 189, 248, 0.45);
      padding-bottom: 1px;
      transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    }
    .article-content a:hover,
    .article-content a:focus-visible {
      color: #bae6fd;
      border-bottom-color: #38bdf8;
      background-color: rgba(56, 189, 248, 0.10);
      border-radius: 3px;
    }
    .cms-tag-box {
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid rgba(148, 163, 184, 0.22);
      border-radius: 0.75rem;
      padding: 0.65rem 0.85rem;
      max-height: 112px;
      overflow-y: auto;
    }
    .cms-card-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.35rem 0.6rem;
      font-size: 0.74rem;
    }
    .cms-card-meta-right {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      white-space: nowrap;
    }

/* Statistik-Pagination (Top-Artikel & Länder) */
.cms-stat-list .cms-stat-items > .is-paginated-hidden {
  display: none !important;
}

.cms-pagination .btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

html[data-theme="light"] .cms-pagination .btn-outline-secondary {
  color: var(--cms-text-main);
  border-color: var(--cms-border-subtle);
}

html[data-theme="light"] .cms-pagination .btn-outline-secondary:hover:not(:disabled) {
  background-color: var(--cms-bg-elevated);
  border-color: #0284c7;
  color: #0f172a;
}

/* Article Back-to-Top Button */
.cms-back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(9, 17, 26, 0.92);
  color: #f1f5f9;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease,
              border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.cms-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cms-back-to-top:hover,
.cms-back-to-top:focus-visible {
  border-color: #22d3ee;
  color: #22d3ee;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
}

html[data-theme="light"] .cms-back-to-top {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .cms-back-to-top:hover,
html[data-theme="light"] .cms-back-to-top:focus-visible {
  border-color: #0284c7;
  color: #0284c7;
  background: #eef3f9;
}

@media (max-width: 575.98px) {
  .cms-back-to-top {
    right: 1rem;
    bottom: 1rem;
    padding: 0.65rem 0.75rem;
  }

  .cms-back-to-top-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cms-back-to-top {
    transition: none;
  }
}
