/* Gemeinsamer Kopf und Fuß aller DDAS-Infoseiten (Canvas „Gemeinsamer Kopf DDAS“, Michael 2026-11-09):
   Website, Documentation Hub mit den Online-Manuals, Sicherheitsseite, Ablage der Erklärungen, Startseite des Wizards.
   Quelle ist die Website: der Build legt diese Datei und die Bausteine unter /shared/ ab (scripts/bausteine.mjs), die
   anderen Seiten holen sie beim eigenen Build. Alles hängt an .dk-kopf und .dk-fuss mit eigenen Werten, damit fremdes
   CSS nicht hineinwirkt. Die Schriften (Barlow, IBM Plex Mono) bringt jede Seite selbst mit; ohne sie greift der Ersatz.
   Menü und Aufklappen ohne JavaScript (details/summary), passend zu strengen Content-Security-Policies. */

.dk-band { --dk-navy: #0C1B2E; --dk-paper: #F6F5F2; --dk-hell: #6FA3C9; --dk-amber: #E2A33C;
  --dk-sans: "Barlow", "Helvetica Neue", Arial, sans-serif; --dk-mono: "IBM Plex Mono", Consolas, monospace;
  --dk-max: 1240px; --dk-rand: clamp(16px, 4vw, 40px); }
.dk-kopf, .dk-fuss {
  --dk-navy: #0C1B2E;
  --dk-zeile: #10233A;            /* Seitenzeile, eine Spur heller als der Kopf */
  --dk-paper: #F6F5F2;
  --dk-hell: #6FA3C9;             /* Steel Blue auf Navy (ca. 6,2:1) */
  --dk-amber: #E2A33C;
  --dk-sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --dk-mono: "IBM Plex Mono", Consolas, monospace;
  --dk-max: 1240px;
  --dk-rand: clamp(16px, 4vw, 40px);
  display: block; width: auto; max-width: none; margin: 0; padding: 0; border: 0; float: none;
  background: var(--dk-navy); color: var(--dk-paper); font-family: var(--dk-sans); font-size: 16px; line-height: 1.5;
  text-align: left; -webkit-text-size-adjust: 100%;
}
.dk-kopf *, .dk-kopf *::before, .dk-kopf *::after, .dk-fuss *, .dk-fuss *::before, .dk-fuss *::after { box-sizing: border-box; }
.dk-kopf p, .dk-fuss p { margin: 0; color: inherit; }
.dk-kopf nav, .dk-fuss nav { margin: 0; padding: 0; }
.dk-kopf a, .dk-fuss a { text-decoration: none; }
.dk-kopf img, .dk-fuss img { display: block; max-width: none; border: 0; }
.dk-kopf svg, .dk-fuss svg { flex: none; }
.dk-kopf :focus-visible, .dk-fuss :focus-visible { outline: 2px solid var(--dk-hell); outline-offset: 3px; }
.dk-innen { width: 100%; max-width: var(--dk-max); margin: 0 auto; padding-left: var(--dk-rand); padding-right: var(--dk-rand); }
.dk-versteckt {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Kopf: Hauptzeile ---------- */

.dk-kopf { position: relative; z-index: 30; }
.dk-skip {
  position: absolute; left: 16px; top: -60px; z-index: 40;
  background: var(--dk-paper); color: var(--dk-navy); padding: 8px 14px; border-radius: 4px;
}
.dk-skip:focus { top: 16px; }
.dk-oben { position: relative; }
.dk-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 16px; padding-bottom: 16px; }
.dk-logo { flex-shrink: 0; }
.dk-logo img { height: 44px; width: auto; }
.dk-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; font-size: 16px; font-weight: 500; }
.dk-kopf .dk-nav a { color: var(--dk-paper); padding: 8px 0; border-bottom: 2px solid transparent; }
.dk-kopf .dk-nav a:hover { color: var(--dk-hell); }
.dk-kopf .dk-nav a[aria-current="page"] { font-weight: 600; border-bottom-color: var(--dk-hell); }
.dk-aktionen { display: flex; align-items: center; gap: 8px; }
.dk-kopf .dk-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 6px;
  color: var(--dk-paper);
}
.dk-kopf .dk-ico:hover { background: rgba(111, 163, 201, 0.15); color: var(--dk-paper); }
.dk-kopf .dk-ico[aria-current="page"] { background: rgba(246, 245, 242, 0.14); }
/* Sprachumschalter: Links (Website, Hub, Ablage) oder Schaltflächen (Sicherheitsseite, Wizard) */
.dk-lang { display: inline-flex; border: 1px solid rgba(246, 245, 242, 0.35); border-radius: 4px; padding: 2px; }
.dk-kopf .dk-lang a, .dk-kopf .dk-lang button, .dk-kopf .dk-lang span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 32px; margin: 0; padding: 0 10px;
  border: 0; border-radius: 3px; background: transparent; color: var(--dk-paper); font: 400 12px/1 var(--dk-mono); cursor: pointer;
}
.dk-kopf .dk-lang a:hover, .dk-kopf .dk-lang button:hover { color: var(--dk-hell); }
.dk-kopf .dk-lang [aria-current="true"], .dk-kopf .dk-lang [aria-pressed="true"] { background: var(--dk-paper); color: var(--dk-navy); cursor: default; }
/* Seite gibt es nur in einer Sprache: die andere bleibt sichtbar, aber ausgegraut (Menü springt nicht, Michael 2026-11-09) */
.dk-kopf .dk-lang [aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.dk-kopf .dk-lang [aria-disabled="true"]:hover { color: var(--dk-paper); }
.dk-kopf .dk-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 7px 18px;
  border: 2px solid var(--dk-hell); border-radius: 6px; background: transparent; color: var(--dk-paper); font: 600 15px/1.2 var(--dk-sans);
}
.dk-kopf .dk-btn:hover { background: rgba(111, 163, 201, 0.15); color: var(--dk-paper); }

/* Menü für schmale Fenster */
.dk-menu, .dk-mlang { display: none; }
.dk-menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px;
  padding: 0 12px; border-radius: 6px; background: rgba(246, 245, 242, 0.08); color: var(--dk-paper); font: 500 15px var(--dk-sans);
}
.dk-menu > summary::-webkit-details-marker { display: none; }
.dk-menu:not([open]) .dk-zu, .dk-menu[open] .dk-auf { display: none; }
.dk-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40; display: flex; flex-direction: column;
  padding: 4px var(--dk-rand) 24px; background: var(--dk-navy); border-top: 1px solid rgba(246, 245, 242, 0.14);
  box-shadow: 0 24px 32px rgba(12, 27, 46, 0.35); height: calc(100vh - 64px); height: calc(100dvh - 64px); overflow-y: auto;
}
.dk-kopf .dk-mlink {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
  border-bottom: 1px solid rgba(246, 245, 242, 0.12); color: var(--dk-paper); font-size: 20px; font-weight: 500;
}
.dk-kopf .dk-mlink:hover { color: var(--dk-hell); }
.dk-kopf .dk-mlink[aria-current="page"] { font-weight: 600; }
.dk-hint { font: 500 12px var(--dk-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dk-hell); }
.dk-kopf .dk-cta {
  display: flex; align-items: center; justify-content: center; margin-top: 20px; min-height: 52px; border-radius: 6px;
  background: var(--dk-amber); color: var(--dk-navy); font: 600 17px var(--dk-sans);
}
.dk-kopf .dk-cta:hover { background: #D6962F; color: var(--dk-navy); }

/* ---------- Kopf: Seitenzeile (nur außerhalb von www) ---------- */

.dk-zeile { background: var(--dk-zeile); border-top: 1px solid rgba(246, 245, 242, 0.12); }
.dk-zeile .dk-innen { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; min-height: 56px; }
.dk-kopf .dk-titel {
  min-width: 0; padding: 4px 0; border-bottom: 2px solid var(--dk-amber);
  color: var(--dk-paper); font-size: 18px; font-weight: 600; line-height: 1.25;
}
.dk-kopf .dk-titel:hover { color: var(--dk-paper); }
/* margin-left: auto hält die Links rechts, auch wenn die Seitenzeile keinen Titel trägt (Startseite des Hubs) */
.dk-lokal { display: flex; align-items: center; gap: 4px 24px; flex: none; }
.dk-kopf .dk-lokal { margin-left: auto; }
.dk-kopf .dk-lokal a, .dk-kopf .dk-lokal button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0; border: 0; background: transparent;
  color: rgba(246, 245, 242, 0.82); font: 500 15px var(--dk-sans); cursor: pointer;
}
.dk-kopf .dk-lokal a:hover, .dk-kopf .dk-lokal button:hover { color: var(--dk-hell); }
.dk-kopf .dk-lokal [aria-current="page"] { color: var(--dk-paper); font-weight: 600; }

/* ---------- Titelband unter dem Kopf (Hub, Manuals, Sicherheitsseite, Ablage; Michael 2026-11-09) ----------
   Wie der Einstieg der Webseite: Etikett, Titel groß mit Amber-Linie, Einleitung. Jede Infoseite trägt ihren Titel hier,
   die Seitenzeile darüber nur noch Links. */
.dk-band {
  display: block; margin: 0; padding: 0; background: var(--dk-navy); color: var(--dk-paper);
  font-family: var(--dk-sans); line-height: 1.5; text-align: left;
}
.dk-band *, .dk-band *::before, .dk-band *::after { box-sizing: border-box; }
.dk-band .dk-innen { padding-top: 56px; padding-bottom: 64px; }
.dk-band .dk-eyebrow {
  margin: 0 0 16px; font: 500 15px var(--dk-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dk-hell);
}
.dk-band .dk-eyebrow a { color: var(--dk-hell); text-decoration: none; }
.dk-band .dk-eyebrow a:hover { color: var(--dk-paper); }
.dk-band h1 {
  display: inline-block; max-width: 100%; margin: 0; padding: 0 0 0.3em; border: 0; border-bottom: 2px solid var(--dk-amber);
  font: 600 clamp(36px, 5vw, 64px)/1.06 var(--dk-sans); letter-spacing: -0.01em; color: var(--dk-paper); text-align: left;
}
.dk-band .dk-lead {
  margin: 24px 0 0; max-width: 820px; font: 500 clamp(18px, 1.6vw, 22px)/1.45 var(--dk-sans); color: rgba(246, 245, 242, 0.82);
}
.dk-band .dk-lead + .dk-lead { margin-top: 8px; }
@media (max-width: 720px) {
  .dk-band .dk-innen { padding-top: 40px; padding-bottom: 44px; }
  .dk-band .dk-eyebrow { font-size: 13px; }
}

/* ---------- Fuß ---------- */

.dk-fuss { color: rgba(246, 245, 242, 0.72); font-size: 15px; }
.dk-fuss a { color: var(--dk-paper); }
.dk-fuss a:hover { color: var(--dk-hell); }
.dk-spalten { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 24px 32px; padding-top: 40px; }
.dk-spalte { display: flex; flex-direction: column; gap: 6px; }
.dk-fuss .dk-eb { margin: 0 0 4px; font: 500 12px var(--dk-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dk-hell); }
.dk-fuss .dk-firma { color: rgba(246, 245, 242, 0.85); }
.dk-mails { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.dk-leiste {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-top: 28px; padding: 18px 0 22px; border-top: 1px solid var(--dk-hell);
}
.dk-leiste img { height: 28px; width: auto; }
.dk-klein { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font: 400 11px var(--dk-mono); color: rgba(246, 245, 242, 0.55); }
.dk-fuss .dk-klein a { color: rgba(246, 245, 242, 0.8); }
.dk-fuss .dk-klein a:hover { color: var(--dk-hell); }
.dk-schmal { display: none; }
.dk-gruppen { border-top: 1px solid rgba(246, 245, 242, 0.12); }
.dk-unten { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 20px; }
.dk-acc { border-bottom: 1px solid rgba(246, 245, 242, 0.12); }
.dk-acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  font: 500 12px var(--dk-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dk-hell);
}
.dk-acc > summary::-webkit-details-marker { display: none; }
.dk-acc nav { display: flex; flex-direction: column; padding: 0 0 12px; }
.dk-fuss .dk-acc a { display: flex; align-items: center; min-height: 44px; font-size: 16px; }
.dk-chev { transition: transform 0.2s; }
.dk-acc[open] > summary .dk-chev { transform: rotate(180deg); }

/* ---------- Schmale Fenster ---------- */

@media (max-width: 1080px) {
  /* Der Kopf klebt oben, solange er keine Seitenzeile trägt (sonst nähme er am Handy zu viel Höhe) */
  .dk-kopf:not(:has(.dk-zeile)) { position: sticky; top: 0; }
  .dk-bar { flex-wrap: nowrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; min-height: 64px; }
  .dk-logo img { height: 36px; }
  .dk-nav { display: none; }
  .dk-menu { display: block; }
  .dk-kopf .dk-btn { padding: 0 14px; }
  .dk-spalten { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dk-spalten > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .dk-zeile .dk-innen { min-height: 52px; gap: 8px; }
  .dk-kopf .dk-titel { font-size: 15px; }
  .dk-lokal { gap: 0; }
  .dk-kopf .dk-lokal a, .dk-kopf .dk-lokal button { justify-content: center; width: 44px; border-radius: 6px; }
  .dk-kopf .dk-lokal [aria-current="page"] { background: rgba(246, 245, 242, 0.10); }
  .dk-lokal a span, .dk-lokal button span {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .dk-breit { display: none; }
  .dk-schmal { display: flex; flex-direction: column; gap: 16px; padding-top: 32px; }
  .dk-schmal .dk-mails a { display: inline-flex; align-items: center; min-height: 44px; }
  .dk-schmal .dk-leiste { margin-top: 4px; border-top: 0; padding-top: 0; }
  .dk-schmal .dk-klein a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* Kleine Handys: Umschalter DE | EN als erste Zeile im Menü, Menü nur als Symbol */
@media (max-width: 479px) {
  .dk-aktionen > .dk-lang { display: none; }
  .dk-mlang {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
    border-bottom: 1px solid rgba(246, 245, 242, 0.12); color: var(--dk-paper); font-size: 16px;
  }
  .dk-menu > summary { padding: 0; justify-content: center; }
  .dk-menu > summary span {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  @supports selector(::details-content) {
    .dk-acc { interpolate-size: allow-keywords; }
    .dk-acc::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 0.3s ease, opacity 0.3s ease, content-visibility 0.3s allow-discrete; }
    .dk-acc[open]::details-content { block-size: auto; opacity: 1; }
    .dk-menu::details-content { transition: content-visibility 0.25s allow-discrete; }
    .dk-menu .dk-panel { opacity: 0; translate: 0 -8px; transition: opacity 0.25s ease, translate 0.25s ease; }
    .dk-menu[open] .dk-panel { opacity: 1; translate: 0 0; }
    @starting-style { .dk-menu[open] .dk-panel { opacity: 0; translate: 0 -8px; } }
  }
}
@media (prefers-reduced-motion: reduce) { .dk-chev { transition: none; } }
