/* CBZS-Beratungsportal — Oberfläche. Nebel-Grund, Glaskarten, ein Akzent (Messing).
   Kontrast: Fließtext #1b1c1f, Nebentext #6b6e75, Text in Messing #7d590d (AA); Messing #a8781f nur für Flächen,
   Linien und große Zahlen. Keine Inline-Stile (CSP style-src 'self'). */
:root {
  --grund: #f7f7f9; --text: #1b1c1f; --neben: #6b6e75; --messing: #a8781f; --messing-hell: #d9ab53; --messing-text: #7d590d;
  --karte: rgba(255, 255, 255, .78); --rand: rgba(27, 28, 31, .10); --fehler: #a3261c; --ok: #2f6b3a;
  --schatten: 0 1px 2px rgba(27, 28, 31, .04), 0 8px 28px rgba(27, 28, 31, .07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.5 -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; min-width: 320px; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(900px 480px at 85% -10%, rgba(217, 171, 83, .16), transparent 70%), radial-gradient(700px 400px at -10% 10%, rgba(27, 28, 31, .05), transparent 70%); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
a { color: var(--messing-text); }
:focus-visible { outline: 3px solid var(--messing); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 8px; }
.noscript, .neben { color: var(--neben); }
.klein { font-size: .85rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf und Leisten */
.kopf { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--karte); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--rand); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 650; min-width: 0; }
.marke .punkt { width: 26px; height: 26px; border-radius: 8px; background: var(--text); color: var(--messing-hell); display: grid; place-items: center; flex: none; }
.marke span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abstand { flex: 1; }
.merker { font-size: .8rem; border: 1px solid var(--messing); color: var(--messing-text); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.leiste { padding: 9px 18px; font-size: .9rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--rand); }
.leiste.demo { background: #fbf3df; }
.leiste.hinweis { background: #eef0f4; }
.leiste.sperre { background: #f6e4e1; }
.leiste strong { font-weight: 650; }
.umschalter { display: inline-flex; border: 1px solid var(--rand); border-radius: 999px; background: #fff; padding: 2px; gap: 2px; flex-wrap: wrap; }
.umschalter button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font: inherit; color: var(--text); cursor: pointer; min-height: 32px; }
.umschalter button[aria-pressed="true"] { background: var(--text); color: #fff; }
.umschalter small { display: block; color: inherit; opacity: .8; font-size: .72rem; }

/* Aufbau */
.rahmen { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px 18px 40px; max-width: 1240px; margin: 0 auto; }
@media (min-width: 900px) { .rahmen { grid-template-columns: 236px 1fr; } }
.nav { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
@media (min-width: 900px) { .nav { flex-direction: column; flex-wrap: nowrap; position: sticky; top: 70px; align-self: start; } }
.nav a { display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--text); border: 1px solid transparent; min-height: 40px; }
.nav a:hover { background: rgba(255, 255, 255, .8); }
.nav a[aria-current="page"] { background: #fff; border-color: var(--messing); box-shadow: var(--schatten); }
.nav a.gesperrt { color: var(--neben); }
.nav .ab { margin-left: auto; font-size: .72rem; border: 1px solid var(--rand); border-radius: 999px; padding: 0 8px; background: #fff; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
main { min-width: 0; }
main:focus { outline: none; }

/* Karten */
.karte { background: var(--karte); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .9); outline: 1px solid var(--rand); outline-offset: -1px; border-radius: 18px; box-shadow: var(--schatten); padding: 18px; margin-bottom: 14px; min-width: 0; }
.karte > :last-child { margin-bottom: 0; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kacheln .karte { margin: 0; }
.kachel .name { color: var(--neben); font-size: .85rem; }
.kachel .wert { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kachel .delta { font-size: .85rem; color: var(--neben); }
.raster2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.raster2 .karte { margin: 0; }
.diagramm { width: 100%; height: auto; display: block; }
.diagramm text { font: 11px -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; fill: #55585f; }
.diagramm .achse { stroke: var(--rand); stroke-width: 1; }
.diagramm .achse { stroke-dasharray: 2 4; }
.diagramm .linie { fill: none; stroke: var(--messing); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: zeichnen 1.1s ease-out both; }
.diagramm .flaeche { stroke: none; animation: einblenden .9s ease-out .3s both; }
.diagramm .punkt { fill: transparent; }                  /* große, unsichtbare Trefferfläche für den Tooltip */
.diagramm .punkt:hover { fill: var(--messing); fill-opacity: .18; }
.diagramm .punkt.jetzt { fill: var(--messing); stroke: #fff; stroke-width: 2; }
.diagramm .balken { transition: opacity .2s; }
.diagramm .balken:hover { opacity: .8; }
@keyframes zeichnen { from { stroke-dashoffset: 1; } }
@keyframes einblenden { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .diagramm .linie, .diagramm .flaeche { animation: none; } }
.diagramm .balken { fill: var(--messing); }
.diagramm .balken.jetzt { fill: var(--text); }
.fortschritt { height: 8px; display: block; width: 100%; }
.fortschritt .spur { fill: #e6e6ea; } .fortschritt .fuell { fill: var(--messing); }

/* Formulare und Knöpfe */
label { display: block; font-size: .85rem; color: #4a4d54; margin-bottom: 4px; }
input, select, textarea { font: inherit; color: var(--text); width: 100%; background: #fff; border: 1px solid #b9bcc4; border-radius: 12px; padding: 9px 12px; min-height: 42px; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--messing); flex: none; margin-top: 2px; }
.feld { margin-bottom: 12px; }
.zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.zeile > .feld { flex: 1 1 160px; min-width: 0; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; border-radius: 999px; padding: 9px 18px; min-height: 42px; border: 1px solid var(--text); background: var(--text); color: #fff; cursor: pointer; text-decoration: none; }
.knopf:hover { background: #33353b; }
.knopf.hell { background: #fff; color: var(--text); border-color: #b9bcc4; }
.knopf.hell:hover { border-color: var(--messing); }
.knopf.messing { background: var(--messing-hell); border-color: var(--messing); color: var(--text); }
.knopf.klein { padding: 4px 12px; min-height: 34px; font-size: .85rem; }
.knopf[disabled] { opacity: .55; cursor: default; }
.fehler { color: var(--fehler); font-size: .9rem; margin: 6px 0; }
.erfolg { color: var(--ok); font-size: .9rem; margin: 6px 0; }
details > summary { cursor: pointer; font-weight: 600; min-height: 32px; }

/* Listen und Tabellen */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { padding: 12px 0; border-top: 1px solid var(--rand); display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.liste > li:first-child { border-top: 0; }
.liste .kern { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.liste .titel { font-weight: 600; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.tabelle-huelle { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 8px 10px; border-top: 1px solid var(--rand); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 600; font-size: .82rem; color: #4a4d54; border-top: 0; }
td.links, th.links { text-align: left; white-space: normal; }
.etikett { display: inline-block; font-size: .75rem; border: 1px solid var(--rand); background: #fff; border-radius: 999px; padding: 0 9px; color: #4a4d54; }
.etikett.messing { border-color: var(--messing); color: var(--messing-text); }
.nachrichten { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.blase { max-width: 86%; padding: 10px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--rand); overflow-wrap: anywhere; }
.blase.eigene { align-self: flex-end; background: #fbf3df; border-color: rgba(168, 120, 31, .35); }
.blase .von { font-size: .78rem; color: var(--neben); margin-bottom: 2px; }
.gesperrt-seite { text-align: left; max-width: 620px; }
.gesperrt-seite .gross { width: 36px; height: 36px; color: var(--messing-text); margin-bottom: 8px; }

/* Anmeldung */
.mitte { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.anmeldung { width: 100%; max-width: 420px; }
.anmeldung .marke { margin-bottom: 18px; }
.trenner { display: flex; align-items: center; gap: 10px; color: var(--neben); font-size: .85rem; margin: 14px 0; }
.trenner::before, .trenner::after { content: ""; flex: 1; border-top: 1px solid var(--rand); }
.anmeldung .knopf { width: 100%; }
