/* Board der Marketing-Zentrale. MIB-Designsystem: keine Verläufe, keine Schatten, Karten mit 1-px-Rahmen. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); font-size: 14px; line-height: 20px; color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.laden { padding: var(--space-8); color: var(--ink-muted); }
svg.sym { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Gerüst ---------- */
.geruest { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.leiste { background: var(--surface-alt); border-right: 1px solid var(--border); padding: var(--space-6) var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.marke { padding: 0 var(--space-2); display: grid; gap: var(--space-3); }
/* Logo von MIB Digitalkonzept: Zeichen als Maske (nimmt die Textfarbe an, hell wie dunkel), Schriftzug als Text. */
.logo { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); }
.logo-zeichen { width: 36px; height: 36px; flex: none; background: currentColor; -webkit-mask: url(../assets/favicon.svg) center / contain no-repeat; mask: url(../assets/favicon.svg) center / contain no-repeat; }
.logo-schrift { display: grid; }
.logo-schrift strong { font-size: 16px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.logo-schrift span { font-size: 13px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; }
.zugehoerig { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.leiste-fuss .zugehoerig { grid-column: 1 / -1; padding-top: var(--space-2); }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); }

.waehler { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3); cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-2); }
.waehler:hover { border-color: var(--ink); }
.waehler b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waehler span { display: block; font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waehlliste { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-1); display: grid; gap: 2px; }
.waehlliste button { text-align: left; background: none; border: 0; padding: var(--space-2); border-radius: var(--radius-sm); cursor: pointer; display: flex; justify-content: space-between; gap: var(--space-2); }
.waehlliste button:hover, .waehlliste button[aria-current="true"] { background: var(--surface-alt); }
.waehlliste small { color: var(--ink-muted); font-size: 12px; }

.nav { display: grid; gap: 2px; }
.nav .eyebrow { padding: var(--space-3) var(--space-2) var(--space-1); }
.nav a { display: flex; align-items: center; gap: var(--space-2); padding: 7px var(--space-2); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-muted); }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 600; }
.nav a .zahl { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.nav a .zahl.neu { border: 1px solid currentColor; border-radius: var(--radius-full); padding: 0 6px; font-weight: 600; }
.leiste-fuss { margin-top: auto; display: grid; gap: var(--space-2); padding-top: var(--space-4); }
.schalter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.schalter button { background: none; border: 0; padding: 6px var(--space-2); cursor: pointer; color: var(--ink-muted); font-size: 13px; }
.schalter button + button { border-left: 1px solid var(--border); }
.schalter button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }
.schalter.klein { display: inline-grid; }

.haupt { padding: var(--space-8) var(--space-8) var(--space-12); min-width: 0; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-6); }
.kopf h1 { font-size: 36px; line-height: 40px; font-weight: 700; margin-top: var(--space-2); }
.kopf .unter { color: var(--ink-muted); margin-top: var(--space-2); font-size: 16px; line-height: 24px; }
.kopf .aktionen { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.hinweis { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-3) var(--space-4); color: var(--ink-muted); margin-bottom: var(--space-6); display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.hinweis b { color: var(--ink); }

/* ---------- Bausteine ---------- */
.raster { display: grid; gap: var(--space-4); }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.r-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.r-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.r-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stapel { display: grid; gap: var(--space-4); align-content: start; }
.stapel > *, .raster > * { min-width: 0; }
.reihe { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.zwischen { justify-content: space-between; }
.abstand { margin-top: var(--space-4); }
.abstand-unten { margin-bottom: var(--space-6); }
/* Karte einer Freigabe: Überschrift und Prüfzeile neben dem Vorschaubild. Das farbige Feld und die rote Zahl sind eine
   Ausnahme vom Designsystem nur für das Board (Entscheidung vom 13.11.2026); das Wort steht immer dabei. */
.fk-neben { flex: 1 1 220px; min-width: 0; display: grid; gap: var(--space-2); align-content: start; justify-items: start; }
.feld-status { display: inline-flex; align-items: flex-start; gap: var(--space-2); padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.feld-status svg.sym { width: 16px; height: 16px; margin-top: 1px; }
.feld-status.ok { color: var(--status-ok); border-color: color-mix(in srgb, var(--status-ok) 40%, transparent); background: var(--status-ok-bg); }
.feld-status.warn { color: var(--status-warning); border-color: color-mix(in srgb, var(--status-warning) 40%, transparent); background: var(--status-warning-bg); }
.zahl-neu { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--punkt-krit); color: #fff; font-size: 12px; line-height: 1; font-weight: 700; flex: none; }

.karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-6); min-width: 0; }
.karte.eng { padding: var(--space-4); }
.karte.gewaehlt { border-color: var(--ink); }
.karte.klick { cursor: pointer; text-align: left; width: 100%; }
.karte.klick:hover { border-color: var(--accent); }
.karte.gewaehlt.klick:hover { border-color: var(--ink); }
.karte h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.karte h3, .titel { font-size: 16px; line-height: 24px; font-weight: 700; }
.karte .kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.leise { color: var(--ink-muted); }
.klein { font-size: 12px; line-height: 16px; }
.mono { font-family: var(--mono); font-size: 12px; }
.leer { border: 1px dashed var(--border); border-radius: var(--radius-xl); padding: var(--space-6); color: var(--ink-muted); }
.leer b { color: var(--ink); display: block; margin-bottom: var(--space-1); }

.knopf { display: inline-flex; align-items: center; gap: var(--space-2); border-radius: var(--radius-sm); padding: 8px 16px; font-weight: 600; cursor: pointer; border: 1px solid var(--ink); background: none; color: var(--ink); text-decoration: none; white-space: nowrap; }
.knopf.haupt-aktion { background: var(--ink); color: var(--surface); }
.knopf.zweite { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.knopf.klein { padding: 4px 10px; font-size: 13px; }
.knopf:hover { opacity: 0.85; }
.knopf[disabled] { opacity: 0.4; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; border-radius: var(--radius-full); padding: 2px 10px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--border); color: var(--ink-muted); }
.badge.ok { background: var(--status-ok); border-color: var(--status-ok); color: var(--surface); }
.badge.warn { background: var(--status-warning); border-color: var(--status-warning); color: var(--surface); }
.badge.krit { background: var(--status-critical); border-color: var(--status-critical); color: var(--surface); }
.badge.an { background: var(--ink); border-color: var(--ink); color: var(--surface); }
button.badge { font-family: inherit; }
.gross { font-size: 36px; line-height: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-ok { color: var(--status-ok); } .t-warn { color: var(--status-warning); } .t-krit { color: var(--status-critical); }
.chip { display: inline-block; font-family: var(--mono); font-size: 12px; line-height: 16px; background: var(--surface-alt); border-radius: var(--radius-sm); padding: 2px 6px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }

.reiter { display: inline-flex; gap: var(--space-1); margin-bottom: var(--space-4); flex-wrap: wrap; }
.reiter button { background: none; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; color: var(--ink-muted); font-weight: 600; }
.reiter button:hover { color: var(--ink); }
.reiter button[aria-selected="true"] { background: var(--ink); color: var(--surface); }

/* Kennzahl-Kachel */
.kachel { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: end; }
.kachel .wert { font-size: 36px; line-height: 40px; font-weight: 700; margin-top: var(--space-2); font-variant-numeric: tabular-nums; }
.kachel .trend { margin-top: var(--space-1); font-size: 13px; }
.kachel .trend .delta { font-weight: 600; }
.mini { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.mini i { width: 11px; background: var(--balken); border-radius: 3px 3px 0 0; min-height: 3px; }
.mini i:last-child { background: var(--ink); }
.mini.flach { height: 20px; gap: 2px; } .mini.flach i { width: 5px; border-radius: 2px 2px 0 0; min-height: 2px; }

/* Veränderung zur Vorperiode: Pfeil und Betrag */
.delta { white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta .pfeil { font-size: 0.75em; margin-right: 4px; position: relative; top: -1px; }
td .delta { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Statuspunkt: in Badges und an den Symbolen der Agenten. Farbe nur zusammen mit dem Wort. */
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--punkt-aus); flex: none; }
.punkt.p-ok { background: var(--punkt-ok); } .punkt.p-warn { background: var(--punkt-warn); } .punkt.p-krit { background: var(--punkt-krit); }
.badge .punkt { margin-right: 6px; }
.badge.stark { border-color: var(--ink); color: var(--ink); }
.bild { position: relative; width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--ink); }
.bild .punkt { position: absolute; right: -4px; bottom: -4px; width: 8px; height: 8px; box-sizing: content-box; border: 2px solid var(--surface); }
.mit-bild { display: flex; gap: var(--space-3); align-items: center; min-width: 0; }
.mit-bild > div { min-width: 0; }

/* Zeichen der Kanäle vor dem Namen */
svg.zeichen { width: 18px; height: 18px; flex: none; }
.kanal { display: inline-flex; align-items: center; gap: var(--space-2); vertical-align: middle; white-space: nowrap; }
.klein .kanal svg, .eyebrow.kanal svg { width: 14px; height: 14px; }

/* Karten, die zur Detailseite führen: Der Titel ist der Link, seine Fläche reicht über die ganze Karte. */
.karte.ziel { position: relative; }
.karte.ziel:hover { border-color: var(--ink); }
.sprung { text-decoration: none; }
.sprung::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sprung:focus-visible { outline: none; }
.sprung:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.karte.ziel :is(button, select, input, textarea, a:not(.sprung)) { position: relative; z-index: 1; }
a.eyebrow { text-decoration: none; }
a.eyebrow:hover { color: var(--ink); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--ink); white-space: nowrap; }
td { padding: var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
.tabelle-roll { overflow-x: auto; }
.strich { height: 14px; background: var(--balken); border-radius: var(--radius-sm); min-width: 6px; }
.strich.voll { background: var(--ink); }
.trichterzeile { display: flex; gap: 6px; align-items: center; min-width: 120px; height: 20px; }

/* Listen in Karten */
.liste { display: grid; }
.liste > * { padding: var(--space-3) 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: center; }
.liste > *:last-child { border-bottom: 0; padding-bottom: 0; }
.liste > *:first-child { padding-top: 0; }
/* Zeilen, die zur Detailseite führen oder einen Eintrag öffnen */
.liste > a { text-decoration: none; color: inherit; border-radius: var(--radius-sm); }
.liste > button { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius-sm); width: 100%; text-align: left; cursor: pointer; }
.liste > button:last-child { border-bottom: 0; }
.liste > a:hover, .liste > button:hover { outline: 1px solid var(--ink); outline-offset: 5px; border-bottom-color: transparent; }
.liste > a:first-child:hover, .liste > a:last-child:hover { outline-offset: 5px; }
.paare { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); }
.paare dt { color: var(--ink-muted); } .paare dd { margin: 0; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); align-items: start; }
.spalte { background: var(--surface-alt); border-radius: var(--radius-xl); padding: var(--space-3); display: grid; gap: var(--space-3); align-content: start; min-height: 160px; border: 1px solid transparent; }
.spalte.ziel { border-color: var(--ink); }
.spalte > header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--space-1); font-weight: 700; }
.spalte .karte { padding: var(--space-3); display: grid; gap: var(--space-2); }
.spalte .karte[draggable="true"] { cursor: grab; }
.spalte .karte.zieht { opacity: 0.4; }
.spalte select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 4px; font-size: 12px; }

/* Funnel */
.funnel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); overflow-x: auto; gap: var(--space-2); align-items: end; min-height: 220px; }
.stufe { display: grid; gap: var(--space-2); text-align: center; position: relative; }
.stufe .block { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; place-content: center; padding: var(--space-2); }
.stufe .block b { font-size: 24px; line-height: 28px; }
.stufe.eng .block { border-color: var(--status-critical); }
.stufe.ende .block { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.stufe .quote { font-size: 12px; font-weight: 600; }

/* Aktivität */
.waerme { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); gap: 3px; justify-content: start; }
.waerme i { width: 12px; height: 12px; border-radius: 2px; background: var(--surface-alt); }
.waerme i.s1 { background: var(--balken); } .waerme i.s2 { background: var(--accent); } .waerme i.s3 { background: var(--ink); }

/* Fortschritt */
.fortschritt { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.fortschritt i { height: 4px; border-radius: var(--radius-full); background: var(--balken); }
.fortschritt i.an { background: var(--ink); }
.anteile { display: flex; height: 8px; border-radius: var(--radius-full); overflow: hidden; background: var(--balken); }
.anteile i { display: block; height: 100%; }
.anteile .a-ok { background: var(--status-ok); } .anteile .a-warn { background: var(--status-warning); } .anteile .a-krit { background: var(--status-critical); }

/* Segment für Module */
.segment { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.segment button { background: none; border: 0; padding: 4px 10px; cursor: pointer; color: var(--ink-muted); font-size: 13px; white-space: nowrap; }
.segment button + button { border-left: 1px solid var(--border); }
.segment button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }

/* Text aus Markdown */
.text > * + * { margin-top: var(--space-3); }
.text h2 { font-size: 16px; line-height: 24px; font-weight: 700; margin-top: var(--space-6); padding-bottom: var(--space-1); border-bottom: 1px solid var(--border); }
.text h2:first-child { margin-top: 0; }
.text h3 { font-size: 14px; font-weight: 700; margin-top: var(--space-4); }
.text ul, .text ol { margin: 0; padding-left: 20px; } .text li + li { margin-top: var(--space-1); }
.text code { font-family: var(--mono); font-size: 12px; background: var(--surface-alt); padding: 1px 4px; border-radius: var(--radius-sm); }
.text pre { font-family: var(--mono); font-size: 12px; line-height: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3); overflow-x: auto; white-space: pre; }
.text pre code { background: none; padding: 0; }

/* .bild ist sonst die kleine Symbolkachel (36 px); im Fließtext wird alles davon zurückgesetzt. */
.text figure.bild { margin: 0 0 var(--space-4); display: grid; gap: var(--space-1); width: auto; height: auto; place-items: start; background: none; border: 0; border-radius: 0; }
.text figure.bild img { display: block; max-width: 100%; max-height: 480px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.text figure.bild figcaption { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* Dialog und Meldung */
dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-6); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); }
dialog.breit { width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: #1a1a1acc; }
dialog h2 { font-size: 20px; line-height: 28px; font-weight: 700; margin-bottom: var(--space-4); }
dialog .fuss { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-6); }
.feld { display: grid; gap: var(--space-1); margin-bottom: var(--space-3); }
.feld label { font-weight: 600; }
.feld input, .feld textarea, .feld select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; }
.feld input:focus, .feld textarea:focus, .feld select:focus { border-color: var(--ink); outline: none; }
.feld textarea { min-height: 96px; resize: vertical; }
.feld small { color: var(--ink-muted); }
.meldung { position: fixed; right: var(--space-6); bottom: var(--space-6); background: var(--ink); color: var(--surface); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); font-weight: 600; z-index: 20; max-width: 420px; }
.meldung.fehler { background: var(--status-critical); }

/* ---------- Claude-Fenster ---------- */
.claude { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--ink); z-index: 15; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.claude > header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--border); }
.claude > header strong { font-size: 16px; line-height: 24px; }
.claude .verlauf { overflow-y: auto; padding: var(--space-4); display: grid; gap: var(--space-3); align-content: start; }
.claude .leerhinweis { color: var(--ink-muted); text-align: center; padding: var(--space-12) var(--space-4) 0; }
.claude .frage { justify-self: end; max-width: 88%; background: var(--surface-alt); border-radius: var(--radius-xl); padding: var(--space-2) var(--space-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.claude .antwort { white-space: pre-wrap; overflow-wrap: anywhere; }
.claude .antwort .text { white-space: normal; }
.claude .liest { font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow-wrap: anywhere; }
.claude .eingabe { border-top: 1px solid var(--border); padding: var(--space-3) var(--space-4) var(--space-4); display: grid; gap: var(--space-2); }
.claude .marken { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.marke-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 6px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.marke-chip svg.sym { width: 12px; height: 12px; }
.marke-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claude .zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: end; }
.claude textarea { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; min-height: 56px; max-height: 200px; resize: vertical; font-size: 16px; line-height: 24px; }
.claude textarea:focus { border-color: var(--ink); outline: none; }
.knopf.rund { padding: 8px; }
.verweis { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 2px; }
.verweis:hover { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .claude { animation: claude-herein 0.18s ease-out; } }
@keyframes claude-herein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1100px) { .r4, .r5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r3, .r-2-1, .r-1-2 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .geruest { grid-template-columns: 1fr; }
  .leiste { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .haupt { padding: var(--space-6) var(--space-4) var(--space-12); }
  .leiste { padding: var(--space-4); gap: var(--space-3); }
  .nav { display: flex; overflow-x: auto; gap: var(--space-1); padding-bottom: var(--space-1); }
  .nav .eyebrow { display: none; }
  .nav a { flex: none; white-space: nowrap; border: 1px solid var(--border); }
  .leiste-fuss { margin-top: 0; padding-top: 0; grid-template-columns: 1fr 1fr; }
  .leiste-fuss .eyebrow { display: none; }
  .r2, .r4, .r5 { grid-template-columns: 1fr; }
  .kopf h1 { font-size: 28px; line-height: 32px; }
}
@media (prefers-reduced-motion: no-preference) { .knopf, .nav a, .karte.klick, .karte.ziel { transition: opacity 0.15s, border-color 0.15s; } }

/* ---------- Anmeldung und Einrichtung des Zugangs ---------- */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6) var(--space-4); background: var(--surface-alt); }
.anmeldung > main { width: min(440px, 100%); display: grid; gap: var(--space-6); padding: var(--space-8); }
.anmeldung .marke { padding: 0; }
.anmeldung h1 { font-size: 24px; line-height: 32px; font-weight: 700; margin-bottom: var(--space-1); }
.anmeldung .feld { margin-bottom: 0; }
.anmeldung .feld input { font-size: 16px; line-height: 24px; color: var(--ink); } /* ab 16 px zoomt das iPad beim Antippen nicht */
.anmeldung .schritt { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.fehlertext { color: var(--status-critical); font-weight: 600; }
.qr { width: 208px; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.qr svg { display: block; width: 100%; height: auto; }
.schluessel { font-family: var(--mono); font-size: 15px; letter-spacing: 0.06em; overflow-wrap: anywhere; user-select: all; }
.notcodes { list-style: none; margin: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-6); font-family: var(--mono); font-size: 15px; user-select: all; }
@media (max-width: 480px) { .anmeldung > main { padding: var(--space-6) var(--space-4); } }

/* ---------- Vorschau an Freigaben ---------- */
/* Miniaturen: Knöpfe mit Bild, die die große Ansicht öffnen. „hoch“ für Motive (Seitenverhältnis je Bild), „quer“ für Seiten. */
.vb-zeile { display: flex; gap: var(--space-4); align-items: flex-start; flex-wrap: wrap; }
.vb-reihe { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: flex-start; }
.vb { position: relative; display: block; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-alt); color: var(--ink-muted); cursor: zoom-in; flex: none; }
.vb:hover { border-color: var(--ink); }
/* Das Bild füllt den Rahmen; der Rahmen bestimmt das Seitenverhältnis, nicht das Bild. */
.vb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.vb.hoch { width: 104px; }
.vb.quer { width: 232px; aspect-ratio: 16 / 10; }
.vb.klein-vb { width: 96px; border-radius: var(--radius-sm); }
.vb.hoch .vb-leer { position: absolute; inset: 0; min-height: 0; }
.vb-leer { display: grid; place-items: center; align-content: center; gap: var(--space-1); height: 100%; min-height: 96px; padding: var(--space-2); font-size: 12px; line-height: 16px; text-align: center; }
.stapel.eng { gap: var(--space-2); justify-items: start; }
.klemm { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* Offene Punkte: je Zeile, was fehlt, rechts wer liefert */
ul.offen, ul.schlicht { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; }
ul.offen li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
ul.offen li:last-child { border-bottom: 0; }
ul.schlicht { gap: var(--space-2); }
ul.schlicht li { padding-left: var(--space-3); border-left: 1px solid var(--border); }

/* „Details“: der Text zur Freigabe, zugeklappt */
details.mehr > summary { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-muted); list-style: none; }
details.mehr > summary::-webkit-details-marker { display: none; }
details.mehr > summary::before { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; line-height: 1; }
details.mehr[open] > summary::before { content: "–"; }
details.mehr > summary:hover { color: var(--ink); }
details.mehr > div { display: grid; gap: var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }

/* Große Ansicht */
dialog.weit { width: min(1040px, calc(100vw - 32px)); }
.vb-gross { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.vb-gross img { display: block; width: 100%; height: auto; }
.vb-buehne { background: var(--surface-alt); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-4); display: grid; gap: var(--space-3); justify-items: center; }
.vb-einzel { display: block; max-width: 100%; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.vb-unter { text-align: center; }

/* Nachbau einer Anzeige im Feed. Feste, helle Farben: Die Anzeige sieht in der hellen und der dunklen Darstellung gleich aus. */
.anzeige { width: min(360px, 100%); background: #ffffff; color: #1a1a1a; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; font-size: 14px; line-height: 20px; text-align: left; }
.az-kopf { display: flex; gap: 10px; align-items: center; padding: 12px 12px 8px; }
.az-zeichen { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f5f5f4; border: 1px solid #e5e7eb; color: #6b6b65; font-weight: 700; font-size: 13px; }
.az-kopf strong { display: block; font-size: 14px; line-height: 18px; font-weight: 700; }
.az-kopf small { display: block; font-size: 12px; line-height: 16px; color: #6b6b65; }
.az-text { padding: 0 12px 10px; }
.az-foto { position: relative; overflow: hidden; display: grid; place-items: center; background: #f5f5f4; color: #6b6b65; font-size: 12px; }
.az-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.az-fuss { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: #f5f5f4; }
.az-fuss > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.az-adresse { font-size: 11px; line-height: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: #6b6b65; }
.az-fuss strong { font-size: 15px; line-height: 20px; font-weight: 700; }
.az-beschr { font-size: 13px; line-height: 18px; color: #6b6b65; }
.az-knopf { flex: none; background: #e5e7eb; border-radius: 4px; padding: 8px 12px; font-weight: 600; font-size: 13px; line-height: 16px; white-space: nowrap; }
.az-leiste { display: flex; justify-content: space-around; padding: 8px 12px; border-top: 1px solid #e5e7eb; color: #6b6b65; font-size: 13px; font-weight: 600; }

/* ---------- Verknüpfungen zwischen den Bereichen (19.11.2026) ---------- */
/* Der Eintrag, zu dem ein Verweis geführt hat */
.markiert { outline: 2px solid var(--ink); outline-offset: 2px; }
.liste > .markiert { outline-offset: 6px; border-radius: var(--radius-sm); }
a.krume { display: inline-block; }
/* Kopf einer Seite: Glocke und Zähler */
.glocke { position: relative; padding: 6px 8px; margin-left: var(--space-3); }
.glocke .zahl-neu { position: absolute; top: -8px; right: -8px; }
.zaehlwerk { display: flex; gap: var(--space-6); text-align: right; }
.zaehlwerk .gross { font-size: 28px; line-height: 32px; }
.reiter .zusatz { font-weight: 400; opacity: 0.7; }
/* Verweise: Symbole der Agenten, Badges und Chips als Links */
.symbole { display: flex; gap: var(--space-1); flex-wrap: wrap; }
a.bild { text-decoration: none; }
a.bild:hover, a.badge:hover { border-color: var(--ink); color: var(--ink); }
a.badge, a.chip { text-decoration: none; }
a.chip:hover { outline: 1px solid var(--ink); }
.abstand-klein { margin-top: var(--space-2); }
/* Stand eines Auftrags an der Stelle, von der aus er gegeben wurde */
.stand { display: inline-flex; align-items: center; gap: var(--space-2); background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px 8px; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; }
.stand:hover { border-color: var(--ink); }
.stand svg.sym { width: 16px; height: 16px; }
/* Anfragen: Stand am Fuß der Karte */
.fuss-zeile { display: flex; gap: var(--space-2); align-items: baseline; padding-top: var(--space-2); border-top: 1px solid var(--border); }
/* Webseiten: Seitenliste mit Miniatur, Fassungen nebeneinander, Kacheln der Prüfungen */
.seitenzeile { display: flex; gap: var(--space-3); align-items: center; text-decoration: none; color: inherit; }
.seitenzeile > span:last-child { display: grid; min-width: 0; }
.seitenzeile .vb, .vb.mini-vb { cursor: inherit; }
.fassungen { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
.fassung { display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.vb.breit-vb { width: 100%; }
.vb.ohne { cursor: default; }
.vb.mini-vb { width: 56px; border-radius: var(--radius-sm); }
.r-kacheln { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.r-3 { grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(240px, 1fr); align-items: start; }
@media (max-width: 1100px) { .r-3 { grid-template-columns: 1fr; } }
/* Zeitachse „Ablauf“: eine Zeile je Beteiligtem, ein Punkt je Schritt. Grün und Rot nur an Entscheidungen, das Wort steht dabei. */
.za-roll { overflow-x: auto; padding-bottom: var(--space-2); }
.za { position: relative; }
.za-zeile { position: absolute; left: 0; right: 0; background: var(--surface-alt); border-radius: var(--radius-lg); }
.za-wer { position: sticky; left: 0; z-index: 2; display: inline-flex; align-items: center; gap: var(--space-2); width: 132px; height: 48px; padding: 0 var(--space-2); background: var(--surface-alt); border-radius: var(--radius-lg); }
.za-wer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.za-linie { position: absolute; left: 0; top: 0; pointer-events: none; }
.za-linie path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.za-zeit { position: absolute; top: 6px; text-align: center; font-size: 12px; line-height: 16px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.za-zeit.tag { color: var(--ink); font-weight: 600; }
.za-schritt { position: absolute; z-index: 1; display: grid; justify-items: center; align-content: start; gap: 2px; padding-top: 14px; text-align: center; text-decoration: none; color: inherit; font-size: 12px; line-height: 16px; }
.za-schritt.mit-foto { padding-top: 0; }
.za-punkt { width: 14px; height: 14px; box-sizing: content-box; border: 3px solid var(--surface-alt); border-radius: 50%; background: var(--ink); }
.za-schritt.ok .za-punkt { background: var(--punkt-ok); } .za-schritt.krit .za-punkt { background: var(--punkt-krit); }
.za-schritt img { width: 76px; height: 48px; object-fit: cover; object-position: top center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.za-schritt strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.za-schritt > span { max-width: 100%; color: var(--ink-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.za-schritt.mit-foto > span { -webkit-line-clamp: 1; line-clamp: 1; }
a.za-schritt:hover strong { text-decoration: underline; }
a.za-schritt:hover .za-punkt, a.za-schritt:hover img { outline: 1px solid var(--ink); outline-offset: 1px; }
/* SEO-Berichte: Kennzahl im Kreis vor dem Bericht */
.kreis { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; font-weight: 700; background: var(--surface-alt); }
button.mit-bild > span:last-child { display: grid; min-width: 0; }
/* Agenten: letztes Ergebnis am Fuß der Karte */
.ergebnis { display: flex; gap: var(--space-3); align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--border); text-decoration: none; color: inherit; min-width: 0; }
.ergebnis > span:last-child { display: grid; min-width: 0; }
.ergebnis strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ergebnis:hover strong { text-decoration: underline; }
.marke-feld { width: 56px; height: 35px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12px; background: var(--surface-alt); }
/* Abläufe: Kette der Beteiligten bis zum Menschen, der freigibt */
.kette { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kette > svg.sym { width: 14px; height: 14px; color: var(--ink-muted); }
.bild.du { width: auto; padding: 0 10px; background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 700; font-size: 13px; }
/* Checklisten: Säulen je Abschnitt und Wahl des Prüfberichts */
.saeulen { display: flex; gap: 4px; align-items: flex-end; height: 36px; }
.saeule { width: 10px; height: 100%; display: flex; flex-direction: column-reverse; background: var(--balken); border-radius: 2px; overflow: hidden; }
.saeule i { display: block; width: 100%; }
.saeule .a-ok { background: var(--status-ok); } .saeule .a-warn { background: var(--status-warning); } .saeule .a-krit { background: var(--status-critical); }
.pruefwahl { padding: var(--space-3) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pruefwahl select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; max-width: 420px; }
