/* ==========================================================================
   AzubiWiki – Stylesheet
   Modern, minimalistisch, Hell-/Dunkelmodus. Keine externen Schriften (DSGVO).
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e5e7eb;
  --border-strong: #d2d6dc;
  --text: #0f1216;
  --text-2: #444b55;
  --text-3: #6b7280;
  --accent: #0e7c66;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f0;
  --accent-text: #0b6655;
  --ost: #5b6cd6;
  --level-1: #0e7c66;
  --level-2: #3f9a5a;
  --level-3: #a1830c;
  --level-4: #c2610f;
  --level-5: #c4321f;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, 0.18), 0 2px 6px rgba(16, 24, 40, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d10;
    --bg-soft: #13161b;
    --surface: #111418;
    --surface-2: #161a20;
    --border: #252a32;
    --border-strong: #343a44;
    --text: #eef0f3;
    --text-2: #b9bfc8;
    --text-3: #8b93a0;
    --accent: #34d3a6;
    --accent-ink: #062b22;
    --accent-soft: #102a24;
    --accent-text: #5fe0bc;
    --ost: #8c9bff;
    --level-1: #34d3a6;
    --level-2: #7bd389;
    --level-3: #e2c14a;
    --level-4: #f59e4b;
    --level-5: #ff7a66;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-soft: #13161b;
  --surface: #111418;
  --surface-2: #161a20;
  --border: #252a32;
  --border-strong: #343a44;
  --text: #eef0f3;
  --text-2: #b9bfc8;
  --text-3: #8b93a0;
  --accent: #34d3a6;
  --accent-ink: #062b22;
  --accent-soft: #102a24;
  --accent-text: #5fe0bc;
  --ost: #8c9bff;
  --level-1: #34d3a6;
  --level-2: #7bd389;
  --level-3: #e2c14a;
  --level-4: #f59e4b;
  --level-5: #ff7a66;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -0.03em; }
h1, h2, h3, .bi-name, .so-name, .rank a, .chip { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 480px) { h1 { font-size: 1.75rem; } }
h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--text); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 200; background: var(--text); color: var(--bg);
  padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }
.muted { color: var(--text-2); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; color: var(--text-3); }
.nowrap { white-space: nowrap; }
.tabnum { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; font-size: 1.125rem; letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a { color: var(--text-2); padding: 8px 12px; border-radius: 10px; font-weight: 550; font-size: 0.9375rem; }
.nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.mobile-nav { display: none; border-top: 1px solid var(--border); padding: 8px 0 12px; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 10px 4px; color: var(--text); font-weight: 550; }
.header-search { border-top: 1px solid var(--border); padding: 12px 0 14px; }
.header-search[hidden] { display: none; }
@media (min-width: 860px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav, .mobile-nav.is-open { display: none; }
}

/* ---------- Suche ---------- */
.search { position: relative; width: 100%; }
.search-field { position: relative; }
.search-field > svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--text-3); pointer-events: none;
}
.search input {
  width: 100%; height: 52px; padding: 0 16px 0 48px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 14px;
  font-size: 1rem; transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search--lg input { height: 60px; font-size: 1.0625rem; border-radius: 16px; box-shadow: var(--shadow-sm); }
.search-list {
  position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  max-height: min(440px, 60vh); overflow-y: auto; text-align: left;
}
.search-list[hidden] { display: none; }
.search-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.search-option[aria-selected="true"], .search-option:hover { background: var(--accent-soft); }
.search-option .so-name { font-weight: 600; color: var(--text); }
.search-option .so-meta { font-size: 0.8125rem; color: var(--text-3); white-space: nowrap; }
.search-option .so-hint { display: block; font-size: 0.8125rem; color: var(--text-3); font-weight: 400; }
.search-option mark { background: transparent; color: var(--accent-text); font-weight: 750; }
.search-empty { padding: 14px 12px; color: var(--text-2); font-size: 0.9375rem; }
.search-empty a { font-weight: 600; }

/* ---------- Bausteine ---------- */
.section { padding: 40px 0; }
.section + .section { padding-top: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--text-2); }
.lead { font-size: 1.125rem; color: var(--text-2); }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: 0.4em; }
.card--soft { background: var(--bg-soft); border-color: transparent; }
a.card { color: inherit; display: block; transition: border-color 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--border-strong); text-decoration: none; transform: translateY(-1px); }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: 0.8125rem; color: var(--text-3); font-weight: 550; }
.stat-value { font-size: 1.75rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 0.8125rem; color: var(--text-3); margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 0.8125rem; font-weight: 550; line-height: 1.5; max-width: 100%;
}
a.chip:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.chip--accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
button.chip { cursor: pointer; white-space: nowrap; }
.chips--scroll { margin-bottom: 14px; }
@media (max-width: 719px) {
  .chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
  .chips--scroll::-webkit-scrollbar { display: none; }
  .chips--scroll .chip { flex: none; }
}
button.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 650; font-size: 0.9375rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.06); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; }
.seg button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer;
  color: var(--text-2); font-weight: 650; font-size: 0.875rem; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }

.note {
  border-radius: 12px; background: var(--bg-soft); padding: 14px 16px; color: var(--text-2); font-size: 0.875rem;
}
.note strong { color: var(--text); }
.note p:last-child { margin-bottom: 0; }

.breadcrumb { font-size: 0.8125rem; color: var(--text-3); margin: 20px 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-3); }

/* ---------- Startseite ---------- */
.hero { padding: 56px 0 32px; text-align: center; }
.hero h1 { max-width: 22ch; margin: 0 auto 0.4em; }
.hero .lead { max-width: 640px; margin: 0 auto 28px; }
.hero .search { max-width: 640px; margin: 0 auto; }
.hero-popular { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.hero-popular .tiny { margin-right: 4px; }
@media (min-width: 720px) { .hero { padding: 88px 0 48px; } }

.rank { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.rank li { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); counter-increment: rank; }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(rank); width: 1.5em; color: var(--text-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; flex: none; }
.rank a { color: var(--text); font-weight: 550; flex: 1; min-width: 0; }
.rank .val { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }

.kat-card h3 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kat-card .count { font-size: 0.8125rem; color: var(--text-3); font-weight: 550; }
.kat-card p { color: var(--text-2); font-size: 0.9375rem; margin-bottom: 0.6em; }
.kat-card .examples { font-size: 0.8125rem; color: var(--text-3); margin: 0; }

.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 32px 14px 0; font-weight: 650; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -1px; }
.faq details > div { padding: 0 0 16px; color: var(--text-2); }

/* ---------- Tabellen & Balken ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { font-size: 0.8125rem; color: var(--text-3); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.th-sort:hover { color: var(--text); }
.th-sort::after { content: "↕"; font-size: 0.75rem; opacity: 0.5; }
th[aria-sort="ascending"] .th-sort::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .th-sort::after { content: "↓"; opacity: 1; }
tr.is-highlight td, tr.is-highlight th { background: var(--accent-soft); }

.bar-cell { min-width: 160px; }
.bar-line { display: flex; align-items: center; gap: 10px; }
.bar-line .v { width: 5.2em; text-align: right; font-weight: 650; flex: none; }
.bar { position: relative; flex: 1; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; min-width: 60px; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; transition: width 0.35s ease; }
.bar.is-ost > span { background: var(--ost); }
.region-tag { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em; color: var(--text-3); margin-left: 2px; text-transform: uppercase; }

.yeartable td.num { font-weight: 650; }
.yeartable .is-sel { background: var(--accent-soft); }

@media (max-width: 639px) {
  .stack-table thead { display: none; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table th, .stack-table td { display: block; width: 100%; }
  .stack-table tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .stack-table tbody tr:last-child { border-bottom: 0; }
  .stack-table th, .stack-table td { border: 0; padding: 0; }
  .stack-table th { margin-bottom: 6px; }
  .stack-table td.bar-cell { margin-bottom: 6px; }
  .stack-table td.meta { display: inline; font-size: 0.8125rem; color: var(--text-3); }
  .stack-table td.meta::before { content: attr(data-label) ": "; }
  .stack-table td.meta + td.meta::before { content: " · " attr(data-label) ": "; }
}

/* ---------- Beruf-Seite ---------- */
.beruf-head { padding: 12px 0 8px; }
.beruf-head h1 { margin: 12px 0 10px; }
.beruf-head .lead { max-width: 720px; }
.page-nav { position: sticky; top: var(--header-h); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.page-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 8px 0; overflow-x: auto; scrollbar-width: none; }
.page-nav ul::-webkit-scrollbar { display: none; }
.page-nav a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--text-2); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.page-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }

.meter { display: inline-flex; gap: 4px; vertical-align: middle; }
.meter i { width: 16px; height: 8px; border-radius: 4px; background: var(--border); display: block; }
.meter.l1 i:nth-child(-n+1), .meter.l2 i:nth-child(-n+2), .meter.l3 i:nth-child(-n+3), .meter.l4 i:nth-child(-n+4), .meter.l5 i:nth-child(-n+5) { background: currentColor; }
.lvl-1 { color: var(--level-1); } .lvl-2 { color: var(--level-2); } .lvl-3 { color: var(--level-3); } .lvl-4 { color: var(--level-4); } .lvl-5 { color: var(--level-5); }
.stat .meter { margin-top: 12px; }
.lvl-label { font-weight: 650; }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding: 7px 0 7px 30px; border-bottom: 1px solid var(--border); }
.list-check li:last-child { border-bottom: 0; }
.list-check li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
}
.list-check li::after {
  content: ""; position: absolute; left: 8px; top: 15px; width: 6px; height: 9px;
  border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(45deg);
}
.list-dot { list-style: none; padding: 0; margin: 0; }
.list-dot li { position: relative; padding: 6px 0 6px 20px; }
.list-dot li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.stackbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg-soft); margin: 10px 0 12px; }
.stackbar span { display: block; height: 100%; }
.sb-0 { background: var(--border-strong); }
.sb-1 { background: color-mix(in srgb, var(--accent) 45%, var(--bg)); }
.sb-2 { background: var(--accent); }
.sb-3 { background: color-mix(in srgb, var(--accent) 60%, var(--text)); }
.sb-4 { background: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 0; font-size: 0.8125rem; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.compare { display: grid; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 9.5em 1fr 4.2em; gap: 10px; align-items: center; font-size: 0.875rem; }
.compare-row .bar { height: 10px; }
.compare-row .v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.compare-row.is-avg .bar > span { background: var(--text-3); }

/* ---------- Formulare & Rechner ---------- */
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field label, .field .label { display: block; font-size: 0.8125rem; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.field input[type="number"], .field input[type="text"], .field input[type="search"], .field select {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 1rem;
}
.field select { -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-unit { position: relative; }
.input-unit input { padding-right: 38px; }
.input-unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9375rem; color: var(--text-2); cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.calc { display: grid; gap: 16px; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.result { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; }
.result-big { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.result-sub { color: var(--text-3); font-size: 0.875rem; margin: 2px 0 14px; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; font-size: 0.9375rem; }
.result dt { color: var(--text-2); }
.result dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.result .sum { border-top: 1px solid var(--border-strong); padding-top: 8px; font-weight: 750; color: var(--text); }
.result dl > div { display: contents; }
.result dl > div[hidden] { display: none; }
dl.facts { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 12px 0 0; font-size: 0.9375rem; }
dl.facts dt { color: var(--text-2); }
dl.facts dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
details.more summary { cursor: pointer; font-size: 0.875rem; color: var(--text-2); font-weight: 600; padding: 4px 0; }

/* ---------- Berufsliste ---------- */
.list-tools { display: grid; gap: 12px; margin-bottom: 20px; }
@media (min-width: 720px) { .list-tools { grid-template-columns: 1fr 220px; align-items: end; } }
.beruf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .beruf-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.beruf-item a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: inherit; height: 100%;
}
.beruf-item a:hover { border-color: var(--border-strong); text-decoration: none; }
.beruf-item .bi-name { font-weight: 650; color: var(--text); }
.beruf-item .bi-kurz { grid-column: 1 / -1; font-size: 0.875rem; color: var(--text-2); }
.beruf-item .bi-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.beruf-item .bi-meta { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--text-3); margin-top: 4px; }
.kat-group { margin-bottom: 32px; }
.kat-group h2 { font-size: 1.25rem; display: flex; gap: 10px; align-items: baseline; }
.kat-group h2 span { font-size: 0.875rem; color: var(--text-3); font-weight: 550; }
.empty-state { padding: 32px 0; color: var(--text-2); text-align: center; }

/* ---------- Textseiten ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.35em; }
.prose table { margin: 1em 0 1.5em; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
.prose address { font-style: normal; }
.placeholder { background: color-mix(in srgb, var(--level-5) 14%, transparent); color: var(--level-5); padding: 1px 6px; border-radius: 6px; font-weight: 650; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 32px 0 40px; color: var(--text-2); font-size: 0.875rem; background: var(--surface-2); }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: 0.875rem; color: var(--text); margin-bottom: 10px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a, .link-btn { color: var(--text-2); }
.site-footer a:hover, .link-btn:hover { color: var(--text); }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; text-decoration: none; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--text-3); font-size: 0.8125rem; }

/* ---------- Einwilligungs-Banner ---------- */
.consent {
  position: fixed; z-index: 120; left: 16px; right: 16px; bottom: 16px; max-width: 460px; margin-left: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 20px; font-size: 0.9375rem;
}
.consent h2 { font-size: 1.0625rem; margin-bottom: 8px; }
.consent p { color: var(--text-2); font-size: 0.875rem; margin-bottom: 12px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent-actions .btn { width: 100%; }
.consent-actions .span-2 { grid-column: 1 / -1; }
.consent-opt { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.consent-opt strong { display: block; font-size: 0.9375rem; }
.consent-opt span { display: block; color: var(--text-3); font-size: 0.8125rem; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background 0.2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled + i { opacity: 0.6; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

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

@media print {
  .site-header, .page-nav, .site-footer, .consent, .controls, .calc { display: none !important; }
  body { background: #fff; color: #000; }
}
