/* Börse klar: Nachschlagewerk-Layout (term_lexicon_hub, V2 / M2 / D6).
   Alle Farben, Größen und Radien als --bk-* Variablen; dunkles Farbschema über prefers-color-scheme. */

@font-face {
  font-family: "Source Serif 4";
  src: url('../fonts/source-serif-4/SourceSerif4-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url('../fonts/source-serif-4/SourceSerif4-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url('../fonts/public-sans/PublicSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url('../fonts/public-sans/PublicSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url('../fonts/public-sans/PublicSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url('../fonts/public-sans/PublicSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bk-bg: #F7F7F7;
  --bk-surface: #FFFFFF;
  --bk-text: #1E1E1E;
  --bk-muted: #545454;
  --bk-accent: #22508F;
  --bk-border: #D8D8D8;
  --bk-tint: #EEF2F7;
  --bk-font-heading: "Source Serif 4", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --bk-font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bk-size-small: 14px;
  --bk-size-body: 17px;
  --bk-size-h3: 20px;
  --bk-size-h2: 24px;
  --bk-size-h1: 30px;
  --bk-radius: 2px;
  --bk-space: 6px;
  --bk-measure: 70ch;
  --bk-shadow-tint: rgba(30, 40, 60, 0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bk-bg: #161616;
    --bk-surface: #202020;
    --bk-text: #EBEBEB;
    --bk-muted: #BDBDBD;
    --bk-accent: #5E92D9;
    --bk-border: #424242;
    --bk-tint: #1C222B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bk-bg);
  color: var(--bk-text);
  font-family: var(--bk-font-body);
  font-size: var(--bk-size-body);
  line-height: 1.6;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: var(--bk-font-heading);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  hyphens: manual;
  margin: calc(var(--bk-space) * 6) 0 calc(var(--bk-space) * 2);
}
h1 { font-size: var(--bk-size-h1); margin-top: calc(var(--bk-space) * 4); }
h2 { font-size: var(--bk-size-h2); }
h3 { font-size: var(--bk-size-h3); font-weight: 600; }

p, li, dd, td, th, figcaption { text-wrap: pretty; }
p { margin: 0 0 calc(var(--bk-space) * 3); }

a {
  color: var(--bk-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover { text-decoration-thickness: 2px; }
a:active { color: var(--bk-text); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--bk-accent);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }
dfn { font-style: normal; font-weight: 700; }
small { font-size: var(--bk-size-small); }

.bk-wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
}
.bk-measure { max-width: var(--bk-measure); }

.bk-skip {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--bk-surface);
  border: 1px solid var(--bk-accent);
  border-radius: var(--bk-radius);
}
.bk-skip:focus { top: 8px; }

/* ---------- Kopf: compact_center_nav ---------- */
/* Kopfzeile und Cookie-Hinweis tragen ihre Innenbreite selbst (keine Zwischenebene) */
.bk-header, .bk-cookie {
  padding-inline: max(16px, calc((100% - 72rem) / 2 + 16px));
}
.bk-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 32px;
  row-gap: 8px;
  min-height: 64px;
  background: var(--bk-surface);
  border-bottom: 1px solid var(--bk-border);
}
.bk-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--bk-font-heading);
  font-size: var(--bk-size-h3);
  font-weight: 700;
  color: var(--bk-text);
  text-decoration: none;
}
.bk-brand svg { width: 26px; height: 26px; color: var(--bk-accent); flex: none; }
.bk-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bk-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--bk-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.bk-nav a:hover { color: var(--bk-accent); }
.bk-nav a[aria-current="page"] { border-bottom-color: var(--bk-accent); font-weight: 600; }
.bk-menu-button {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  background: var(--bk-surface);
  color: var(--bk-text);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  font: inherit;
  cursor: pointer;
}
.bk-menu-button svg { width: 20px; height: 20px; }

@media (max-width: 767px) {
  .bk-header { justify-content: space-between; }
  .js .bk-menu-button { display: inline-flex; }
  .js .bk-nav { display: none; width: 100%; padding-bottom: 8px; }
  .js .bk-nav.is-open { display: block; }
  .bk-nav ul { flex-direction: column; gap: 8px; }
}

/* ---------- Cookie-Hinweis ----------
   Ohne JavaScript: kompakter Hinweis im Dokumentfluss unter der Kopfzeile.
   Mit JavaScript (Klasse is-fixed): feste Leiste über die volle Breite am unteren Rand;
   das Skript setzt dann padding-bottom (body) und scroll-padding-bottom (html) auf ihre Höhe. */
.bk-cookie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 6px;
  padding-block: 6px;
  background: var(--bk-tint);
  border-bottom: 1px solid var(--bk-border);
}
.bk-cookie p { margin: 0; font-size: var(--bk-size-small); line-height: 1.45; max-width: 75ch; }
.bk-cookie__aktionen {
  display: flex;
  align-items: center;
  column-gap: 12px;
  font-size: var(--bk-size-small);
}
.bk-cookie__aktionen a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.bk-cookie.is-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  border-bottom: 0;
  border-top: 1px solid var(--bk-border);
  box-shadow: 0 -2px 8px var(--bk-shadow-tint);
}
.bk-cookie.is-hidden, .bk-notice-ok .bk-cookie { display: none; }
.bk-notice-ok .bk-cookie.is-shown { display: flex; }

.bk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--bk-surface);
  color: var(--bk-accent);
  border: 1px solid var(--bk-accent);
  border-radius: var(--bk-radius);
  font: inherit;
  font-size: var(--bk-size-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.bk-button:hover { background: var(--bk-accent); color: var(--bk-surface); }
.bk-button:active { background: var(--bk-text); color: var(--bk-surface); }
.bk-button[disabled] { cursor: not-allowed; opacity: 0.6; }

/* ---------- Inhalt ---------- */
main { display: block; padding-bottom: calc(var(--bk-space) * 10); }
main:focus { outline: none; }
main:focus-visible { outline: 3px solid var(--bk-accent); outline-offset: -3px; }

.bk-lead { font-size: var(--bk-size-h3); line-height: 1.5; color: var(--bk-text); max-width: 60ch; }
.bk-meta { color: var(--bk-muted); font-size: var(--bk-size-small); }

.bk-crumbs { padding-top: 12px; }
.bk-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--bk-size-small);
}
.bk-crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.bk-crumbs li + li::before { content: "›"; color: var(--bk-muted); }
.bk-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }

.bk-legal-aside {
  border-left: 2px solid var(--bk-accent);
  padding: 8px 16px;
  margin: calc(var(--bk-space) * 3) 0;
  background: var(--bk-surface);
  max-width: var(--bk-measure);
}
.bk-legal-aside p { margin: 0; font-size: var(--bk-size-small); color: var(--bk-text); }

/* Startseite */
.bk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding-top: 24px;
}
@media (min-width: 900px) {
  .bk-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding-top: 48px; }
}
.bk-hero h1 { margin-top: 0; }
.bk-hero img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--bk-radius); }
.bk-hero__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.bk-hero__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.bk-letters {
  margin: calc(var(--bk-space) * 4) 0;
  padding: 8px 0;
  border-top: 1px solid var(--bk-border);
  border-bottom: 1px solid var(--bk-border);
}
.bk-letters ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bk-letters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--bk-font-heading);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  background: var(--bk-surface);
}
.bk-letters a:hover { border-color: var(--bk-accent); }

.bk-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 48px;
}
@media (min-width: 768px) {
  .bk-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bk-group { border-top: 1px solid var(--bk-border); padding-top: 8px; }
.bk-group h3 { margin-top: 8px; }

.bk-deflist { margin: 0 0 calc(var(--bk-space) * 4); }
.bk-deflist dt { font-family: var(--bk-font-heading); font-weight: 600; margin-top: 12px; }
.bk-deflist dt a { display: inline-flex; align-items: center; min-height: 44px; }
.bk-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 calc(var(--bk-space) * 3);
  padding: 0 !important;
  list-style: none;
}
.bk-related li { margin: 0 !important; }
.bk-related a { display: inline-flex; align-items: center; min-height: 44px; }
.bk-deflist dd { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid var(--bk-border); }
.bk-deflist dd p { margin-bottom: 8px; }
.bk-deflist .bk-see { color: var(--bk-muted); font-size: var(--bk-size-small); }

/* compact_text_grid: Einträge mit 1:1-Miniatur */
.bk-entries {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .bk-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bk-entries li { border-top: 1px solid var(--bk-border); }
.bk-entry {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  color: var(--bk-text);
  text-decoration: none;
}
.bk-entry img { width: 80px; height: 80px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--bk-radius); }
.bk-entry h3 { margin: 0 0 4px; font-size: var(--bk-size-body); font-family: var(--bk-font-heading); color: var(--bk-accent); text-decoration: underline; text-underline-offset: 3px; }
.bk-entry p { margin: 0; color: var(--bk-muted); font-size: var(--bk-size-small); }
.bk-entry:hover h3 { text-decoration-thickness: 2px; }

/* Begriffsverzeichnis */
.bk-letter-section { border-top: 1px solid var(--bk-border); }
.bk-letter-section h2 { margin-top: 24px; }

/* Erklärtexte */
.bk-article-head { max-width: var(--bk-measure); }
.bk-article-figure { margin: 24px 0; }
.bk-article-figure img { width: 100%; max-width: 60rem; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--bk-radius); }
.bk-oneline {
  max-width: var(--bk-measure);
  border-left: 2px solid var(--bk-accent);
  padding: 8px 16px;
  background: var(--bk-surface);
}
.bk-oneline p { margin: 0; }
.bk-prose { max-width: var(--bk-measure); }
.bk-prose ul, .bk-prose ol { padding-left: 24px; }
.bk-prose li { margin-bottom: 6px; }

.bk-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 calc(var(--bk-space) * 4);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  background: var(--bk-surface);
}
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: left; padding: 12px 12px 8px; font-weight: 600; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-top: 1px solid var(--bk-border); }
th { font-weight: 600; }
td.bk-num, th.bk-num { text-align: right; white-space: nowrap; }

.bk-sources { max-width: var(--bk-measure); }
.bk-sources a { overflow-wrap: anywhere; }

.bk-pager {
  max-width: var(--bk-measure);
  margin-top: calc(var(--bk-space) * 6);
  border-top: 1px solid var(--bk-border);
}
.bk-pager ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; padding-top: 12px; }
.bk-pager a { display: inline-flex; align-items: center; min-height: 44px; }

/* Kontakt: Kopf mit Bild, Steckbrief als Begriffsliste, nummerierte Formularfelder */
.bk-kontakt {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 16px;
}
.bk-kontakt__kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 48px;
  padding-top: 24px;
  border-bottom: 1px solid var(--bk-border);
}
.bk-kontakt__text { flex: 1 1 32rem; min-width: 0; }
.bk-kontakt__text h1 { margin-top: 0; }
.bk-kontakt__bild { flex: 0 1 22rem; margin: 0 0 24px; }
.bk-kontakt__bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--bk-radius); }
.bk-steckbrief, .bk-entwurf { max-width: var(--bk-measure); }
.bk-steckbrief__liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin: 0 0 16px;
  border-top: 1px solid var(--bk-border);
}
.bk-steckbrief__liste > div { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--bk-border); }
.bk-steckbrief__liste dt { font-family: var(--bk-font-heading); font-weight: 600; font-size: var(--bk-size-small); color: var(--bk-muted); }
.bk-steckbrief__liste dd { margin: 0; }
.bk-steckbrief__hinweis { color: var(--bk-muted); font-size: var(--bk-size-small); }
.bk-fields { margin: 0; padding: 0; list-style: none; }
.bk-fields > li { margin-bottom: 16px; }
address { font-style: normal; }

.bk-form { max-width: 40rem; }
.bk-fields label, .bk-fields legend { display: block; font-weight: 600; margin-bottom: 4px; }
.bk-fields fieldset { border: 0; margin: 0; padding: 0; }
.bk-fields input[type="text"], .bk-fields input[type="email"], .bk-fields textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  color: var(--bk-text);
  background: var(--bk-surface);
  border: 1px solid var(--bk-muted);
  border-radius: var(--bk-radius);
}
.bk-fields textarea { min-height: 160px; }
.bk-choice, .bk-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 400 !important;
  cursor: pointer;
}
.bk-check { align-items: flex-start; padding-top: 10px; }
.bk-choice input, .bk-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--bk-accent); }
.bk-required { font-weight: 400; color: var(--bk-muted); }
.bk-error { color: var(--bk-accent); font-size: var(--bk-size-small); margin: 4px 0 0; min-height: 0; }
.bk-error:empty { display: none; }
.bk-status { font-size: var(--bk-size-small); }

/* Fuß: legal_identity_band */
.bk-footer {
  background: var(--bk-surface);
  border-top: 1px solid var(--bk-border);
  padding: 24px 0;
  font-size: var(--bk-size-small);
}
.bk-footer p { margin: 0 0 8px; max-width: 90ch; }
.bk-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.bk-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
