/*
 * Master-Dashboard – Gestaltung nach docs/styleguide.md (Team-Dashboard driversline.de, Apple-Stil).
 * Nur Tokens verwenden, jede Farbe mit hellem UND dunklem Wert. Abweichung vom Styleguide:
 * Schrift in Farbe nutzt die *-text-Tokens (leicht dunkler bzw. heller), damit jeder Text 4,5:1 erreicht (BFSG);
 * Flächen, Punkte und Linien behalten die Originalfarben.
 */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #6f6f73;          /* Styleguide #86868b – 3,6:1, zu blass */
  --tab-text-2: #5f5f64;      /* grauer Text in Reitern (.tabs): auf der Reiterfläche mind. 4,9:1, --text-2 nur 3,9:1; ebenso Code und
                                 graue Etiketten auf grauer Fläche über dem Seitenhintergrund (--text-2 dort 4,27:1) */
  --line: rgba(0, 0, 0, .08);
  --fill: rgba(0, 0, 0, .04);
  --field-line: #8a8a8f;      /* Rahmen von Eingabefeldern: mindestens 3:1 */
  --blue: #0071e3;
  --blue-text: #0069d3;
  --blue-soft: rgba(0, 113, 227, .10);
  --btn: #0071e3;             /* weiße Schrift darauf: 4,7:1, in beiden Modi */
  --green: #28a745;
  --green-text: #1e7d34;
  --green-soft: rgba(52, 199, 89, .14);
  --orange: #f08c00;
  --orange-text: #9e5c00;
  --orange-soft: rgba(255, 159, 10, .16);
  --red: #e5352b;
  --red-text: #c72e25;
  --red-soft: rgba(255, 59, 48, .12);
  --indigo: #5e5ce6;
  --teal: #30b0c7;
  --navy: #0b2239;
  --on-navy: #ffffff;
  --highlight: rgba(255, 204, 0, .35);
  /* Organigramm (Entwurf des Inhabers, 30.11.2026): Linien, Gesellschaftskarte, Umrandung der Hauptdomain, Punkt „geparkt“. */
  --org-line: #d2d2d7;
  --org-company: #0b2239;
  --org-on-company: #ffffff;
  --org-on-company-2: rgba(255, 255, 255, .72);
  --org-main-ring: #0b2239;
  --org-parked: #8e8e93;
  --org-logo-bg: #ffffff;    /* Logos stehen immer auf Weiß (dunkle Logos bleiben sichtbar) */
  --org-node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --org-chip-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --org-backdrop: rgba(0, 0, 0, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .12);
  --shadow-pop: 0 8px 32px rgba(0, 0, 0, .16); /* Fläche über der Seite (Befehlspalette, Kürzel) */
  --backdrop: rgba(0, 0, 0, .32);  /* Fläche hinter Dialogen (Befehlspalette, Kürzel) */
  --radius: 20px;
  --radius-sm: 10px;
  --gap: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --card: #1c1c1e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #8e8e93;
  --tab-text-2: #b0b0b5;      /* auf dem aktiven Reiter #3a3a3c 5,3:1, --text-2 nur 4,4:1 */
  --line: rgba(255, 255, 255, .1);
  --fill: rgba(255, 255, 255, .06);
  --field-line: #6e6e73;
  --blue: #2997ff;
  --blue-text: #2f9aff;
  --blue-soft: rgba(41, 151, 255, .16);
  --green: #30d158;
  --green-text: #30d158;
  --green-soft: rgba(48, 209, 88, .16);
  --orange: #ff9f0a;
  --orange-text: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, .18);
  --red: #ff453a;
  --red-text: #ff5b52;        /* Styleguide #ff453a – 4,2:1 auf dem roten Etikett */
  --red-soft: rgba(255, 69, 58, .16);
  --indigo: #7d7aff;
  --teal: #40c8e0;
  --navy: #8fb4d9;
  --on-navy: #000000;
  --highlight: rgba(255, 214, 10, .30);
  --org-line: #48484a;
  --org-company: #1f4b7a;     /* hebt sich klar von den Domain-Karten (--card) und vom schwarzen Grund ab; Weiß darauf 8:1 */
  --org-on-company: #ffffff;
  --org-on-company-2: rgba(255, 255, 255, .78);
  --org-main-ring: #6f9fd6;
  --org-parked: #8e8e93;
  --org-logo-bg: #ffffff;
  --org-node-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  --org-chip-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  --org-backdrop: rgba(0, 0, 0, .5);
  --shadow: none;
  --shadow-sm: none;
  --shadow-pop: 0 8px 32px rgba(0, 0, 0, .6);
  --backdrop: rgba(0, 0, 0, .66);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45;
  letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .85em; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
abbr { text-decoration: none; }
h1, h2, h3 { color: var(--text); }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--text); padding: 8px 12px; z-index: 20; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip:focus { left: 8px; }

/* ---------- Rahmen ---------- */
.shell .main { padding: 32px 32px 64px; max-width: 1440px; margin: 0 auto; }
.no-shell .main { max-width: 1180px; margin: 0 auto; padding: 24px; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* Grundform des Personen-Badges im Website-Check (.who, weiter unten); früher der Name in der Seitenleiste. */
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* Segment-Umschalter (iOS-Stil) – Zeiträume, Hell/Dunkel */
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; flex: none; margin: 0; }
.seg button {
  font: inherit; font-size: 12.5px; font-weight: 500; border: 0; background: transparent; color: var(--text);
  padding: 5px 12px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #3a3a3c; }

/* ---------- Seitenkopf, Karten ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--text-2); }

.panel, .card {
  background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  min-width: 0; position: relative;
}
.panel { display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .panel h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel h2 { margin: 22px 0 10px; }
.panel h2:first-child, .panel .panel-head h2 { margin-top: 0; }
.panel + .panel, .page-top + .panel, .panel + .page-top, .page-top + .page-top { margin-top: var(--gap); }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 999px; background: var(--fill); color: var(--text-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.count-critical { background: var(--red-soft); color: var(--red-text); }
.empty { color: var(--text-2); margin: 4px 0; max-width: 60ch; }
.src { font-size: 11.5px; color: var(--text-3); margin-top: 14px; display: flex; align-items: center; gap: 6px; }
.src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); opacity: .6; flex: none; }

/* ---------- Startseite als Kacheln (04.11.2026, wie im Family Office; src/Views/today.php, app.js) ---------- */
.start-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
/* Masonry (04.11.2026, wie im Family Office): app.js setzt je Kachel grid-row-end nach ihrer Höhe, dann rutschen kürzere nach
   oben in die Lücken (grid-auto-flow: dense). Ohne JS bleibt das normale Raster. */
.start-grid.masonry { grid-auto-rows: 4px; row-gap: 0; grid-auto-flow: row dense; align-items: stretch; }
.start-grid.masonry > .widget { margin-bottom: var(--gap); align-self: start; }
.start-head h1 { font-size: clamp(22px, 2.2vw, 28px); }
.start-head .round-btn { width: 36px; height: 36px; border-radius: 50%; }
.start-grid .ptile-push { font-size: 13px; color: var(--text); }
.start-grid .ptile-push .ptile-label { display: inline; margin-right: 6px; }
.more-btn { margin-top: 10px; }
.start-grid > .widget { margin: 0; overflow: hidden; }
.start-grid .table-wrap { overflow: auto; }
.widget.w-viertel { grid-column: span 1; }
.widget.w-haelfte { grid-column: span 2; }
.widget.w-dreiviertel { grid-column: span 3; }
.widget.w-breit { grid-column: 1 / -1; }
/* Projekt-Kacheln auf der Startseite (vorher /projekte): kleiner, Bild oben, Werte in zwei Spalten */
.start-grid > .ptile { min-width: 0; }
.start-grid .ptile-shot { aspect-ratio: 16 / 10; }
.start-grid .ptile-body { gap: 6px; padding: 12px 14px 14px; }
.start-grid .ptile-name { font-size: 15px; }
.start-grid .ptile-meta { font-size: 12.5px; }
.start-grid .ptile-stats { font-size: 13px; gap: 4px 12px; }
.start-grid .ptile-label { font-size: 11px; }
.start-grid .ptile-ph { font-size: 16px; }
body.editing .start-grid > .ptile .edit-bar { margin: 8px 8px 0; }
/* Alarme: offene Mängel je Projekt */
.alarm-rows { display: grid; font-size: 14px; }
.alarm-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 72px); gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.alarm-row:first-child { border-top: 0; }
.alarm-headrow { font-size: 12px; color: var(--text-2); font-weight: 500; padding-top: 0; }
.alarm-headrow > span:not(:first-child), .alarm-n { text-align: right; font-variant-numeric: tabular-nums; }
.alarm-n { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.alarm-n.kv-kritisch { color: var(--red-text); }
.alarm-n.kv-warnung { color: var(--orange-text); }
.alarm-name { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.alarm-none { grid-column: 2 / -1; text-align: right; }
.alarm-system { margin-top: 10px; }
.metric-rows .alarm-row { grid-template-columns: minmax(0, 1fr) repeat(3, 96px); }
.metric-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
/* Handy: Zahlen-Spalten nur so breit wie nötig – mit festen 96 px blieben für den Projektnamen bei 390 px nur rund 15 px
   (Sichtprüfung nach dem Zusammenführen, 05.11.2026). */
@media (max-width: 767px) { .metric-rows .alarm-row { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(56px, max-content)); } }
.start-empty { grid-column: 1 / -1; }
.start-sev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.start-sev > div { display: grid; gap: 2px; }
.start-sev .kpi-value { font-size: 28px; }
.news-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: 1px; }
.edit-bar, .edit-hint, .start-tray { display: none; }
body.editing .edit-hint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: color-mix(in srgb, var(--blue) 8%, var(--card)); color: var(--blue-text); /* --blue-soft über --bg: Blau nur 4,27:1 */ border-radius: 14px; padding: 10px 14px; margin-bottom: var(--gap); font-size: 14px; }
body.editing .edit-hint > span { flex: 1; min-width: 220px; }
body.editing [data-edit-toggle] { visibility: hidden; }
body.editing .start-grid > .widget { outline: 2px dashed var(--field-line); outline-offset: 3px; cursor: grab; }
body.editing .start-grid > .widget > :not(.edit-bar) { pointer-events: none; opacity: .5; }
body.editing .edit-bar { display: flex; align-items: center; gap: 6px; margin: -6px -6px 12px; padding: 6px; background: var(--fill); border-radius: 12px; }
.grip { color: var(--text-2); font-size: 16px; line-height: 1; padding: 0 4px; }
.edit-title { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb { border: 0; background: var(--card); color: var(--text); border-radius: 8px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); }
.eb:hover { color: var(--blue-text); }
.eb:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
/* ←/→ ohne Wirkung (Rand oder Projekt neben Projekt, app.js updateMoves): bleibt fokussierbar, ein Druck sagt den Grund an */
.eb[aria-disabled="true"] { color: var(--text-2); background: transparent; box-shadow: none; cursor: default; }
.eb[aria-disabled="true"]:hover { color: var(--text-2); }
.widget.dragging { opacity: .35; }
body.editing .start-tray { display: block; margin-top: 28px; }
.tray-title { font-size: 13px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 10px; }
.tray { display: flex; flex-wrap: wrap; gap: 8px; }
.tray-item.is-shown { display: none; }
@media (max-width: 900px) {
  .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget.w-viertel { grid-column: span 1; }
  .widget.w-haelfte, .widget.w-dreiviertel, .widget.w-breit { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .start-grid > .widget { grid-column: 1 / -1; }
  .start-sev .kpi-value { font-size: 24px; }
}

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
/* hidden immer durchsetzen (04.11.2026): Klassen mit display (z. B. .list-row) überschrieben sonst das Attribut */
[hidden] { display: none !important; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-main { display: grid; min-width: 0; flex: 1; }
.row-title { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.row-title:hover { color: var(--blue-text); }
/* Aufgaben ohne Mangel (Chancen-Ansicht): lange, vorbelegte Titel, das Unterscheidende steht hinten – umbrechen statt abschneiden.
   An Silbengrenzen (lang="de"), mitten im Wort nur, wenn ein Wort allein nicht in die Zeile passt. */
.row-title.row-title--wrap { white-space: normal; overflow-wrap: break-word; hyphens: auto; }
/* „Meine Aufgaben“ als schmale Kachel (Viertel bis etwa 1.250 px Fensterbreite): Frist unter den Titel, der Titel bekommt die
   ganze Breite neben dem Haken, statt in rund 65 px mitten im Wort umzubrechen. */
.start-grid > .widget[data-id="aufgaben"] { container-type: inline-size; }
@container (max-width: 240px) {
  .widget[data-id="aufgaben"] .list-row { flex-wrap: wrap; row-gap: 2px; }
  .widget[data-id="aufgaben"] .list-main { flex-basis: calc(100% - 34px); }
  .widget[data-id="aufgaben"] .row-time { flex-basis: 100%; padding-left: 34px; }
}
.row-meta { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time { color: var(--text-2); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.group-label { font-size: 12px; font-weight: 600; color: var(--text-3); margin: 14px 0 2px; }
.group-label:first-of-type { margin-top: 0; }
.is-overdue { color: var(--red-text); }

.sev { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: middle; margin-right: 6px; }
.sev-kritisch { background: var(--red); }
.sev-warnung { background: var(--orange); }
.sev-hinweis { background: var(--text-3); }
.sev-lg { width: 12px; height: 12px; }

/* Erledigt-Haken */
.done-form { display: contents; }
.check {
  width: 22px; height: 22px; flex: none; border: 1.5px solid var(--field-line); border-radius: 50%;
  background: var(--card); cursor: pointer; padding: 0; position: relative;
}
.check:hover, .check:focus-visible { border-color: var(--green); }
.check:hover::after, .check:focus-visible::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid var(--green-text); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Tabellen ---------- */
/* position: relative – Bezugsrahmen für .sr-Texte in Zellen (position: absolute): ohne ihn ragten sie aus dem Scrollbereich und
   machten die ganze Seite breiter (Projektliste auf Tablet-Breite). */
.table-wrap { overflow-x: auto; position: relative; }
.table, table:not(.table) { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td, table:not(.table) th, table:not(.table) td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th + th, .table td + td, table:not(.table) th + th, table:not(.table) td + td { padding-left: 12px; }
.table th, .table td { white-space: nowrap; }
.table th, table:not(.table) th { color: var(--text-3); font-weight: 500; font-size: 12px; padding-top: 0; }
.table th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.table tbody tr:last-child td, table:not(.table) tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--fill); }
.num, th.num, .table .num, table:not(.table) .num { text-align: right; font-variant-numeric: tabular-nums; }
.n { color: var(--text-2); }
.n-kritisch { color: var(--red-text); font-weight: 600; }
.n-warnung { color: var(--orange-text); font-weight: 600; }

.ampel { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.ampel-rot { background: var(--red); }
.ampel-gelb { background: var(--orange); }
.ampel-gruen { background: var(--green); }
.ampel-grau { background: var(--text-3); opacity: .5; }

.bar { width: 64px; height: 6px; vertical-align: middle; margin-right: 6px; appearance: none; border: 0; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar::-webkit-progress-bar { background: var(--fill); border-radius: 3px; }
.bar::-webkit-progress-value { background: var(--blue); border-radius: 3px; }
.bar::-moz-progress-bar { background: var(--blue); border-radius: 3px; }

.trend { margin-left: 2px; }
.trend-up { color: var(--green-text); }
.trend-down { color: var(--red-text); }
.trend-flat { color: var(--text-2); }
.delta { display: flex; gap: 8px; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.delta-up { color: var(--red-text); }     /* mehr Mängel = schlechter */
.delta-down { color: var(--green-text); }

/* ---------- Formulare, Buttons ---------- */
label { display: block; margin: 12px 0 4px; font-weight: 500; font-size: 14px; }
input, select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--field-line); border-radius: var(--radius-sm);
  font: inherit; background: var(--card); color: var(--text);
}
select { width: auto; max-width: 100%; } /* nie breiter als der Behälter (lange Projektnamen: sonst seitlicher Bildlauf am Handy) */
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--blue); }
button { font: inherit; }
.card button[type="submit"]:not(.link), .btn {
  display: inline-block; margin-top: 16px; padding: 8px 18px; border: 0; border-radius: 980px;
  background: var(--btn); color: #fff; font-weight: 500; cursor: pointer;
}
.btn:hover, .card button[type="submit"]:not(.link):hover { text-decoration: none; filter: brightness(1.08); }
.btn-quiet {
  display: inline-block; padding: 6px 12px; border: 0; border-radius: 980px; background: var(--fill);
  color: var(--text); cursor: pointer; font-size: 13px; font-weight: 500;
}
.btn-quiet:hover { background: var(--line); text-decoration: none; }
.btn-quiet:disabled { cursor: not-allowed; opacity: .6; }
.btn-quiet:disabled:hover { background: var(--fill); }
/* „Alles jetzt prüfen“ auf der Projektübersicht (nur Admin und Techniker) */
.refresh { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: flex-end; margin: 22px 0 14px; }
.refresh-say { margin: 0; }
button.link { margin: 0; padding: 0; border: 0; background: none; color: var(--blue-text); cursor: pointer; text-align: left; font-size: inherit; }
button.link:hover { text-decoration: underline; }

/* Login und einfache Seiten */
.card { margin-bottom: var(--gap); }
.card.narrow { max-width: 420px; margin: 56px auto; }
.card h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 14px; }
.card h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--orange-soft); border-radius: 14px; padding: 14px 16px; margin: 8px 0; font-size: 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* Indexstatus bei Google (Seitenansicht, Reiter Sichtbarkeit; Maßnahme 14) */
.ix { margin-bottom: 24px; }
.ix-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.ix .kv { margin: 10px 0; }
@media (max-width: 600px) { .ix .kv { grid-template-columns: 1fr; gap: 2px 0; } .ix .kv dd { margin-bottom: 8px; } }
/* Historie der Seite: Änderungen (Inventar, Indexstatus) ganz lesbar, auch auf dem Handy */
.page-changes .row-title, .page-changes .row-meta { white-space: normal; overflow-wrap: anywhere; }
code.secret { font-size: 1.05rem; letter-spacing: .05em; }
code.wrap { display: block; word-break: break-all; font-size: .85rem; margin-top: 8px; }

/* ---------- Allgemeine Bausteine der Ansichten ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Nur mobil sichtbar (unter 768 px), z. B. „Ändern geht am Computer.“ */
.only-narrow { display: none; }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
h1.mono { font-size: 24px; letter-spacing: -.01em; word-break: break-all; }
.crumbs { margin: 0 0 6px; font-size: 13px; color: var(--text-2); }
.flash { background: var(--blue-soft); color: var(--text); padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; font-size: 14px; }
.head-links { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.tag--demo { background: var(--fill); color: var(--text-2); }
.tag--echt, .tag--ok { background: var(--green-soft); color: var(--green-text); }
.tag--warn { background: var(--orange-soft); color: var(--orange-text); }
.tag--bad { background: var(--red-soft); color: var(--red-text); }
kbd { font-family: inherit; font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--card); }
mark { background: var(--highlight); color: inherit; padding: 0 2px; border-radius: 3px; }
pre.code { font-family: var(--mono); background: var(--fill); border-radius: 12px; padding: 14px; overflow: auto; font-size: 13px; max-height: 420px; }
.table td.wrap, .table th.wrap { white-space: normal; }
.cell-title { font-weight: 500; color: var(--text); }
.cell-sub { display: block; color: var(--text-2); font-size: 12.5px; }

/* Status-Etiketten */
.status { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.status-offen { background: var(--fill); color: var(--text); }
.status-zugewiesen { background: var(--blue-soft); color: var(--blue-text); }
.status-erledigt_pruefung { background: var(--orange-soft); color: var(--orange-text); }
.status-erledigt { background: var(--green-soft); color: var(--green-text); }
.status-ignoriert { background: var(--fill); color: var(--tab-text-2); text-decoration: line-through; }
.muted code, .sec-head code { color: var(--tab-text-2); }
/* „Wieder öffnen“ unter dem Status einer ignorierten Zeile der Mängel-Liste (Entscheidung J); am Handy 44 px hoch. */
.row-action { display: block; margin: 4px 0 0; padding: 2px 0; border: 0; background: none; color: var(--blue-text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.row-action:hover { text-decoration: underline; }
@media (max-width: 767px) { .row-action { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0; } }

/* Filter */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.filters label { margin: 0; font-size: 12px; color: var(--text-2); font-weight: 500; display: grid; gap: 4px; }
.filters select, .filters input[type="search"] { font-size: 14px; padding: 6px 10px; min-width: 130px; width: auto; }
.filter-actions { display: flex; gap: 10px; align-items: center; }
.filters-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters-compact select { min-width: 0; width: 100%; }
.filters .check-label { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
.check-label input { width: auto; }
.filters-compact .filter-actions { grid-column: 1 / -1; }
/* Umschalter „Nach Prüfung gruppieren“ in der Filterleiste: auf Höhe der Felder, Schrift wie der Inhalt der Felder. */
.filters .filter-check { min-height: 34px; font-size: 14px; color: var(--text); }
/* Mit JS wirken Filter sofort (assets/filters.js): „Filtern“ tritt zurück, bleibt aber sichtbar und erreichbar (ohne JS
   ist es der normale Knopf). Mit einer noch nicht angewandten Änderung per Tastatur wird er wieder deutlich. */
.filters.is-live .filter-submit { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.filters.is-live .filter-submit:hover { background: var(--fill); color: var(--text); }
.filters.is-live.is-dirty .filter-submit { background: var(--fill); color: var(--text); box-shadow: none; }

/* Feste Ansichten über dem Mängel-Filter: kleine Pillen wie die Ansichten-Reiter (.tabs-views) */
.tabs.tabs-views.filter-views { margin: 0 0 6px; }
.view-hint { margin: 0 0 10px; }
/* Meine Ansichten (findings_saved.php, Domain\SavedViews): eigene Ansichten unter den festen – Pillen mit Rand statt Fläche,
   damit man sie von den festen unterscheidet; aktiv wie dort dunkel. Aufgeklappt („Ansicht speichern …“, „Verwalten …“)
   nimmt das Formular eine eigene Zeile. */
.saved-views { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.saved-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.saved-view { display: inline-block; max-width: 100%; border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--text); box-shadow: inset 0 0 0 1px var(--field-line); overflow-wrap: anywhere; }
.saved-view:hover { background: var(--fill); text-decoration: none; }
.saved-view[aria-current="page"], :root[data-theme="dark"] .saved-view[aria-current="page"] { background: var(--text); color: var(--card); box-shadow: none; }
.saved-box { min-width: 0; max-width: 100%; }
.saved-box > summary { cursor: pointer; color: var(--blue-text); font-size: 13.5px; }
.saved-box[open] { flex-basis: 100%; padding: 10px 0 4px; border-top: 1px solid var(--line); }
.saved-box[open] > summary { margin-bottom: 8px; }
.saved-form label { margin: 0 0 4px; font-size: 13px; }
.saved-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.saved-row input { flex: 1 1 220px; width: auto; min-width: 0; max-width: 420px; font-size: 14px; padding: 6px 10px; }
.saved-row .btn { margin: 0; }
.saved-form p { margin: 6px 0 0; }
.saved-manage-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.saved-manage-list li { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.saved-manage-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.saved-rename input { width: 18em; max-width: 100%; }
.saved-manage-list details.remove form { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.saved-manage-list .check-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; font-weight: 400; }
/* Aktive Filter als Chips: neutral (keine Ampelfarben), Text in --text auf --fill, das × in --text-2 */
.chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 12px; }
.chips-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 8px 3px 11px; border-radius: 999px;
  background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 13px; font-weight: 500;
}
.chip:hover { background: var(--line); text-decoration: none; }
.chip-x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--text-2); font-size: 15px; line-height: 1; }
.chip:hover .chip-x { color: var(--text); }
.chips-reset { font-size: 13px; margin-left: 4px; }

/* Aktionsleiste */
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--fill); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.bulk-count { font-size: 13px; color: var(--text-2); min-width: 90px; }
.bulk-count.has-selection { color: var(--blue-text); font-weight: 600; }
.bulk-group { display: inline-flex; gap: 6px; align-items: center; }
.bulkbar select, .bulkbar input { font-size: 13px; padding: 5px 9px; width: auto; }
.bulkbar input[type="text"] { width: 200px; }
/* Kopf der Liste: Zahl der Einträge, wonach sortiert ist (mit Link zurück zur Voreinstellung), rechts CSV. Bricht schmal um. */
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 4px 0 8px; }
.list-head > a:last-child { margin-left: auto; }
.table.findings td { vertical-align: top; }
/* Köpfe und Personen-Spalten dürfen umbrechen („Seiten-/verantwortlich“ über den weichen Trennstrich in
   Labels::PAGE_OWNER_COLUMN, „Erik bis 12.11.2026“ in zwei Zeilen). Schwere-Punkt und erstes Wort des Titels stehen in .cell-lead
   ohne Umbruch dazwischen; der Titel selbst bricht zwischen Wörtern. Pfade haben <wbr> nach jedem inneren „/“
   (findings_table.php), wirksam nur, wo die Tabelle schmal ist; sonst bleiben die Spaltenbreiten wie bisher. */
.table.findings th { white-space: normal; }
.cell-lead { white-space: nowrap; }
.cell-lead .cell-title { white-space: normal; }
.table.findings wbr { display: none; }
/* Unterzeilen im Mangel für ausgeblendete Spalten (findings_table.php): sonst unsichtbar, damit nichts doppelt dasteht. */
.cell-alt { display: none; margin-top: 2px; font-size: 13px; color: var(--text-2); }
/* Neben dem Seitenbaum (ab 1101 px) hat die Tabelle Fensterbreite − 676 px (Seitenleiste, Ränder, Baum, Abstand); sieben Spalten
   brauchen mit langen Pfaden um 840 px. Bis 1555 px entfällt daher „Seit“ (steht im Mangel selbst), Pfade brechen an „/“ und die
   Detailzeile darf überall brechen; bis 1295 px (unter 620 px Platz) stehen auch die Personen nicht in eigenen Spalten, sondern als
   Unterzeilen im Mangel („Seitenverantwortlich: …“, „Zugewiesen an: … bis …“). So wird neben dem Baum nichts abgeschnitten und
   nichts weggelassen, statt dass die Tabelle seitlich scrollt. */
@media (min-width: 1101px) and (max-width: 1555px) {
  .project-main .table.findings .col-since { display: none; }
  .project-main .table.findings wbr { display: inline; }
  .project-main .table.findings .cell-sub { overflow-wrap: anywhere; }
}
@media (min-width: 1101px) and (max-width: 1295px) {
  .project-main .table.findings .col-opt { display: none; }
  .project-main .table.findings .cell-alt-people { display: block; }
}
.col-check { width: 28px; }
/* Mängel-Liste ohne Seitenbaum (/maengel) bei 768–1279 px: Projektname und Personen dürfen umbrechen, bis 1099 px auch Pfade an
   „/“ und die Detailzeile, Spaltenabstand 8 px – sonst scrollte die Tabelle bei langen Projektnamen seitlich (Sichtprüfung 05.11.2026). */
.table.findings td.col-opt:not(.col-since) { white-space: normal; }
@media (max-width: 1099px) {
  .table.findings wbr { display: inline; }
  .table.findings .cell-sub { overflow-wrap: anywhere; }
  .table.findings th + th, .table.findings td + td { padding-left: 8px; }
}
.col-check input { width: auto; margin: 2px 0 0; }
.table tr.is-focused td { background: var(--blue-soft); }
/* Sortierbare Spaltenköpfe (findings_th.php): Links in der Farbe des Kopfes, die gewählte Spalte in --text mit Pfeil. */
.table th .th-sort { color: inherit; }
.table th .th-sort:hover { color: var(--text); }
.table th .th-sort.is-sorted { color: var(--text); font-weight: 600; }
.sort-arrow { margin-left: 3px; }
/* Seitenwechsel: Vorherige, Seitenzahlen (aktuelle dunkel wie die gewählte Ansicht), Nächste; bricht schmal um. */
.pager { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; align-items: center; padding-top: 12px; }
.pager-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pager-pages a { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; padding: 0 8px; border-radius: 999px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pager-pages a:hover { background: var(--fill); text-decoration: none; }
.pager-pages a[aria-current="page"] { background: var(--text); color: var(--card); font-weight: 600; }
.pager-gap { display: inline-grid; place-items: center; min-width: 20px; color: var(--text-2); }
.pager-step { gap: 4px; } /* mobil als Flex: Abstand zwischen Pfeil und Wort */
/* Gruppierte Ansicht (findings_groups.php): Zahlen rechtsbündig, „+ Projekt“ darunter. */
.table th.col-num, .table td.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-note { display: block; }
/* Hinweis in der Aktionsleiste der gruppierten Ansicht: eigene Zeile. */
.bulk-note { flex-basis: 100%; margin: 0; }
/* Bestätigung einer Sammelaktion (findings_confirm.php) */
.confirm-lead { font-size: 16px; margin: 0 0 14px; max-width: 70ch; }
.confirm-rules { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 4px; }
.confirm-rule { font-weight: 500; }
.keys { margin-top: 12px; }

/* Projektansicht */
.project-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.project-layout--voll { grid-template-columns: minmax(0, 1fr); }
.project-tree { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.project-main { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: grid; gap: 2px; min-width: 0; }
.kpis-small .kpi { background: var(--fill); box-shadow: none; border-radius: 14px; padding: 12px 14px; }
.kpi-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi-value { font-size: 34px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis-small .kpi-value { font-size: 22px; }
.kpi-sub { font-size: 13px; color: var(--text-2); }

/* Tabs als Segment-Umschalter über der Karte */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--fill); border-radius: 10px; padding: 3px; margin: var(--gap) 0 12px; max-width: 100%; }
.tabs a { padding: 6px 14px; color: var(--text); border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.tabs a:hover { text-decoration: none; background: var(--fill); }
.tabs a[aria-current="page"] { background: var(--card); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .tabs a[aria-current="page"] { background: #3a3a3c; }
.tabs + .panel { margin-top: 0; }

/* Seitenbaum */
.tree { font-size: 14px; }
.tree-list { list-style: none; margin: 0; padding: 0 0 0 14px; }
.tree > .tree-list { padding-left: 0; }
.tree summary { cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; }
.tree summary:hover { background: var(--fill); }
.tree-page { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; color: var(--text); }
.tree-page:hover { background: var(--fill); text-decoration: none; }
.tree-page[aria-current="page"] { background: var(--blue-soft); }
.tree-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-counts { margin-left: auto; display: inline-flex; gap: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tree .ampel { margin-right: 0; flex: none; width: 8px; height: 8px; }
.tree-total { margin: 0 0 8px; }

/* Seitenansicht */
.page-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.inventory { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.inventory label { margin: 6px 0 0; font-size: 13px; display: grid; gap: 4px; }
.inventory select, .inventory input { padding: 7px 10px; width: 100%; }
.inventory .btn { margin-top: 12px; }
.span-2 { grid-column: 1 / -1; }
.checklist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; flex: none; margin-top: 1px; }
.checklist .ok .mark, .mark.ok { background: var(--green-soft); color: var(--green-text); }
.checklist .no .mark, .mark.no-mark { background: var(--red-soft); color: var(--red-text); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks > li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.checks > li:first-child { border-top: 0; }
.checks > li.no { display: block; }
.checks summary { cursor: pointer; display: flex; align-items: center; gap: 8px; }
/* Lange Regel-Codes und „1 offen“ rücken schmal in die nächste Zeile, statt über den Rand zu ragen. */
.checks > li, .checks summary { flex-wrap: wrap; row-gap: 2px; }
.check-name { font-weight: 500; }
.checks li.ok .check-name { font-weight: 400; color: var(--text-2); }
.explain { background: var(--fill); border-radius: 14px; padding: 12px 16px; margin-top: 10px; max-width: 90ch; }
.explain p { margin: 6px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.actions-panel .action-forms { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 100%; }
.inline-form select, .inline-form input { font-size: 14px; padding: 6px 10px; width: auto; }
/* Auswahllisten nie breiter als ihr Behälter (sonst so breit wie die längste Option: seitlicher Bildlauf auf dem Handy). */
.inline-form select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.inline-form .btn { margin: 0; }

/* Suche */
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.searchbar input[type="search"] { flex: 1 1 320px; font-size: 16px; padding: 10px 14px; width: auto; }
.searchbar select { padding: 9px 10px; }
.results .row-title { white-space: normal; }
.snippet { display: block; font-size: 14px; color: var(--text); margin-top: 3px; }

/* Diagramme (Serien in der Reihenfolge des Styleguides; Status grün/orange/rot) */
.chart { margin: 0 0 18px; }
.chart svg { width: 100%; height: auto; max-height: 260px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .s-kritisch { stroke: var(--red); }
.chart .s-warnung { stroke: var(--orange); }
.chart .s-hinweis { stroke: var(--text-3); }
.chart .s-accent { stroke: var(--blue); }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .dot.s-kritisch { fill: var(--red); }
.chart .dot.s-warnung { fill: var(--orange); }
.chart .dot.s-hinweis { fill: var(--text-3); }
.chart .dot.s-accent { fill: var(--blue); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.swatch.s-kritisch { background: var(--red); }
.swatch.s-warnung { background: var(--orange); }
.swatch.s-hinweis { background: var(--text-3); }
.swatch.s-accent { background: var(--blue); }
.chart-data { margin-top: 6px; }
.chart-data summary { cursor: pointer; color: var(--text-2); font-size: 13px; }

/* Maßnahme 9: Vorperiode gestrichelt GRAU (orange gestrichelt ist den Grenzwerten vorbehalten), Marker für Ereignisse
   (senkrechte Linie, Kästchen mit Buchstaben L/T/M/B, Titel beim Zeigen) und die Liste der Ereignisse unter dem Diagramm. */
.chart .s-teal { stroke: var(--teal); }
.chart .dot.s-teal { fill: var(--teal); }
.chart .line-prev { stroke: var(--text-3); stroke-width: 1.8; stroke-dasharray: 6 4; }
.swatch-prev { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--text-3); }
.chart .mk-hit { stroke: transparent; stroke-width: 12; pointer-events: stroke; }
.chart .mk-line { stroke: var(--text-2); stroke-width: 1.2; }
.chart .mk-badge { fill: var(--card); stroke: var(--text-2); stroke-width: 1; }
.chart .mk-text { fill: var(--text); font-size: 10px; font-weight: 700; font-family: inherit; }
.chart .mk:hover .mk-line { stroke: var(--text); stroke-width: 1.8; }
.chart .mk:hover .mk-badge { stroke: var(--text); }
.mk-key {
  display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 3px; flex: none;
  border: 1px solid var(--text-2); border-radius: 4px; background: var(--card); color: var(--text);
  font-size: 10.5px; font-weight: 700; line-height: 1;
}
.chart-marked { margin-bottom: 10px; }
/* Handy: Das SVG (640 Einheiten) schrumpft auf etwa die Hälfte, die Buchstaben wären kaum 5 px hoch. Dort nur die Linien;
   welcher Tag was war, steht in der Liste „Ereignisse im Diagramm“ direkt darunter. */
@media (max-width: 767px) {
  .chart .mk-badge, .chart .mk-text, .chart .legend-mk { display: none; }
}
.chart-events { margin: 0 0 18px; }
.chart-events-head { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ev-list li { display: grid; grid-template-columns: 84px 132px minmax(0, 1fr); gap: 4px 10px; align-items: baseline; }
.ev-list time { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.ev-kind { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.ev-text { overflow-wrap: anywhere; }
span.ev-text { color: var(--text); }
.ev-more { margin-top: 8px; }
.ev-more summary { cursor: pointer; color: var(--text-2); }
.ev-more .ev-list { margin-top: 6px; }
.chart-events .muted.small { margin: 6px 0 0; }
.chart-title { font-size: 17px; font-weight: 600; margin: 20px 0 8px; }
.chart-title:first-of-type { margin-top: 8px; }

/* Zeitraum der Projektseite: Links wie ein Segment-Umschalter, aktueller mit aria-current */
.period-bar { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: 0 0 8px; }
.period-nav { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); flex: none; }
.period-label { padding: 0 6px 0 8px; font-size: 12px; font-weight: 600; color: var(--tab-text-2); }
.period-nav a { padding: 5px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--tab-text-2); white-space: nowrap; } /* --text-2 auf --fill nur 4,3:1 */
.period-nav a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.period-nav a[aria-current="true"] { color: var(--text); font-weight: 600; background: var(--card); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .period-nav a[aria-current="true"] { background: #3a3a3c; }
.period-note { margin: 0; font-size: 13px; color: var(--text-2); flex: 1 1 320px; min-width: 0; }
@media (max-width: 767px) {
  .period-nav { display: flex; width: 100%; }
  .period-nav a { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
  .ev-list { gap: 2px; }
  .ev-list li { grid-template-columns: auto minmax(0, 1fr); padding: 4px 0; }
  .ev-list .ev-text { grid-column: 1 / -1; }
  .ev-list a.ev-text { display: flex; align-items: center; min-height: 44px; }
  .ev-more summary, .chart-data summary { padding: 12px 0; } /* 44px Tippfläche, Dreieck bleibt (display: list-item) */
}

/* ---------- Projektseite im Aufbau des Team-Dashboards ---------- */
/* Klebt unter der ebenfalls klebenden Leiste oben (.topbar: 60 px und 1 px Linie, am Handy 56 px und 1 px), nicht dahinter */
.jump {
  position: sticky; top: 61px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: -8px -8px 8px; padding: 8px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.jump::-webkit-scrollbar { display: none; }
@media (max-width: 767px) { .jump { top: 57px; } }
.jump a { color: var(--text-2); font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.jump a:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.dash-sec { padding-top: 40px; scroll-margin-top: 56px; }
/* Meldungen in Abschnitten unter der klebenden Sprungleiste (Rücksprung #meldung-…, Fokus aus app.js): nicht unter der Leiste */
.dash-sec .flash { scroll-margin-top: 64px; }
.dash-sec:first-of-type { padding-top: 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.sec-head p { color: var(--text-2); margin: 0; max-width: 60ch; }

.grid { display: grid; gap: var(--gap); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.grid > .card, .stack > .card, .dash-sec > .card { margin-bottom: 0; }
/* Mehrere Karten direkt in einem Abschnitt (ohne .grid, z. B. Chancen › Kundenfragen): derselbe Abstand wie im Raster. */
.dash-sec > .card + .card { margin-top: var(--gap); }
.stack { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.card-head-gap { margin-top: 22px; }
.card-sub { font-size: 13px; color: var(--text-2); margin: 2px 0 0; }
.card .empty { margin-bottom: 0; }

.kpi-val { font-size: 34px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 13px; font-weight: 600; margin-top: 2px; }
.kpi-delta.muted { font-weight: 500; }
.up { color: var(--green-text); }
.down { color: var(--red-text); }
.warn-text { color: var(--orange-text); }
.big { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: 17px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.pos { display: inline-block; min-width: 28px; text-align: center; padding: 2px 6px; border-radius: 6px; background: var(--fill); font-weight: 600; font-size: 13px; }

/* Verlaufslinie in Kacheln; Farbe über die Klasse, damit Hell/Dunkel ohne Neuzeichnen greift */
.spark { display: block; width: 100%; height: 44px; margin-top: 12px; }
.spark-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-top { stop-opacity: .25; }
.spark-bottom { stop-opacity: 0; }
.s-blue .spark-line { stroke: var(--blue); }     .s-blue stop { stop-color: var(--blue); }
.s-indigo .spark-line { stroke: var(--indigo); } .s-indigo stop { stop-color: var(--indigo); }
.s-teal .spark-line { stroke: var(--teal); }     .s-teal stop { stop-color: var(--teal); }
.s-green .spark-line { stroke: var(--green); }   .s-green stop { stop-color: var(--green); }
.s-red .spark-line { stroke: var(--red); }       .s-red stop { stop-color: var(--red); }

/* Säulen: alle außer der letzten (aktueller Zeitraum) gedämpft */
.bars { display: block; width: 100%; height: auto; }
.bars .axis { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.bar-col { opacity: .45; }
.bar-col.is-now { opacity: 1; }
.s-blue .bar-col { fill: var(--blue); }
.s-indigo .bar-col { fill: var(--indigo); }

/* Zeitleiste */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 18px 26px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--blue); }
.tl li::after { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::after { display: none; }
.tl li.tl-pr::before { border-color: var(--indigo); }
.tl-t a { color: var(--text); }
.tl-t a:hover { color: var(--blue-text); }
.tl-meta .tag { margin-left: 2px; }
.tl-meta { font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-who { font-weight: 600; color: var(--text); }
.tl-t { font-size: 14.5px; margin-top: 2px; }
.av { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--on-navy); background: var(--navy); flex: none; }

/* Status-Liste */
.slist { list-style: none; margin: 0; padding: 0; }
.slist li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.slist li:last-child { border-bottom: 0; }
.slist .tag, .slist-v { margin-left: auto; }
.slist-v { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--green); }
.dot-warn { background: var(--orange); }
.dot-bad { background: var(--red); }
.dot-off { background: var(--text-3); opacity: .5; }

/* Systemzustand (src/Views/system_health.php): Prüfungen wie die Statusliste, mit Meldung und „Was zu tun ist“ unter dem Namen. */
.health-list { list-style: none; margin: 0; padding: 0; }
.health-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.health-item:last-child { border-bottom: 0; }
.health-item .dot { margin-top: 6px; }
.health-item .tag { margin-left: auto; flex: none; }
.health-main { min-width: 0; flex: 1; }
.health-title { font-size: 15px; font-weight: 600; margin: 0; }
.health-msg { margin: 2px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.health-todo { margin: 6px 0 0; font-size: 14px; max-width: 75ch; overflow-wrap: anywhere; }
/* Fehlgeschlagene Hintergrund-Aufgaben: je Aufgabe ein tbody aus zwei Zeilen – Angaben, darunter über die ganze Breite „Was
   schiefging“ (Anfang der bereinigten Fehlermeldung). Die Linie steht unter dem Paar, der Hover-Hintergrund gilt für beide Zeilen. */
.health-jobs tr.health-job td { border-bottom: 0; padding-bottom: 2px; }
.health-jobs tbody tr.health-err-row td { padding-top: 0; white-space: normal; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.health-jobs tbody:last-of-type tr.health-err-row td { border-bottom: 0; }
.health-jobs tbody:hover td { background: var(--fill); }
.health-err-label { font-weight: 600; margin-right: 4px; }
.health-err { font-family: var(--mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.health-repeat { display: block; margin-top: 2px; }
.health-sub { font-size: 15px; font-weight: 600; margin: 20px 0 4px; }
@media (max-width: 767px) {
  /* Handy: Köpfe und Zellen der beiden Tabellen brechen zwischen Wörtern um (Datum nach dem Komma, „Dashboard (ohne Projekt)“),
     die Erklärzeile notfalls überall, Spaltenabstand 8 statt 12 px – so passen sie ohne seitliches Scrollen in die Karte. */
  .health-table th, .health-table td { white-space: normal; }
  .health-table th + th, .health-table td + td { padding-left: 8px; }
  .health-table .cell-sub { overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
  .health-item { flex-wrap: wrap; row-gap: 8px; }
  .health-main { flex-basis: calc(100% - 22px); }
  .health-item .tag { margin-left: 22px; } /* unter dem Text, auf Höhe des Namens (Punkt 10px + Abstand 12px) */
}

/* Erreichbarkeit */
.avail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 8px; }
.avail .kpi-label { display: block; margin-bottom: 6px; }
.avail-last { font-size: 14px; font-weight: 600; padding-top: 8px; }
.uptime { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 34px; margin-top: 10px; } /* ein Streifen je Tag des Zeitraums (7/28/90) */
.uptime i { border-radius: 2px; background: var(--fill); }
.uptime i.u-ok { background: var(--green); }
.uptime i.u-teil { background: var(--orange); }
.uptime i.u-aus { background: var(--red); }
.uptime-ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* Balkenliste (Geräte, Länder, Herkunft) */
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.blist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-n { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-bar { grid-column: 1 / -1; display: block; width: 100%; height: 6px; border-radius: 3px; }
.bl-track { fill: var(--fill); }
.bl-fill { fill: var(--blue); }
.s-indigo .bl-fill { fill: var(--indigo); }
.s-teal .bl-fill { fill: var(--teal); }
.chart .s-indigo { stroke: var(--indigo); }
.chart .dot.s-indigo { fill: var(--indigo); }
.swatch.s-indigo { background: var(--indigo); }

.seo-list .bl-label { display: flex; align-items: center; gap: 2px; }
.seo-list .bl-label a { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.seo-list .bl-fill.is-low { fill: var(--orange); }

.grid-row2 { margin-top: var(--gap); }
.kpi-unit { font-size: 17px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }

/* Gestapelte Säulen: Bots orange, Angriffsversuche rot */
.stackbars .part-0, .swatch.part-0 { fill: var(--orange); background: var(--orange); }
.stackbars .part-1, .swatch.part-1 { fill: var(--red); background: var(--red); }

/* Lighthouse-Ringe */
.span-all { grid-column: 1 / -1; }
.rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.ring { position: relative; width: 100%; max-width: 92px; margin: 0 auto; }
.ring svg { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring-track { stroke: var(--fill); }
.ring-val { stroke-linecap: round; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.r-ok .ring-val { stroke: var(--green); } .r-ok b { color: var(--green-text); }
.r-warn .ring-val { stroke: var(--orange); } .r-warn b { color: var(--orange-text); }
.r-bad .ring-val { stroke: var(--red); } .r-bad b { color: var(--red-text); }
.r-off b { color: var(--text-3); }
.ring-l { font-size: 12px; color: var(--text-2); margin-top: 6px; }
@media (max-width: 767px) { .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; } }

/* Kacheln als Link auf die Mängel-Unterseite */
a.card-link { color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease; }
a.card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow), 0 2px 8px rgba(0, 0, 0, .06); }
a.card-link:focus-visible { outline-offset: 3px; border-radius: var(--radius); }
.top-findings { margin-top: var(--gap); }
.top-findings .card-head { align-items: center; }

/* Ausklappbare Details (z. B. alle Messwerte der Sicherheit) */
details.more { margin-top: var(--gap); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
details.more > summary {
  cursor: pointer; list-style: none; padding: 16px 22px; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 10px; border-radius: var(--radius);
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "›"; font-size: 20px; line-height: 1; color: var(--text-3); transition: transform .15s ease; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary:hover { background: var(--fill); }
.more-body { padding: 4px 22px 22px; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .g4, .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .sec-head h2 { font-size: 24px; }
  .avail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avail .big { font-size: 32px; }
  .uptime { gap: 1px; }
}

/* Sicherheit */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.sec-card { background: var(--fill); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.sec-card h3, .security h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.security .two-col h3 { margin-top: 4px; }
details.csp { margin-top: 12px; }
details.csp summary { cursor: pointer; font-weight: 500; }

/* Screenshots in der Seiten-Historie */
.shots { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); }
.shot { display: flex; flex-direction: column; gap: 6px; }
.shot img { display: block; width: 100%; height: 180px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 12px; background: var(--fill); }
.shot a:focus-visible img { outline: 2px solid var(--blue); outline-offset: 2px; }
.shot .row-meta { white-space: normal; }
.shot-over img { border: 2px solid var(--orange); }
.shot-over .row-meta { color: var(--orange-text); }

/* ---------- Mittelgroß ---------- */
@media (max-width: 1100px) {
  .project-layout, .page-top, .two-col { grid-template-columns: minmax(0, 1fr); }
  .project-tree { position: static; max-height: none; }
}

/* ---------- Mobil (unter 768 px): Heute, Mängel, Aufgaben; Navigation in der Leiste oben ---------- */
@media (max-width: 767px) {
  .shell .main { padding: 20px 16px 48px; }
  .no-shell .main { padding: 16px; }
  .panel, .card { padding: 18px; }
  .inventory { grid-template-columns: 1fr; }
  .filters label { flex: 1 1 140px; }
  .filters select, .filters input[type="search"] { width: 100%; min-width: 0; }
  /* Mängel-Tabelle: nur Auswahl, Mangel und Status (findings_table.php, .col-opt, .col-page). Die Seite steht als Unterzeile im
     Mangel (.cell-alt-page) und hat so dessen Breite: Pfadteile wie „flughafentransfer/“ passen ganz in eine Zeile. Kein Umbruch
     mitten im Wort: lange Titelwörter nur an Silben mit Trennstrich, Pfade an „/“ (im Pfadteil nur, wenn er allein nicht in die
     Zeile passt), die Detailzeile überall. Spaltenabstand 8 px. */
  .table.findings .col-opt, .table.findings .col-page { display: none; }
  .table.findings .cell-alt-page { display: block; }
  .table.findings td, .table.findings th { white-space: normal; }
  .table.findings wbr { display: inline; }
  .table.findings .cell-alt-page a { overflow-wrap: break-word; }
  .table.findings .cell-sub { overflow-wrap: anywhere; }
  .table.findings .cell-title { -webkit-hyphens: auto; hyphens: auto; }
  .table.findings th + th, .table.findings td + td { padding-left: 8px; }
  .bulk-group { flex-wrap: wrap; }
  .bulkbar input[type="text"] { flex: 1 1 140px; width: auto; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; }
  .only-narrow { display: block; }
}

/* Konto */
.form-narrow { max-width: 420px; }
.form-narrow .btn { margin-top: 12px; }

/* Nutzer und Rollen: einmal angezeigtes Startpasswort gut lesbar, Klick markiert alles zum Kopieren. */
.startpasswort { font-size: 18px; letter-spacing: .06em; user-select: all; white-space: nowrap; }

/* ---------- Datenquelle immer unten, Zeitraum-Umschalter (08.10.2026, Wunsch Hannes) ---------- */
/* Karten in einem Raster werden Spalten; die Quellenzeile (.src) als letztes Element rückt per margin-top:auto
   ganz nach unten. So steht sie in allen Karten einer Reihe auf derselben Höhe, egal wie viel Inhalt darüber steht. */
.grid > .card { display: flex; flex-direction: column; }
.grid > .card > .src:last-child { margin-top: auto; padding-top: 14px; }
/* Kleiner Umschalter 7 T / 30 T im Kartenkopf (an der Stelle des Etiketts „Echte Daten“). */
.seg-sm button { font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.seg-sm { border-radius: 8px; }
.kpi-note { font-size: 12px; color: var(--text-2); margin: 6px 0 0; }
.kpi-note.warn-text { color: var(--orange-text); }

/* Kreisdiagramm (Anfragen: Top 3 Seiten / Städte), Farben wie früher „Geräte“ im Team-Dashboard */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 120px; height: 120px; flex: none; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: var(--fill); stroke-width: 6; }
.donut-seg { fill: none; stroke-width: 6; }
.donut-seg.d0 { stroke: var(--blue); } .donut-sw.d0 { background: var(--blue); }
.donut-seg.d1 { stroke: var(--indigo); } .donut-sw.d1 { background: var(--indigo); }
.donut-seg.d2 { stroke: var(--teal); } .donut-sw.d2 { background: var(--teal); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; flex: 1; min-width: 0; }
.donut-legend li { display: flex; align-items: center; gap: 8px; }
.donut-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-v { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .donut-wrap { flex-direction: column; align-items: stretch; } .donut { align-self: center; } }

/* ---------- Werkzeug „Mitbewerber“ (src/Views/competitors.php) ---------- */
/* Eigene Website s-blue, Mitbewerber s-indigo (Diagramm-Reihenfolge des Styleguides); Aussagen tragen Wort und Symbol,
   keine Ampelfarben. Balkenbreiten als SVG-Attribut (CSP: keine style-Attribute). */
.tabs a { white-space: nowrap; }
.tabs-mb { background: none; padding: 0; gap: 8px; margin: 0 0 10px; }
.tabs-mb a { display: grid; gap: 1px; line-height: 1.25; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; }
.tabs-mb a:hover { background: var(--fill); }
.tabs-mb a[aria-current="page"], :root[data-theme="dark"] .tabs-mb a[aria-current="page"] { background: var(--card); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.tabs-mb a.tab-manage { align-content: center; color: var(--text-2); }
.tabs-mb a.tab-manage[aria-current="page"] { color: var(--text); }
.tab-host { font-size: 11.5px; font-weight: 400; color: var(--tab-text-2); }
.tabs .muted { color: var(--tab-text-2); }
.card > .tabs:first-child, .more-body > .tabs:first-child { margin-top: 0; }
/* Datenstand in einer Zeile (statt Quellenzeile je Karte), darunter die Ansichten-Reiter (Ebene 3, kleine Pillen) */
.mb-stand { font-size: 14px; color: var(--text-2); margin: 0 0 12px; }
.mb-stand p { margin: 0; }
.mb-stand .notice p, .mb-stand .notice { margin: 8px 0 0; color: var(--text); }
.mb-progress { margin: 0; }
.tabs-views { background: none; padding: 0; gap: 6px; margin: 0 0 20px; }
.tabs-views a { background: var(--fill); border-radius: 999px; padding: 7px 13px; font-size: 13px; }
.tabs-views a:hover { background: var(--line); }
.tabs-views a[aria-current="page"], :root[data-theme="dark"] .tabs-views a[aria-current="page"] { background: var(--text); color: var(--card); box-shadow: none; }
.bar.bar-wide { width: 160px; }
.mb-kv { margin: 16px 0; grid-template-columns: minmax(0, max-content) minmax(4em, 1fr); }
.blist.vs { gap: 8px; margin: 12px 0 4px; }
.s-blue .bl-fill { fill: var(--blue); }
.swatch.s-blue { background: var(--blue); }
.swatch.s-teal { background: var(--teal); }
.card button[type="submit"].btn-quiet {
  margin-top: 0; padding: 6px 12px; background: var(--fill); color: var(--text); font-size: 13px; font-weight: 500;
}
.card button[type="submit"].btn-quiet:hover { background: var(--line); filter: none; }
.btn-danger, .card button[type="submit"].btn-danger {
  display: inline-block; margin-top: 8px; padding: 6px 12px; border: 0; border-radius: 980px; cursor: pointer;
  background: var(--red-soft); color: var(--red-text); font-size: 13px; font-weight: 600;
}
.btn-danger:hover, .card button[type="submit"].btn-danger:hover { filter: none; text-decoration: underline; }

/* Vorschläge */
.sugs { list-style: none; margin: 0; padding: 0; }
.sug { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.sug:first-child { border-top: 0; padding-top: 0; }
.sug p { margin: 0; }
.sug-title { font-weight: 600; font-size: 15.5px; }
.sug-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sug-tags:empty { display: none; }
.sug-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 4px; }
.sug-actions .btn { margin: 0; }
.sug-more-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; }
.sug-more > summary, details.remove > summary { cursor: pointer; color: var(--blue-text); font-size: 13.5px; }
.sug-more { min-width: 0; max-width: 100%; }
.sug-more[open] { flex-basis: 100%; }
.sug-more form, details.remove form { margin-top: 8px; }
.sug-more label { margin: 0; font-size: 13px; }

/* Ausklappbares innerhalb einer Karte (ohne eigene Kartenfläche) */
details.fold { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.fold > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.fold[open] > summary { margin-bottom: 10px; }
details.fold .inline-form label { margin: 0; font-size: 13px; }
.table.topics td { vertical-align: top; }
.table td .tag { margin-left: 4px; }

/* Seiten nebeneinander */
.pair-kv { grid-template-columns: minmax(110px, max-content) 1fr; }
.brand-part { color: var(--text-2); }
.hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hlist .lvl3 { padding-left: 16px; }
.pair-action { margin: 10px 0 0; }
.card h3 .swatch { margin-right: 4px; vertical-align: 0; }

/* Verlinkung */
.link-side h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.mb-label { font-size: 12px; font-weight: 500; color: var(--text-3); margin: 14px 0 6px; }
ul.plain, ol.plain { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
ul.plain { list-style: none; padding-left: 0; }
.basics { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 16px; }
.basic-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; font-weight: 500; }

/* Kontakt und Vertrauen (Stufe 2) */
.table.trust td { vertical-align: top; }
.table.trust td .tag { margin-left: 0; }
.cell-line { display: block; margin-top: 2px; }
details.trust-pages { margin-top: 4px; }
details.trust-pages > summary { cursor: pointer; color: var(--blue-text); font-size: 13px; }
details.trust-pages ul, .trust-hosts { margin-top: 6px; }

/* Änderungen: Sätze als Liste innerhalb eines Eintrags der Zeitleiste (ohne deren Kreise und Linie) */
.tl-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; list-style: disc; }
.tl .tl-list li { padding: 0; }
.tl .tl-list li::before, .tl .tl-list li::after { display: none; }
.tl-t .tl-list a { color: var(--blue-text); }
.tl-p { margin: 2px 0 0; }
.table .btn-quiet { white-space: nowrap; }

/* Ansichten (?ansicht=…): gleiche Überschriften in allen Teilen; Übersicht mit Antwortsatz, Vorschlägen (span2, im DOM
   zuerst) und „Im Vergleich“, darunter „Außerdem aufgefallen“. Neutral: Text in --text bzw. --text-2, keine Ampel. */
.card-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.mb-view .card > h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
.mb-view .card > h2 ~ h3 { font-size: 15px; font-weight: 600; margin: 22px 0 6px; }
.mb-view .card > .card-sub { margin-bottom: 12px; }
.mb-view .card > h2 + .tabs { margin-top: 10px; }
.mb-p { margin: 0 0 12px; }
.note-neutral { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; font-size: 14px; color: var(--text); }
.mb-lead { margin: 0 0 18px; max-width: 62em; }
.lead-say { font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; color: var(--text); margin: 0; text-wrap: pretty; }
.lead-sub { font-size: 14px; color: var(--text-2); margin: 6px 0 0; }
.mb-answer { align-items: start; margin-bottom: var(--gap); }
.mb-sugs .card-sub { margin-bottom: 14px; }
.sug-line { font-size: 15px; }
.sug-decide { margin-top: 8px; }
.mb-more { margin: 14px 0 0; font-size: 14px; }
.h-quiet, .mb-view h2.h-quiet { font-size: 15px; font-weight: 600; color: var(--text-2); margin: 0; }
.stack.mb-compare { gap: 10px; }
.mb-compare-cards { display: grid; gap: var(--gap); }
.card.mb-cmp { margin-bottom: 0; padding: 18px 20px; }
.mb-cmp h3 { font-size: 15px; font-weight: 600; margin: 0; }
.mb-cmp .blist.vs { margin: 10px 0 6px; }
.mb-cmp .blist.vs li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.mb-cmp .blist.vs .bl-label { flex: 0 1 auto; max-width: 100%; }
.mb-cmp .blist.vs .bl-bar { flex: 0 0 100%; }
.cmp-line { font-size: 13px; color: var(--text); margin: 6px 0 0; }
.cmp-line strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp-note { font-size: 12.5px; color: var(--text-2); margin: 4px 0 0; }
.also-list { list-style: none; margin: 10px 0 0; padding: 0; }
.also-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.also-list li > span { flex: 1 1 30em; min-width: 0; }
.also-list li > a { white-space: nowrap; }
.pair-pick { margin-top: 6px; }
.pair-pick label { margin: 0; font-size: 13px; }
@media (max-width: 1100px) {
  .mb-answer { grid-template-columns: minmax(0, 1fr); }
  .mb-answer > .span2 { grid-column: auto; }
  .mb-compare-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 767px) {
  /* Kontakt und Vertrauen: je Merkmal ein Block, beide Websites nebeneinander mit Namen (data-label) statt seitlichem Bildlauf */
  .table.trust thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table.trust, .table.trust tbody { display: block; }
  .table.trust tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table.trust tbody tr:last-child { border-bottom: 0; }
  .table.trust td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
  .table.trust td:first-child { grid-column: 1 / -1; }
  .table.trust td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 500; color: var(--text-3); }
  .table.trust tbody tr:hover td { background: none; }
  .pair-kv, .mb-kv { grid-template-columns: 1fr; }
  .tabs.tabs-wrap { flex-wrap: wrap; overflow-x: visible; }
  .mb-compare-cards { grid-template-columns: minmax(0, 1fr); }
  .pair-kv dt, .mb-kv dt { margin-top: 6px; }
}

/* ---------- Projektkopf mit Werkzeugleiste (src/Views/project_head.php) ---------- */
/* Auf allen Projektseiten gleich hoch: Der Projektname hat als H1 (Übersicht) und als Link (übrige Werkzeuge) dieselbe Größe,
   damit die Leiste beim Wechsel nicht springt. Leiste als Unterstrich-Leiste (Ebene 1), nicht sticky; inaktiv in --text, aktiv
   in --blue-text mit 2 px Strich in --blue. Zähler neutral; --tab-text-2, weil --text-2 auf --fill über --bg nur 4,3:1 hat. */
.proj-head { margin: 0 0 24px; }
.proj-name { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0; color: var(--text); }
.proj-icon { width: 28px; height: 28px; border-radius: 6px; vertical-align: -4px; margin-right: 10px; object-fit: contain; background: var(--fill); }
.proj-name a { color: var(--text); }
.proj-name a:hover { color: var(--blue-text); }
.proj-meta { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.tools-nav { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.tools-nav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 0; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--text); font-size: 15px; font-weight: 600;
}
.tools-nav a:hover { color: var(--blue-text); text-decoration: none; }
.tools-nav a[aria-current="page"] { color: var(--blue-text); border-bottom-color: var(--blue); }
.tools-nav .count { color: var(--tab-text-2); }

/* Hannes' Überblick behält den Abstand unter der Sprungleiste (vorher erster Abschnitt der Seite). */
.period-bar + .jump + .dash-sec { padding-top: 8px; }

@media (max-width: 767px) {
  .tools-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
}

/* ---------- Werkzeug „Chancen“ (src/Views/opportunities.php) ---------- */
/* Zeile mit Zeitraum und Schwellen unter der H1; Listen in Tabellenzellen ohne Aufzählungszeichen; Begriffe als zwei Spalten
   Textfelder (mobil eine). Tabellen, Karten und Leer-Zustände wie überall. */
.op-basis { margin: -12px 0 8px; font-size: 14px; color: var(--text-2); max-width: 90ch; }
.op-basis strong { color: var(--text); font-weight: 600; }
.op-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
/* Pfade brechen nur, wenn nötig (.mono bricht sonst nach jedem Zeichen, sobald die Tabelle schmal wird); lange Spalten mit
   Mindestbreite, schmale Bildschirme scrollen in .table-wrap statt Zeilen mit einem Wort je Zeile. */
.op-table .mono { overflow-wrap: break-word; }
.op-table td.op-wide { min-width: 18rem; }
/* Pfade haben <wbr> nach jedem inneren „/“ (opportunities.php). Wirksam im Link-Vorschlag (.op-brk), damit „Fast vorne“ auch mit
   langen Pfaden in die Karte passt, und auf dem Handy; sonst bleiben die Spaltenbreiten wie bisher. */
.op-table wbr { display: none; }
.op-table .op-brk wbr { display: inline; }
/* „Seite“ steht in „Fast vorne“ zweimal: .op-sm nur auf dem Handy (hinter den Zahlen), .op-no-sm sonst. */
.op-table .op-sm { display: none; }
.op-note { margin: 0 0 var(--gap); max-width: 90ch; }
details.op-below { margin-top: 12px; }
details.op-below > summary { cursor: pointer; color: var(--blue-text); font-size: 13.5px; }
.op-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); }
.op-form textarea { resize: vertical; min-height: 110px; }
/* Maßnahme 12: „Aufgabe anlegen“ als kleiner Link unter der ersten Zelle jeder Zeile (Text für Screenreader in .sr), Satz über der
   Tabelle „Mit und ohne Marke“, Summenzeile fett; Formularseite „Aufgabe anlegen“ (opportunity_task.php) nicht breiter als nötig. */
.op-table .op-task { display: inline-flex; align-items: center; min-height: 24px; white-space: nowrap; }
.op-lead { margin: 0 0 12px; font-size: 14px; color: var(--text-2); max-width: 90ch; }
.op-lead strong { color: var(--text); font-weight: 600; }
.op-table tr.op-total td { font-weight: 600; }
.op-table tr.op-total .cell-sub { font-weight: 400; }
.task-form { max-width: 640px; }
.task-form select { min-width: 16rem; max-width: 100%; }
.task-form textarea { resize: vertical; min-height: 4.5em; }
@media (max-width: 767px) {
  .op-form-grid { grid-template-columns: minmax(0, 1fr); }
  .op-basis { margin-top: -8px; }
  /* Tippflächen mindestens 44 px: Link „Aufgabe anlegen“ und die Felder der Formularseite. */
  .op-table .op-task { min-height: 44px; font-size: 14px; }
  .task-form input, .task-form select, .task-form textarea { min-height: 44px; font-size: 16px; }
  .task-form select { min-width: 0; width: 100%; }
  /* Handy: Zahlen gleich neben der ersten Spalte. Pfade brechen an „/“, Köpfe dürfen umbrechen, in „Fast vorne“ rückt „Seite“
     hinter die Zahlen; nur Seite und Link-Vorschlag liegen dann rechts davon. */
  .op-table wbr { display: inline; }
  .op-table th { white-space: normal; }
  .op-table .op-sm { display: table-cell; }
  .op-table .op-no-sm { display: none; }
}

/* ---------- Glocke „Was ist neu“ (layout.php) und Seite /neuigkeiten (news.php) ---------- */
/* Glocke als runder Knopf in der Leiste oben (Feinheiten bei .round-btn.bell weiter unten). Abzeichen in der Akzentfarbe
   (--btn, weiße Schrift 4,7:1 in beiden Modi), keine Ampelfarbe; ohne Ungelesenes nur das Symbol. Abzeichen oben rechts
   versetzt, damit die Glocke sichtbar bleibt. */
.bell {
  position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: 9px; color: var(--text-2);
}
.bell:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.bell[aria-current="page"] { background: var(--fill); color: var(--blue); }
.bell .icon { width: 20px; height: 20px; }
.bell-count {
  position: absolute; top: -4px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--btn); color: #fff; box-shadow: 0 0 0 2px var(--bg);
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums;
}

.news { max-width: 820px; }
.panel h2.news-day { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin: 26px 0 0; font-variant-numeric: tabular-nums; }
.panel h2.news-day:first-child { margin-top: 0; }
.news-item { padding: 12px 0 14px; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; }
.news-title { font-size: 15px; font-weight: 600; margin: 0 0 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.news-text { margin: 0; max-width: 70ch; font-size: 14.5px; }
.news-link { display: inline-block; margin-top: 6px; padding: 2px 0; font-size: 14px; font-weight: 600; }
.tag--new { background: var(--blue-soft); color: var(--blue-text); }

/* ---------- Mangel: Leiste der Liste („nächster Mangel“, src/Views/finding.php) und Abschluss (findings_done.php) ---------- */
/* Eine Zeile über den Panels: links „← Zur Liste“, daneben „3 von 17 · Name der Liste“ (14px, --text-2, Stelle fett in --text),
   rechts vorheriger und nächster Mangel als ruhige Pillen (--fill). Alle Ziele mindestens 44 px hoch. Mobil zwei Zeilen: oben
   die Links, darunter die Stelle. */
.finding-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -8px 0 var(--gap);
  padding: 4px 6px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
}
.finding-nav a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 12px; border-radius: 980px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.finding-nav a:hover { text-decoration: none; background: var(--fill); }
.fn-where { margin: 0; flex: 1 1 14em; min-width: 0; font-size: 14px; color: var(--text-2); }
.fn-where strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.fn-step { display: inline-flex; gap: 6px; margin-left: auto; }
.fn-step a { background: var(--fill); color: var(--text); }
.fn-step a:hover { background: var(--line); }
.fn-off { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; color: var(--text-2); }
.done-panel .empty { max-width: 70ch; }
/* Zwei Panels nebeneinander (Seiten- und Mangel-Ansicht) beginnen auf derselben Höhe; .panel + .panel gilt nur untereinander. */
.page-top > .panel + .panel { margin-top: 0; }
/* Auswahlkästchen der Mängel-Tabelle: Label als Tippfläche (mobil vergrößert, s. u.). */
.check-hit { display: inline; margin: 0; font-weight: inherit; }
.done-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 16px 0 0; }
.done-actions .btn, .done-actions .btn-quiet { margin: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; font-size: 14px; }

@media (max-width: 767px) {
  .finding-nav { margin-top: -12px; padding: 4px; }
  .fn-where { order: 3; flex-basis: 100%; padding: 0 12px 6px; }
  .fn-back { padding-left: 8px; }

  /* Aktionen auf der Detailseite: Felder und Knöpfe über die volle Breite, 44 px hoch, Schrift der Felder 16 px. */
  .actions-panel .action-forms { display: grid; gap: 14px; }
  .actions-panel .inline-form { display: flex; width: 100%; gap: 8px; }
  .actions-panel .inline-form select, .actions-panel .inline-form input { flex: 1 1 100%; min-height: 44px; font-size: 16px; }
  .actions-panel .inline-form input[type="date"] { flex: 1 1 9em; }
  .actions-panel .inline-form .btn, .actions-panel .inline-form .btn-quiet { flex: 1 1 auto; min-height: 44px; padding: 10px 18px; font-size: 15px; }

  /* Mängel-Liste: die ganze Zelle „Mangel“ ist die Tippfläche des Links zum Mangel; der Link zur Seite liegt darüber. */
  .table.findings .cell-main { position: relative; }
  .table.findings .cell-title::after { content: ""; position: absolute; inset: 0; }
  /* Eigene Zeile mit 44 px hoher, mindestens 44 px breiter Tippfläche (die Startseite „/“ wäre sonst 5 × 16 px groß). */
  .table.findings .cell-alt-page a { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  /* Filter, Ansichten, Chips, Aktionsleiste und Seitenwechsel der Liste: Tippflächen mindestens 44 px. */
  .filters select, .filters input[type="search"], .filters .btn-quiet { min-height: 44px; font-size: 16px; }
  .tabs-views a, .chip, .chips-reset, .pager a { min-height: 44px; display: inline-flex; align-items: center; }
  .saved-view, .saved-manage-list .check-label { min-height: 44px; display: inline-flex; align-items: center; }
  /* Aufklapp-Zeilen bleiben list-item (mit Dreieck); 12 + 20 + 12 = 44 px hoch. */
  .saved-box > summary, .saved-manage-list details.remove > summary { padding: 12px 0; line-height: 20px; }
  .saved-row input, .saved-rename input { min-height: 44px; font-size: 16px; }
  .saved-row .btn, .saved-rename .btn-quiet, .saved-manage-list .btn-danger { min-height: 44px; padding: 0 18px; font-size: 15px; }
  .saved-rename { width: 100%; flex-wrap: nowrap; }
  .saved-rename input { flex: 1 1 0; width: auto; min-width: 0; }
  .saved-rename .btn-quiet { flex: none; }
  .pager { justify-content: center; }
  .pager-pages a { min-width: 44px; justify-content: center; }
  .filters .filter-check { min-height: 44px; font-size: 16px; }
  .table th .th-sort { display: inline-flex; align-items: center; min-height: 44px; }
  .tabs a, .list-head a { min-height: 44px; display: inline-flex; align-items: center; }
  .tree-page, .tree summary { min-height: 44px; }
  /* Auswahlkästchen 20 px in einem 44 × 44 px großen Label (die Spalte wird 44 px breit). Nicht unsichtbar über den Rand
     verlängert: .table-wrap schneidet ab, was über die Tabelle hinausragt. */
  .table.findings .col-check input { width: 20px; height: 20px; margin: 0; }
  .check-hit { display: grid; place-items: center; width: 44px; height: 44px; margin: -12px 0; }
  /* Kopf der Seiten: Brotkrumen, Projektname und Adresse der Website mit 44 px hoher Tippfläche. */
  .crumbs a, .proj-name a, .proj-meta a { display: inline-flex; align-items: center; gap: 3px; min-height: 44px; }
  .crumbs { margin-bottom: 0; }
  .proj-meta { margin-top: 0; }
  .bulkbar select, .bulkbar input, .bulkbar .btn-quiet { min-height: 44px; font-size: 16px; }
}

/* ---------- Befehlspalette und Kürzel (src/Views/palette.php, assets/palette.js; Maßnahme 13) ---------- */
/* Dialog als Karte über der Seite: --card, Linie --line, Radius 20, Schatten --shadow-pop, dahinter --backdrop. Treffer 44 px hoch,
   der gewählte auf --blue-soft (Text bleibt --text, 4,5:1), Markierung wie in der Suche (<mark>, --highlight). Gruppen 12px/600
   --text-3. Ohne JS bleiben die Dialoge verborgen. */

/* Dialog: oben mit 8 % Abstand, nie höher als das Fenster; innen scrollt nur die Trefferliste bzw. die Kürzel. */
.palette, .keys-dialog {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text);
  box-shadow: var(--shadow-pop); width: min(640px, calc(100% - 32px)); max-width: none; margin: 8vh auto auto; overflow: hidden;
  max-height: calc(92vh - 16px); max-height: calc(92dvh - 16px);
}
.palette { max-height: min(640px, calc(92vh - 16px)); max-height: min(640px, calc(92dvh - 16px)); }
.palette[open], .keys-dialog[open] { display: flex; flex-direction: column; }
.palette::backdrop, .keys-dialog::backdrop { background: rgba(0, 0, 0, .4); background: var(--backdrop, rgba(0, 0, 0, .4)); }
.palette-box { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.palette-form { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.palette-form > .icon { color: var(--text-2); width: 20px; height: 20px; }
.palette-form input {
  flex: 1; min-width: 0; border: 0; border-radius: 0; padding: 10px 0; background: transparent; font-size: 17px; color: var(--text);
}
.palette-form input:focus { outline: none; }
.palette-form input::placeholder { color: var(--text-2); }
.palette-close { flex: none; }
.palette-form:focus-within { box-shadow: inset 0 -2px 0 var(--blue); }
.palette-results { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 8px 8px; overscroll-behavior: contain; }
.palette-group { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 12px 10px 4px; }
.palette-note { font-weight: 500; }
.palette-opt {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
}
.palette-opt.is-active { background: var(--blue-soft); }
/* Unterzeile auf --blue-soft: --text-2 käme hell nur auf 4,45:1, --tab-text-2 auf 5,6:1 (dunkel 7:1). */
.palette-opt.is-active .palette-sub { color: var(--tab-text-2); }
.palette-opt .sev { margin-right: 0; }
.palette-main { display: grid; flex: 1; min-width: 0; }
.palette-label { font-size: 14.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-sub, .palette-snippet { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-snippet { color: var(--text); }
/* Treffer-Markierung auf --highlight: in der Unterzeile (--text-2) nur 4,3:1 hell bzw. 2,9:1 dunkel, deshalb in --text. */
.palette-sub mark { color: var(--text); }
.palette-opt kbd { flex: none; color: var(--text-2); }
.palette-empty { margin: 14px 10px; color: var(--text-2); font-size: 14px; }
.palette-empty[hidden] { display: none; }
.palette-status { margin: 0; padding: 0 16px; font-size: 12.5px; color: var(--text-2); }
.palette-status:not(:empty) { padding: 6px 16px; border-top: 1px solid var(--line); }
.palette-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; padding: 8px 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
}
.palette-foot kbd { font-size: 11px; color: var(--text-2); }
.palette-foot button.link { margin-left: auto; font-size: 12px; }

.keys-box { flex: 1 1 auto; min-height: 0; padding: 20px 22px 22px; overflow: auto; }
.keys-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.keys-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.keys-box h3 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 18px 0 6px; }
.keys-list { margin: 0; display: grid; }
.keys-list > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.keys-list > div:first-child { border-top: 0; }
.keys-list dt { white-space: nowrap; color: var(--text-2); font-size: 13px; }
.keys-list dd { margin: 0; font-size: 14px; }

@media (max-width: 767px) {
  /* Handy: Palette oben über die ganze Breite (8 px Rand), Feld 16 px Schrift (kein Zoom unter iOS), „Schließen“ 44 px; die
     Fußzeile mit Pfeiltasten entfällt (Touch). Kürzel-Hilfe ebenso breit. */
  .palette, .keys-dialog { width: calc(100% - 16px); margin: 8px auto auto; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .palette-form { padding: 6px 8px 6px 14px; }
  .palette-form input { font-size: 16px; }
  .palette-close { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .keys-head .btn-quiet { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .palette-foot { display: none; }
  .keys-list > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Startseite: Inhalte des Cockpits (Maßnahme 10) in den Kacheln (src/Views/today.php) ----------
   Hinter den Regeln für .tag und .cell-sub (weiter oben), damit sie hier gezielt überschrieben werden. */
/* Kopf: Gruß, darunter der Antwortsatz; Kachel „Diese Woche behoben“ */
.start-head { align-items: flex-start; }
.today-intro { min-width: 0; flex: 1 1 520px; }
.page-head p.answer { color: var(--text); font-size: 17px; line-height: 1.4; margin: 2px 0 4px; max-width: 80ch; }
.win {
  display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; gap: 0 8px; margin: 0;
  padding: 10px 16px; border-radius: 14px; background: var(--fill); color: var(--text);
}
.win-label { font-size: 14px; font-weight: 600; }
.win-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.win-sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--tab-text-2); }   /* auf der Fläche: --text-2 nur 4,3:1 */
.win.is-win { background: var(--green-soft); }
.win.is-win .win-num { color: var(--green-text); }                                  /* große Zahl: 3:1 genügt (hell 4,3:1) */
.win.is-win .win-sub { color: var(--text); }

/* Stern zum Anheften (Projekt-Kacheln, .ptile-pin weiter unten) */
.pin {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; padding: 0; margin-left: -6px;
  border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer;
}
.pin:hover { background: var(--fill); color: var(--text); }
.pin-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.pin[aria-pressed="true"] { color: var(--blue-text); }
.pin[aria-pressed="true"] .pin-icon { fill: currentColor; }
.cp-delta { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* „wieder aufgetaucht“: neutral (Ampelfarben nur für die Schwere), mit Kreispfeil */
.tag-reopened { background: var(--fill); color: var(--text); font-weight: 600; margin-top: 3px; }
.tag-reopened::before { content: "↻ "; }
.row-meta .tag-reopened { margin: 0 2px 0 0; vertical-align: 1px; }

/* Gewinner und Verlierer */
.movers .list { margin-bottom: 6px; }
.movers .list-row { padding: 8px 0; }
.movers .row-title { font-family: var(--mono); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }   /* das Ende unterscheidet Seiten */
.movers .row-meta, .alarm-list .row-meta { white-space: normal; overflow-wrap: anywhere; }   /* Projekt bzw. Seite ganz lesbar */
.alarm-reopened { margin: -4px 0 10px; }   /* wieder aufgetauchte kritische Mängel über der Tabelle der Warnungen */

@media (max-width: 767px) {
  /* Gewinner und Verlierer: die ganze Zeile ist die Tippfläche des Links zur Seite (sonst nur 19 px hoch). */
  .movers .list-row { position: relative; min-height: 44px; }
  .movers a.row-title::after { content: ""; position: absolute; inset: 0; }
  .panel-head > a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
}

/* Live-Gang der Websites (Maßnahme 8): Satz zum Stand über dem Verlauf, wie erkannt wird, Etikett „live“ mit grünem Punkt in
   der Zeitleiste und Zustand je Änderung im Text-Verlauf. Hinweise ohne Testversion bzw. GitHub-App als .note-neutral. */
.deploy-state { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.deploy-method { margin: 0 0 14px; font-size: 12.5px; color: var(--text-2); max-width: 70ch; }
.tl li.tl-live::before { border-color: var(--green); background: var(--green-soft); }
.live-text { color: var(--green-text); font-weight: 600; }

/* Vorher/Nachher je Textänderung (Maßnahme 9, src/Views/content_effects.php): im Editor und in Seite → Sichtbarkeit je Live-Gang
   eine Karte (Rahmen statt Fläche, darin vier Kennzahlen auf --fill), im Werkzeug „Texte“ eine Liste. Kernsatz 15px/600 in
   --text, Richtung zusätzlich in --green-text/--red-text (die Worte „mehr“/„weniger“ tragen die Aussage, Farbe nur als Hilfe). */
.fx-intro { margin: 0 0 6px; max-width: 75ch; font-size: 14px; }
.fx-method { margin: 0 0 14px; }
.fx-method > summary { cursor: pointer; color: var(--blue-text); font-size: 13.5px; }
.fx-method ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13.5px; max-width: 80ch; }
.fx-method li + li { margin-top: 6px; }
.fx-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fx-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; scroll-margin-top: 72px; }
.fx-card:target { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.fx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.panel .fx-head h3 { font-size: 15px; font-weight: 600; margin: 0; }
.fx-meta { color: var(--text-2); font-size: 13px; }
.fx-lead { margin: 8px 0 2px; font-size: 15px; font-weight: 600; color: var(--text); }
.fx-lead.up { color: var(--green-text); }
.fx-lead.down { color: var(--red-text); }
.fx-text { margin: 0; font-size: 14px; color: var(--text); max-width: 80ch; font-variant-numeric: tabular-nums; }
.fx-note { margin: 6px 0 0; font-size: 13px; color: var(--text-2); max-width: 80ch; }
.fx-metrics { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.fx-metric { background: var(--fill); border-radius: 12px; padding: 10px 12px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.fx-values { font-size: 18px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fx-change { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-diff.up, .fx-diff.down { font-weight: 600; }
.fx-card .src { margin-top: 10px; }
.fx-rows { list-style: none; margin: 0; padding: 0; }
.fx-row { display: grid; gap: 1px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.fx-row:first-child { border-top: 0; }
.fx-row .row-meta { white-space: normal; }
.fx-row .fx-lead { margin-top: 6px; }
.fx-rows + .fx-more, .fx-cards + .muted, .fx-rows + .muted { margin-top: 10px; }
@media (max-width: 767px) {
  .fx-card { padding: 12px; }
  .fx-method > summary, .fx-more > summary { padding: 12px 0; }      /* 44px Tippfläche */
  .fx-row .row-title { display: flex; align-items: center; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
}
/* ---------- Leiste oben (04.11.2026, Wunsch Hannes; Aufbau wie Family Office) ----------
   Links Haus (Startseite), Projekte, Aufgaben; rechts Lupe, Glocke, Hell/Dunkel, Profil-Kreis. Aufklapper sind <details>
   (data-dd); app.js schliesst die anderen beim Oeffnen, bei Klick daneben und mit Esc. */
html { scroll-padding-top: 72px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1440px; margin: 0 auto; padding: 0 32px; height: 60px; display: flex; align-items: center; gap: 16px; }
.topnav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.topnav a {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
  color: var(--text-2); font-size: 14.5px; font-weight: 500; white-space: nowrap;
}
.topnav a:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.topnav a[aria-current="page"] { background: var(--fill); color: var(--text); font-weight: 600; }
.topnav .topnav-home { width: 36px; padding: 0; justify-content: center; color: var(--text); }
.topnav-home .icon { width: 20px; height: 20px; }
.topnav-home[aria-current="page"] .icon { color: var(--blue); }
/* Menüpunkt mit Symbol für schmale Leisten (Organigramm): am Computer nur der Text, unter 768 px nur das Symbol wie das Haus. */
.topnav-iconic .icon { display: none; width: 20px; height: 20px; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.theme-form { margin: 0; }
.round-btn {
  position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--fill); color: var(--text); display: inline-grid; place-items: center; list-style: none;
}
.round-btn:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.round-btn .icon, .round-btn svg { width: 18px; height: 18px; }
.round-btn[aria-current="page"] { color: var(--blue); }
.round-btn.bell { width: 36px; height: 36px; border-radius: 50%; color: var(--text); }
.round-btn.bell .icon { width: 19px; height: 19px; }
.round-btn.bell .bell-count { top: -3px; right: -6px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--on-navy);
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: .02em; cursor: pointer; list-style: none;
}
.avatar[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue); }
.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 240px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .14); padding: 6px;
}
.dd-panel.menu a, .dd-panel.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; border: 0;
  background: none; color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer;
}
.dd-panel.menu a:hover, .dd-panel.menu button:hover { background: var(--fill); text-decoration: none; }
.dd-panel.menu a[aria-current="page"] { background: var(--fill); font-weight: 600; }
.dd-panel.menu .icon { color: var(--text-2); }
.dd-panel form { margin: 0; }
.dd-head { display: grid; gap: 2px; padding: 9px 12px 10px; margin-bottom: 4px; font-weight: 600; border-bottom: 1px solid var(--line); }
.dd-sub { font-size: 13px; font-weight: 400; color: var(--text-2); }
.dd-panel hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.search-panel { width: min(440px, calc(100vw - 32px)); padding: 10px; }
.search-panel form { display: flex; gap: 8px; }
.search-panel input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: 10px;
  background: var(--card); color: var(--text); font: inherit; font-size: 15px;
}
.search-panel .btn { margin: 0; }
.bell-panel { width: min(380px, calc(100vw - 32px)); padding: 8px; }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.bell-head .link { font-size: 13px; }
.bell-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: min(60vh, 420px); overflow: auto; }
.bell-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 9px; color: var(--text); }
.bell-item:hover { background: var(--fill); text-decoration: none; }
.bell-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.bell-item.is-new .bell-dot, .news-item.is-new .bell-dot { background: var(--red); }
.bell-main { display: grid; gap: 2px; min-width: 0; }
.bell-main b { font-size: 14px; font-weight: 500; }
.bell-item.is-new .bell-main b { font-weight: 650; }
.bell-main span { font-size: 12.5px; color: var(--text-2); }
.bell-empty { margin: 8px; color: var(--text-2); }
.bell-all { display: block; margin-top: 4px; padding: 10px 8px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.news-title a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.news-title .bell-dot { margin-top: 0; }
.head-action { margin: 0; }
/* Handy (Entscheidung D des Inhabers): jede Tippfläche der Leiste 44 × 44px. Haus und Aufgaben sind selbst 44px hoch; Lupe,
   Glocke, Hell/Dunkel und Profil bleiben sichtbar 36px rund, eine unsichtbare Fläche (::after, 4px rundum) macht sie 44 × 44px.
   8px Abstand: Die Flächen stoßen aneinander, überlappen aber nicht. Einträge der Aufklapper ebenfalls 44px hoch. */
@media (max-width: 767px) {
  .topbar-inner { padding: 0 8px; gap: 4px; height: 56px; }
  .topnav { gap: 0; }
  .topnav a { height: 44px; padding: 0 10px; font-size: 14px; }
  .topnav .topnav-home { width: 44px; flex: none; }
  .topnav .topnav-iconic { width: 44px; padding: 0; justify-content: center; flex: none; color: var(--text); }
  .topnav-iconic .icon { display: block; }
  .topnav-iconic[aria-current="page"] .icon { color: var(--blue); }
  .topnav-iconic .topnav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .userbox { gap: 8px; }
  .round-btn, .round-btn.bell, .avatar { width: 36px; height: 36px; flex: none; }
  .avatar { position: relative; }
  .round-btn::after, .avatar::after { content: ""; position: absolute; inset: -4px; }
  .dd-panel, .search-panel, .bell-panel { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; min-width: 0; }
  .dd-panel.menu a, .dd-panel.menu button { min-height: 44px; }
  .bell-item { min-height: 44px; }
  .bell-head .link, .bell-all { display: flex; align-items: center; min-height: 44px; }
  .search-panel input, .search-panel .btn { height: 44px; min-height: 44px; font-size: 16px; }
}
/* Unter 360 px (die Leiste mit Organigramm braucht genau 360 px): Organigramm nicht in der Leiste, sondern über die Lupe
   (Befehlspalette, Bereich „Organigramm“) und G dann O. */
@media (max-width: 359px) { .topnav .topnav-iconic { display: none; } }

/* ---------- AI Copilot (04.11.2026; src/Views/copilot.php, src/Views/settings_copilot.php) ---------- */
.copilot-summary { font-size: 16px; line-height: 1.55; max-width: 80ch; }
.copilot-summary p { margin: 0 0 8px; }
.copilot-running { display: flex; align-items: center; gap: 10px; color: var(--text-2); margin: 4px 0 12px; }
.copilot-error { color: var(--red-text); margin: 4px 0 12px; }
.spinner { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: copilot-spin .9s linear infinite; }
@keyframes copilot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: var(--line); } }
.insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap); margin-top: 8px; }
.insight { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
.insight h3 { font-size: 16px; font-weight: 600; margin: 0; }
.insight p { margin: 0; }
.insight-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.insight-impact { font-weight: 600; font-variant-numeric: tabular-nums; }
.insight-evidence { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.insight-todo { background: var(--fill); border-radius: 10px; padding: 8px 10px; }
.insight-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-top: 4px; }
.insight-actions form { margin: 0; }
.insight-ask { width: 100%; }
.insight-ask > summary { list-style: none; display: inline-block; }
.insight-ask > summary::-webkit-details-marker { display: none; }
.insights-closed { margin-top: var(--gap); }
.insights-closed > summary { cursor: pointer; color: var(--text-2); font-weight: 500; }
.copilot-ask { max-width: 760px; margin-bottom: 8px; }
.copilot-questions > li { display: grid; gap: 6px; }
.copilot-q { margin: 0; }
.copilot-answer { max-width: 80ch; }
.copilot-answer p { margin: 0 0 8px; }
.copilot-answer table { margin: 6px 0 10px; }
.field-hint { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.check-inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.input-short { width: 140px; }
.flash-error { background: var(--red-soft); color: var(--red-text); }
.copilot-settings form { max-width: 520px; }

/* ---------- Website-Check wie der Shop-Check im Halfenstore-Dashboard (04.11.2026; src/Views/project_findings.php) ---------- */
.check-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--gap); margin-bottom: 22px; }
.check-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--gap); }
.check-summary .kpi-value { margin: 4px 0 2px; }
.kpi-value.kv-kritisch { color: var(--red-text); }
.kpi-value.kv-warnung { color: var(--orange-text); }
a.kpi-link { color: inherit; }
a.kpi-link:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--blue-soft); }
.sev-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; display: inline-block; }
.sev-dot.sev-kritisch { background: var(--red); }
.sev-dot.sev-warnung { background: var(--orange); }
.sev-dot.sev-hinweis { background: var(--text-3); }
.sev-dot.sev-ok { background: var(--green); }
.tag.sev-tag-kritisch { background: var(--red-soft); color: var(--red-text); }
.tag.sev-tag-warnung { background: var(--orange-soft); color: var(--orange-text); }
details.chk { padding: 0; }
details.chk > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-radius: var(--radius); }
details.chk > summary::-webkit-details-marker { display: none; }
details.chk > summary::after { content: "›"; color: var(--text-3); font-size: 20px; line-height: 1; transition: transform .2s ease; margin-left: 4px; }
details.chk[open] > summary::after { transform: rotate(90deg); }
details.chk > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.check-title { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.check-count { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 2ch; text-align: right; }
.chk-explain { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 24px; margin: 0 0 8px; }
.chk-explain p { margin: 0; max-width: 75ch; }
.chk-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.check-items { list-style: none; margin: 0; padding: 0 24px 16px; display: grid; grid-template-columns: minmax(0, 1fr); max-height: 420px; overflow-y: auto; }
.check-items li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.check-items li.check-more { justify-content: flex-start; font-size: 13px; }
.check-item-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-item-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.check-item-end > .muted { white-space: nowrap; font-size: 13px; overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }
.eye-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-3); padding: 4px; border-radius: 8px; cursor: pointer; font-size: 13px; flex-shrink: 0; }
.eye-btn:hover { color: var(--blue-text); background: var(--fill); }
.eye-btn.eye-all { white-space: nowrap; padding: 4px 8px; }
.ok-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 22px; font-size: 14px; }
.ok-list li { display: flex; align-items: center; gap: 10px; }
/* Ausgegraut über graue Schrift statt Deckkraft (Deckkraft drückte Text und Zahl unter 4,5:1). */
.hidden-checks > summary .check-title { color: var(--text-2); }
.hidden-checks .check-item-title a { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--text-3); }
.hidden-group { padding-top: 6px; }
.hidden-head { display: flex; align-items: center; gap: 10px; padding: 8px 24px 4px; font-size: 14px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Zuweisen: Person als Badge am Mangel (der Zusatz gegenüber dem Shop-Check) */
.who { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 2px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-text); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.who-av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .02em; flex: none; }
.assign-dd { position: relative; }
.assign-dd > summary { list-style: none; cursor: pointer; }
.assign-dd > summary::-webkit-details-marker { display: none; }
.assign-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); padding: 4px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.assign-btn:hover, .assign-dd[open] > .assign-btn { color: var(--blue-text); background: var(--fill); }
.assign-badge { display: inline-flex; border-radius: 999px; }
.assign-badge:hover .who { filter: brightness(.96); box-shadow: 0 0 0 1px var(--blue); }
.assign-dd > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.assign-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; width: max-content; max-width: 320px; padding: 6px; background: var(--card); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .16), 0 0 0 1px var(--line); display: grid; }
.assign-head { font-size: 11.5px; color: var(--text-2); padding: 4px 8px 6px; }
.assign-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 14px; }
.assign-menu button:hover, .assign-menu button:focus-visible { background: var(--fill); outline: none; }
/* Erreichbarkeit */
.kpi.upcard { display: flex; flex-direction: column; gap: 10px; }
.up-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.up-state { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; }
.up-state .muted { font-size: 15px; font-weight: 500; }
.upcard .dot, .up-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; flex: none; }
.up-ok .up-state .dot { box-shadow: 0 0 0 4px var(--green-soft); }
.up-bad .up-state .dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.up-bad .up-state { color: var(--red-text); }
.up-stats { display: flex; gap: 22px; margin: 0; }
.up-stats div { text-align: right; }
.up-stats dt { font-size: 11.5px; color: var(--text-2); }
.up-stats dd { margin: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.up-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 38px; align-items: end; }
.up-bars i { display: block; border-radius: 3px; background: var(--green); opacity: .85; height: 100%; }
.up-bars i.h3 { height: 30%; } .up-bars i.h4 { height: 40%; } .up-bars i.h5 { height: 50%; } .up-bars i.h6 { height: 60%; }
.up-bars i.h7 { height: 70%; } .up-bars i.h8 { height: 80%; } .up-bars i.h9 { height: 90%; }
.up-bars i:hover { opacity: 1; }
.up-bars i.warn { background: var(--orange); }
.up-bars i.bad { background: var(--red); height: 100%; }
.up-bars i.none { background: var(--fill); }
.up-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: -6px; }
.up-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.up-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.up-chip b { color: var(--text); font-weight: 600; }
.up-chip.bad .dot { background: var(--red); }
.up-chip.bad b { color: var(--red-text); }
.up-more summary { cursor: pointer; font-size: 13px; color: var(--blue-text); font-weight: 500; list-style: none; }
.up-more summary::-webkit-details-marker { display: none; }
.up-more summary::after { content: " ›"; }
.up-more[open] summary::after { content: " ⌄"; }
.up-more p { margin: 10px 0 0; }
.up-more .mini-list { list-style: none; margin: 8px 0 0; padding: 0; }
.up-more .mini-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.up-more .mini-list li:first-child { border-top: 0; }
.ml-main { font-weight: 500; }
.ml-meta { grid-column: 1; font-size: 12px; color: var(--text-2); }
.ml-val { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; font-weight: 600; white-space: nowrap; }
.err-text { color: var(--red-text); }
@media (max-width: 1000px) { .check-summary { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  details.chk > summary { padding: 16px 18px; flex-wrap: wrap; row-gap: 8px; }
  details.chk > summary .check-title { flex-basis: calc(100% - 24px); }
  details.chk > summary .check-count { margin-left: auto; }
  .chk-explain, .hidden-head { padding-left: 18px; padding-right: 18px; flex-wrap: wrap; }
  .check-items { padding-left: 18px; padding-right: 18px; }
  .check-items li { flex-direction: column; align-items: stretch; gap: 4px; }
  .check-item-end { justify-content: space-between; }
  .check-item-end > .muted { flex: 1 1 auto; max-width: none; }
  .up-stats { gap: 14px; }
  .up-bars { gap: 2px; }
}

/* ---------- Projekte als Kacheln (04.11.2026; src/Views/projects.php): drei nebeneinander, darunter die nächsten ---------- */
.ptiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.ptile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.ptile-link { display: flex; flex-direction: column; flex: 1; color: var(--text); }
.ptile-link:hover { text-decoration: none; }
.ptile-link:hover .ptile-name { color: var(--blue-text); }
.ptile-link:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: var(--radius); }
.ptile-shot { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--fill), color-mix(in srgb, var(--blue) 14%, var(--fill))); overflow: hidden; }
.ptile-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ptile-ph { display: grid; place-items: center; height: 100%; padding: 12px; font-size: 20px; font-weight: 600; color: var(--text-2); text-align: center; overflow-wrap: anywhere; }
.ptile-body { display: grid; gap: 8px; padding: 14px 16px 16px; }
.ptile-name { font-size: 17px; font-weight: 600; }
.ptile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.ptile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ptile-label { display: block; font-size: 12px; color: var(--text-2); }
/* Geplant: ausgegraut über Bild und graue Schrift; Deckkraft auf der ganzen Kachel drückte den Text unter 4,5:1. */
.ptile.is-planned { filter: grayscale(1); }
.ptile.is-planned .ptile-shot { opacity: .55; }
.ptile.is-planned .ptile-name { color: var(--text-2); }
/* Anheften (Domain\ProjectOrder, Entscheidung N): Stern als runder Knopf oben rechts auf dem Vorschaubild der Projekt-Kachel
   (today.php), eigenes Formular neben dem Link; keine Zwischenüberschriften. Beim Anpassen der Startseite ausgeblendet (dort liegt
   die Leiste mit Ausblenden). */
.ptile { position: relative; }
.ptile-pin { position: absolute; top: 10px; right: 10px; margin: 0; }
.ptile-pin .pin { width: 36px; height: 36px; margin: 0; border-radius: 50%; background: var(--card); color: var(--text-2); box-shadow: var(--shadow-sm); }
.ptile-pin .pin:hover { background: var(--card); color: var(--text); }
.ptile-pin .pin[aria-pressed="true"] { color: var(--blue-text); }
body.editing .ptile-pin { display: none; }
@media (max-width: 767px) { .ptile-pin .pin { width: 44px; height: 44px; } }
@media (max-width: 1100px) { .ptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ptiles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- AI Copilot wie im Halfenstore-Dashboard (04.11.2026; src/Views/copilot.php, app.js) ---------- */
.cop-alert { margin: 0 0 16px; }
.cop-inline { display: inline; margin: 0; }
.cop-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  padding: 26px 30px; margin-bottom: 22px; border-radius: var(--radius); box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--blue-soft), rgba(175, 82, 222, .1)), var(--card);
}
.cop-eyebrow { font-size: 14px; color: var(--text-2); }
.cop-hero-text p { font-size: 19px; line-height: 1.5; margin: 6px 0 0; letter-spacing: -.01em; }
.cop-hero-stats { display: flex; gap: 26px; }
.cop-hero-stats div { display: grid; gap: 2px; }
.cop-hero-stats strong { font-size: 24px; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cop-hero-stats span { font-size: 12px; color: var(--text-2); }
.cop-hero-stats .mr-first span { max-width: 20ch; }
.cop-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.cop-start { text-align: center; }
.cop-start p { margin: 6px 0 0; }
.cop-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cop-filter { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--fill); border-radius: 10px; padding: 3px; }
.cop-filter button { border: 0; background: none; color: var(--text); font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.cop-filter button:hover { background: var(--fill); }
.cop-filter button.active { background: var(--card); box-shadow: var(--shadow-sm); font-weight: 600; }
:root[data-theme="dark"] .cop-filter button.active { background: #3a3a3c; }
.cop-filter button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cop-n { color: var(--text-3); font-weight: 500; margin-left: 3px; }
.cop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.cop-card {
  min-width: 0; overflow-wrap: break-word; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--line);
}
.cop-card[hidden] { display: none; }
.cop-card[data-type="chance"] { border-top-color: var(--green); }
.cop-card[data-type="risk"] { border-top-color: var(--red); }
.cop-card[data-type="idea"] { border-top-color: var(--blue); }
.cop-card h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.cop-card > p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.cop-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cop-tag { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.cop-chance { color: var(--green-text); background: var(--green-soft); }
.cop-risk { color: var(--red-text); background: var(--red-soft); }
.cop-idea { color: var(--blue-text); background: var(--blue-soft); }
.cop-impact { font-size: 13px; font-weight: 600; text-align: right; min-width: 0; line-height: 1.35; padding-top: 2px; }
.cop-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cop-links span { font-size: 12px; background: var(--fill); border-radius: 999px; padding: 2px 9px; color: var(--text-2); }
.cop-links i { width: 12px; height: 1.5px; background: var(--line); }
.cop-why summary { font-size: 13px; color: var(--blue-text); cursor: pointer; }
.cop-why ul { margin: 8px 0 4px; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.cop-why p { margin: 0; }
.cop-do { font-size: 14px; background: var(--fill); border-radius: 12px; padding: 10px 13px; }
.cop-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.cop-acts form { margin: 0; }
.btn-sm { display: inline-block; padding: 6px 14px; border: 0; border-radius: 980px; background: var(--btn); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-sm:hover { filter: brightness(1.08); }
/* Chancen und Texte (Entscheidung B des Inhabers): verlinkt wie Hannes' Mitbewerber, zwei Abschnitte nebeneinander, mobil
   untereinander; die Links unten bündig. */
.cop-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.cop-tools > .panel { margin: 0; }
.cop-tools .panel p { margin: 0 0 10px; }
.cop-tools .panel .panel-head { margin-bottom: 10px; }
.cop-tools .panel .cop-go { display: flex; flex-wrap: wrap; gap: 0 20px; margin: auto 0 0; }
.cop-go a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--blue-text); }
@media (max-width: 767px) { .cop-tools { grid-template-columns: minmax(0, 1fr); } }
/* Hinweis unter den Werkzeug-Karten (08.11.2026): Markt-Radar, Keywords und Mitbewerber stehen im Reiter „Markt & Wettbewerb“. */
.cop-moved { margin: 0 0 var(--gap); font-size: 14px; color: var(--text-2); }
.cop-moved a { color: var(--blue-text); }
/* Unterseiten-Leiste des Reiters „Markt & Wettbewerb“ (src/Views/market_nav.php): Form wie die Leiste der Einstellungen (.tabs). */
.tabs.market-nav { display: flex; width: max-content; max-width: 100%; margin: -8px 0 20px; }
/* „Zu diesen Seiten unter Keywords“ unter den zwei Seiten von „Seiten vergleichen“ (competitors_pairs.php). */
.pair-keywords { margin-top: var(--gap); }
.pair-kw-list li { padding: 4px 0; }
.cop-lower { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; margin-bottom: var(--gap); }
.cop-lower .card h2 { margin: 0; }
.cop-input { display: flex; gap: 10px; align-items: center; }
.cop-input input[type="text"] { flex: 1; min-width: 0; }
.cop-input button[type="submit"] { margin-top: 0 !important; }
.cop-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cop-new { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--fill); }
.cop-q { margin: 0 0 8px; }
.cop-thinking { animation: cop-pulse 1.4s ease-in-out infinite; margin: 0; }
@keyframes cop-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .cop-thinking { animation: none; } }
.cop-answer { font-size: 14px; line-height: 1.55; }
.cop-answer p { margin: 0 0 8px; }
.cop-answer ul, .cop-answer ol { margin: 0 0 8px; padding-left: 20px; }
.cop-history { margin-top: 14px; }
.cop-history > summary { font-size: 13px; color: var(--text-2); cursor: pointer; }
.cop-history ul { list-style: none; padding: 0; margin: 8px 0 0; }
.cop-history > ul > li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cop-history > ul > li > details > summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.cop-history > ul > li > details > summary::-webkit-details-marker { display: none; }
.cop-history > ul > li .cop-answer { padding: 10px 0 2px; }
.cop-cost { font-size: 14px; }
.cop-cost strong { font-size: 26px; letter-spacing: -.02em; }
.cop-track { display: block; width: 100%; height: 6px; margin: 8px 0; appearance: none; border: 0; border-radius: 999px; background: var(--fill); overflow: hidden; }
.cop-track::-webkit-progress-bar { background: var(--fill); border-radius: 999px; }
.cop-track::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
.cop-track::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.cop-form { margin-top: 6px; border-top: 1px solid var(--line); }
.cop-field { margin: 18px 0 0; padding: 0; border: 0; display: grid; gap: 8px; min-width: 0; }
.cop-label { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; justify-content: space-between; padding: 0; }
.cop-label strong { color: var(--text); }
.cop-field p { margin: 0; }
.cop-seg { display: flex; background: var(--fill); border-radius: 10px; padding: 3px; }
.cop-seg label { flex: 1; text-align: center; margin: 0; cursor: pointer; }
.cop-seg label span { display: block; padding: 5px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.cop-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cop-seg input:checked + span { background: var(--card); box-shadow: var(--shadow-sm); font-weight: 600; }
:root[data-theme="dark"] .cop-seg input:checked + span { background: #3a3a3c; }
.cop-seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.cop-field input[type="range"] { padding: 0; border: 0; accent-color: var(--blue); background: none; box-shadow: none; width: 100%; }
.cop-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 0; margin-top: 14px; cursor: pointer; font-size: 14px; font-weight: 500; }
.cop-toggle span { display: grid; gap: 1px; }
.cop-toggle small { color: var(--text-3); font-size: 12px; font-weight: 400; }
.cop-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cop-toggle i { width: 42px; height: 25px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background-color .2s ease; }
.cop-toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.cop-toggle input:checked + i { background: var(--green); }
.cop-toggle input:checked + i::after { transform: translateX(17px); }
.cop-toggle input:focus-visible + i { box-shadow: 0 0 0 4px var(--blue-soft); }
.cop-keyrow { display: flex; gap: 10px; align-items: center; }
.cop-settings .cop-form button[type="submit"] { margin-top: 16px; }
/* ---------- Markt-Radar (06.11.2026): Karten wie der AI Copilot, Oberkante je Bereich; Text in Farbe nur über die *-text-Tokens ---------- */
.mr-card[data-area="thema"] { border-top-color: var(--blue); }
.mr-card[data-area="angebot"] { border-top-color: var(--green); }
.mr-card[data-area="lokal"] { border-top-color: var(--orange); }
.mr-card[data-area="mitbewerber"] { border-top-color: var(--red); }
.mr-card[data-area="nachfrage"] { border-top-color: var(--indigo); }
.mr-card[data-area="struktur"] { border-top-color: var(--teal); }
.mr-card[data-area="anfrageweg"] { border-top-color: var(--text-3); }
.mr-area { font-size: 12px; font-weight: 600; color: var(--text-2); padding-top: 3px; }
.mr-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.mr-prio-hoch { color: var(--red-text); background: var(--red-soft); }
.mr-prio-mittel { color: var(--orange-text); background: var(--orange-soft); }
.mr-prio-niedrig { color: var(--blue-text); background: var(--blue-soft); }
.mr-new, .mr-seen { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.mr-new { color: var(--green-text); background: var(--green-soft); }
.mr-seen { color: var(--tab-text-2); background: var(--fill); }
.mr-facts, .mr-rating { margin: 0; display: grid; gap: 2px; font-size: 14px; line-height: 1.5; }
.mr-facts dt, .mr-rating dt { font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 6px; }
.mr-facts dd, .mr-rating dd { margin: 0; overflow-wrap: anywhere; }
.mr-nodata { font-weight: 600; color: var(--orange-text); }
.mr-src { font-size: 13px; color: var(--text-2); }
.mr-src a, .mr-sources a, .mr-not a { color: var(--blue-text); overflow-wrap: anywhere; }
.mr-sources { margin: 4px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.mr-sources a { display: inline-block; min-height: 24px; }
.mr-block { margin: 0; max-width: 520px; }
.mr-form textarea { width: 100%; min-height: 160px; }
.mr-form button[type="submit"] { margin-top: 8px; }
.mr-suggest { background: var(--blue-soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; }
.mr-pre { white-space: normal; font-size: 14px; }
.mr-sent { margin-top: 10px; }
.mr-sent summary { cursor: pointer; color: var(--blue-text); min-height: 44px; display: flex; align-items: center; }
.mr-sent pre { max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; background: var(--fill); border-radius: 10px; padding: 12px; margin: 6px 0 0; }
.mr-not li { padding: 8px 0; }
.mr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mr-tools .cop-inline { margin: 0; }
.mr-print-hint { margin: -6px 0 16px; }
@media (max-width: 1000px) {
  .cop-hero { grid-template-columns: minmax(0, 1fr); }
  .cop-grid, .cop-lower { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cop-hero { padding: 20px; }
  .cop-hero-text p { font-size: 16px; }
  .cop-hero-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 12px; justify-content: space-between; }
  .cop-hero-stats strong { font-size: 18px; }
  .cop-hero-stats span { font-size: 11px; }
  .cop-card { padding: 16px; }
  .cop-input { flex-wrap: wrap; }
}

/* ---------- Benachrichtigungen im Konto (05.11.2026, Aufbau wie im Halfenstore-Dashboard) ---------- */
.notify form { display: grid; gap: 10px; }
.notify-master { display: flex; gap: 14px; align-items: flex-start; background: var(--fill); border-radius: 14px; padding: 16px 18px; cursor: pointer; }
.notify-master input, .notify-item input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.notify-master > span, .notify-item label > span { display: grid; gap: 2px; }
.notify-master .muted, .notify-item .muted { font-size: 14px; }
.notify-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.notify-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.notify-item label { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; margin: 0; }
.notify-limit { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 34px; color: var(--text-2); font-size: 14px; }
.notify-limit input { width: 80px; }
.notify-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.notify-actions .btn { margin-top: 0; }
@media (max-width: 767px) { .notify-grid { grid-template-columns: minmax(0, 1fr); } }
.notify-projects { border: 0; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notify-projects legend { font-weight: 500; padding: 0; margin-bottom: 8px; }
.notify-projects .muted { flex-basis: 100%; margin: 2px 0 0; }
.notify-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 10px; cursor: pointer; margin: 0; font-size: 14px; }
.notify-chip input { width: 18px; height: 18px; margin: 0; }
.notify-chip:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- Handy: Tippflächen mindestens 44 × 44 px (Sichtprüfung vor dem Live-Gang, 05.11.2026) ----------
   Ohne die Gestaltung zu ändern: Knöpfe, Sprungleisten, Umschalter, Felder und die Werkzeuge im Website-Check werden mindestens
   44 px hoch bzw. breit. Listenzeilen: Der Titel-Link deckt die ganze Zeile ab (wie bei Gewinner und Verlierer), Knöpfe und weitere
   Links der Zeile liegen darüber; ebenso die Zeilen im Website-Check. Der Erledigt-Kreis behält 22 px und bekommt eine unsichtbare Fläche (::before; ::after ist der Haken).
   Links in Tabellen und im Fließtext bleiben, wie sie sind. */
@media (max-width: 767px) {
  .btn, .btn-quiet, .btn-sm, .card button[type="submit"]:not(.link) { min-height: 44px; }
  a.btn, a.btn-quiet, a.btn-sm { display: inline-flex; align-items: center; }
  .jump a { display: inline-flex; align-items: center; min-height: 44px; }
  .seg-sm button { min-height: 44px; min-width: 44px; }
  .assign-btn, .eye-btn { min-height: 44px; min-width: 44px; justify-content: center; }
  .assign-menu button { min-height: 44px; }
  .eb { min-height: 44px; min-width: 44px; }
  .crumbs a { min-width: 44px; }
  .list > .list-row { position: relative; }
  .list > .list-row a.row-title::after { content: ""; position: absolute; inset: 0; }
  .list > .list-row :is(button, select, input, summary, a:not(.row-title)) { position: relative; z-index: 1; }
  .check::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
  .check-items li { position: relative; }
  .check-item-title { line-height: 44px; }   /* einzeilig (nowrap): die Pfad-Zeile ist 44 px hoch */
  .check-item-title a::after { content: ""; position: absolute; inset: 0; }
  .check-item-end { position: relative; z-index: 1; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 44px; }
}

/* ---------- Änderungs-Feed /aenderungen (Maßnahme 17, src/Views/changes.php) ----------
   Je Live-Gang ein Eintrag: Kopfzeile (Projekt, Etikett live bzw. Testversion, Zeit), Titel, Personen, aufklappbare Commits,
   Ergebnis der Prüfung (grün in Ordnung, rot Problem, sonst neutral), geprüfte Seiten mit Etikett und Sätzen. */
.feed-filter { align-items: center; }
.feed-filter label { font-weight: 500; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { padding: 18px 0; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; padding-top: 4px; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.feed-project { font-weight: 600; color: var(--text); }
.feed-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin: 6px 0 2px; overflow-wrap: anywhere; }
.feed-who, .feed-note { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.feed-note { color: var(--text); }
.feed-commits { margin: 8px 0 0; font-size: 14px; }
.feed-commits summary { cursor: pointer; color: var(--blue-text); width: fit-content; }
.feed-commits ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.feed-commit-t { overflow-wrap: anywhere; }
.feed-check { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); color: var(--text); }
.feed-check--ok { background: var(--green-soft); border-color: transparent; color: var(--green-text); }
.feed-check--bad { background: var(--red-soft); border-color: transparent; color: var(--red-text); }
.feed-robots { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.feed-pages { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.feed-pages li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.feed-pages .mono { overflow-wrap: anywhere; }
.feed-line { flex-basis: 100%; color: var(--text); padding-left: 2px; }
.feed-removed { margin: 8px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.feed-src { margin: 8px 0 0; font-size: 12.5px; color: var(--text-2); }
.feed-go { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 767px) {
  .feed-commits summary, .feed-go a, .feed-pages a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Alte Adressen (src/Views/old_urls.php, Relaunch-Schutz) ---------- */
/* Filter als Links wie der Zeitraum der Projektseite (.period-nav), aber umbrechend; daneben „Jetzt erneut prüfen“. Tabellen mit
   Pfad, Zahlen und Ergebnis; auf dem Handy je Adresse ein Block mit Beschriftung (data-label) statt seitlichem Bildlauf. */
.ghost-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.ghost-filter { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); max-width: 100%; }
.ghost-filter a { padding: 5px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--tab-text-2); white-space: nowrap; } /* --text-2 auf --fill nur 4,3:1 */
.ghost-filter a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.ghost-filter a[aria-current="true"] { color: var(--text); font-weight: 600; background: var(--card); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .ghost-filter a[aria-current="true"] { background: #3a3a3c; }
.ghost-n { font-variant-numeric: tabular-nums; }
.ghost-recheck { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.ghost-table .ghost-path .mono { overflow-wrap: break-word; }
.ghost-table wbr { display: none; }
.ghost-table td.ghost-result { min-width: 16rem; }
.ghost-table .ghost-result .tag { margin-right: 4px; }
@media (max-width: 767px) {
  .ghost-filter { display: flex; width: 100%; }
  .ghost-filter a { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; }
  .ghost-recheck .btn-quiet { min-height: 44px; padding: 10px 18px; font-size: 15px; }
  .ghost-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ghost-table, .ghost-table tbody { display: block; }
  .ghost-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ghost-table tbody tr:last-child { border-bottom: 0; }
  .ghost-table td, .ghost-table td + td, .ghost-table td.num { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  .ghost-table td.ghost-path, .ghost-table td.ghost-result { grid-column: 1 / -1; min-width: 0; }
  .ghost-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 500; color: var(--text-3); }
  .ghost-table tbody tr:hover td { background: none; }
  .ghost-table wbr { display: inline; }
  .ghost-table .ghost-path a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* Copilot-Seite: drei Werkzeug-Karten (Chancen, Texte, Alte Adressen) – breit nebeneinander, mittel die dritte über die ganze Breite. */
@media (min-width: 1100px) { .cop-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) and (max-width: 1099px) { .cop-tools > .panel:nth-child(3):last-child { grid-column: 1 / -1; } }
/* ---------- Einrichtung eines Projekts (Maßnahme 23; src/Views/project_setup.php, Kachel „Was fehlt noch?“ in project.php) ---------- */
.setup-tile { margin: 0 0 16px; }
.setup-tile .card-head { align-items: center; margin-bottom: 4px; }
.setup-tile .card-head a { font-size: 14px; color: var(--blue-text); white-space: nowrap; }
.setup-tile-h { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.setup-tile .slist li { padding: 8px 0; }
.setup-list li { align-items: flex-start; }
.setup-list .dot { margin-top: 6px; }
.setup-item { flex: 1 1 auto; min-width: 0; }
.setup-note, .setup-do { margin: 2px 0 0; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.setup-note.err-text { color: var(--red-text); }
.setup-do form { margin: 4px 0 0; }
.setup-do code { color: var(--tab-text-2); }
.setup-list .tag { flex: none; }
.setup-form { max-width: 620px; }
.setup-form fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.setup-form legend { font-size: 15px; font-weight: 600; padding: 0; margin: 0 0 2px; }
.setup-form input[aria-invalid="true"] { border-color: var(--red); }
.setup-values { display: grid; gap: 0; margin: 8px 0 0; }
.setup-values > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.setup-values > div:last-child { border-bottom: 0; }
.setup-values dt { color: var(--text-2); }
.setup-values dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .setup-tile .card-head a, .setup-tile .slist a, .setup-do a { display: inline-flex; align-items: center; min-height: 44px; }
  .setup-do .btn-quiet { min-height: 44px; padding: 10px 18px; font-size: 15px; }
  .setup-form input { font-size: 16px; }
}

/* ---------- Verzeichnisse und Partner-Links (src/Views/listings.php, Maßnahme 26) ---------- */
/* Tabelle wie bei „Alte Adressen“: auf dem Handy je Eintrag ein Block mit Beschriftung (data-label) statt seitlichem Bildlauf.
   Formular in zwei Spalten, auf dem Handy eine. Copilot-Seite: die vierte Werkzeug-Karte (Verzeichnisse) breit über die ganze Zeile. */
.lst-recheck { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.lst-table .lst-name .mono { overflow-wrap: anywhere; }
.lst-table td.lst-link { min-width: 12rem; }
.lst-table .cell-sub .tag { margin-top: 2px; }
.lst-line { display: block; white-space: nowrap; }
.lst-act a { display: inline-flex; align-items: center; min-height: 32px; color: var(--blue-text); }
.lst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; max-width: 760px; }
.lst-grid .lst-wide { grid-column: 1 / -1; }
.lst-grid select { width: 100%; }
.lst-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; }
.lst-buttons a { color: var(--blue-text); }
.lst-remove { margin-top: 18px; }
.lst-remove form { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
@media (min-width: 1100px) { .cop-tools > .panel:nth-child(4):last-child { grid-column: 1 / -1; } }
@media (max-width: 767px) {
  .lst-grid { grid-template-columns: minmax(0, 1fr); }
  .lst-recheck .btn-quiet { min-height: 44px; padding: 10px 18px; font-size: 15px; }
  .lst-act a, .lst-buttons a { min-height: 44px; }
  .lst-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lst-table, .lst-table tbody { display: block; }
  .lst-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .lst-table tbody tr:last-child { border-bottom: 0; }
  .lst-table td, .lst-table td + td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  .lst-table td.lst-name, .lst-table td.lst-link { grid-column: 1 / -1; min-width: 0; }
  .lst-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 500; color: var(--text-3); }
  .lst-table tbody tr:hover td { background: none; }
  .lst-table .lst-name a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Verlauf der Änderungen von Hand (src/Views/change_log.php; Einrichtung und Verzeichnisse) ---------- */
.log-list li { padding: 10px 0; }
.log-item { flex: 1 1 auto; min-width: 0; }
.log-head, .log-line { margin: 0; overflow-wrap: anywhere; }
.log-line { margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
/* Einstellungen → Google-Profil: lange Weiterleitungs-URI bricht auf dem Handy um statt seitlich zu schieben. */
.gbp-uri { overflow-wrap: anywhere; }
.gbp-table select { max-width: 100%; }
@media (max-width: 767px) {
  /* Je Projekt ein Block: Name, darunter Auswahl und Speichern – kein seitlicher Bildlauf. */
  .gbp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gbp-table, .gbp-table tbody, .gbp-table tr, .gbp-table th, .gbp-table td { display: block; width: 100%; min-width: 0; text-align: left; }
  .gbp-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .gbp-table th, .gbp-table td { padding: 0; border: 0; white-space: normal; }
  .gbp-table .inline-form { flex-wrap: wrap; }
  .gbp-table select { width: 100%; font-size: 16px; }
  .gbp-table button { min-height: 44px; }
}

/* Besondere Anfrageformulare unter „Anfragen“ (05.11.2026): kleines Badge mit Blatt-Symbol, „Steps“ bzw. „Linie“ */
.form-badge { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 7px 3px 5px; border-radius: 999px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.form-badge .icon { width: 12px; height: 12px; }

/* Aufgaben zweigeteilt (05.11.2026): links Meine Aufgaben, rechts Meine Liste (Domain\Todos) */
.tasks-split { align-items: stretch; }
.tasks-split > .panel { margin-bottom: 0; }
.tasks-split > .panel + .panel { margin-top: 0; } /* nebeneinander: gleiche Oberkante, gleiche Höhe */
.todo-pop-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.todo-pop button.todo-del { color: var(--red-text); }
.tasks-split .panel h2 { margin-bottom: 10px; }
.todo-add { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.todo-add input { flex: 1; min-width: 0; }
.todo-plus { flex: none; font-size: 22px; line-height: 1; background: var(--blue); color: #fff; }
.todo-plus:hover { background: color-mix(in srgb, var(--blue) 85%, #000); }
.todo-hint { margin: 4px 0 2px; }
.todo-row { position: relative; gap: 10px; }
.todo-row[draggable="true"] { cursor: grab; }
.todo-row.dragging { opacity: .45; }
.todo-grip { color: var(--text-3); font-size: 12px; letter-spacing: -2px; user-select: none; flex: none; }
.todo-row.prio-hoch::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--red); }
.prio-tag { flex: none; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.prio-tag-hoch { background: var(--red-soft); color: var(--red-text); }
.prio-tag-niedrig { background: var(--fill); color: var(--text-3); }
.todo-row.prio-niedrig .row-title { color: var(--text-2); }
.todo-menu { position: relative; flex: none; }
.todo-menu > summary { list-style: none; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); font-weight: 700; }
.todo-menu > summary::-webkit-details-marker { display: none; }
.todo-menu > summary:hover, .todo-menu[open] > summary { background: var(--fill); }
.todo-pop { position: absolute; right: 0; top: 32px; z-index: 30; min-width: 190px; max-height: 340px; overflow: auto; background: var(--card); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.todo-pop-h { margin: 6px 8px 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.todo-pop button, .todo-pop > a { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.todo-pop > a { text-decoration: none; }
.todo-pop button:hover, .todo-pop button:focus-visible, .todo-pop > a:hover, .todo-pop > a:focus-visible { background: var(--fill); }
/* Text bearbeiten (06.11.2026): Eingabefeld an Stelle des Texts; Zeilenumbrüche aus dem Feld bleiben sichtbar */
.todo-row .row-title--wrap { white-space: pre-line; }
.todo-edit { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.todo-edit textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.45; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); resize: vertical; }
.todo-edit-actions { display: flex; gap: 8px; align-items: center; }
.todo-pop button.is-on { font-weight: 600; color: var(--blue); }
.ok-checks .ok-list { padding: 0 24px 18px; }
.ok-checks > summary .muted { white-space: nowrap; }

/* Aufgaben mit Eingabezeile und Reitern (05.11.2026): Meine / Team / Ideen und Notizen */
.capture-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; margin: 10px 0 0; }
.cap-chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.cap-chip.is-task { background: var(--blue-soft); color: var(--blue-text); }
.cap-chip.is-idea { background: var(--fill); color: var(--text); }
.cap-chip.is-hoch { background: var(--red-soft); color: var(--red-text); }
.cap-chip.is-warn { background: var(--orange-soft); color: var(--orange-text); }
.capture-hint { margin: 8px 0 0; }
.capture-hint code, .tasks-empty code, .empty code { font-size: 12px; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
.tab-n { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.team-hint { margin: 0 0 10px; }
.team-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); align-items: start; }
.team-col { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 10px; min-width: 0; transition: box-shadow .15s ease; }
.team-col.is-own { outline: 2px solid var(--blue-soft); }
.team-col.is-drop { box-shadow: var(--shadow), 0 0 0 2px var(--blue); }
.team-h { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.team-cards { list-style: none; margin: 0; padding: 0; min-height: 24px; }
.team-card { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); position: relative; }
.team-card:first-child { border-top: 0; }
.team-card[draggable="true"] { cursor: grab; }
.team-card.dragging { opacity: .45; }
.team-card .row-title { font-size: 14px; }
.team-card.prio-hoch::before { left: -8px; }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); }
.idea-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 10px; display: flex; flex-direction: column; justify-content: space-between; min-height: 120px; }
.idea-card.is-private { background: color-mix(in srgb, var(--card) 92%, var(--fill)); }
.idea-text { margin: 0 0 12px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.idea-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.idea-tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.idea-tag.is-all { background: var(--blue-soft); color: var(--blue-text); }
.idea-by { margin-left: auto; font-size: 12px; }
@media (max-width: 700px) { .team-board, .idea-grid { grid-template-columns: minmax(0, 1fr); } }
/* Team-Karten: Titel und Menü oben, Priorität und Frist darunter (schmale Spalten) */
.team-card { flex-wrap: wrap; row-gap: 4px; }
.team-card .done-form { order: 0; }
.team-card .list-main { order: 1; flex: 1 1 calc(100% - 80px); min-width: 0; }
.team-card .todo-menu { order: 2; }
.team-card .prio-tag, .team-card .row-time { order: 3; }
.team-card .prio-tag { margin-left: 30px; }
.team-card .prio-tag + .row-time { margin-left: 0; }
.team-card > .row-time:not(.prio-tag + .row-time) { margin-left: 30px; }
/* Zeichen der Eingabezeile als leichte Badges (05.11.2026, Wunsch Hannes) */
.capture-hint { line-height: 2; }
.cap-key { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 0 7px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-text); white-space: nowrap; }
.cap-key--hoch { background: var(--red-soft); color: var(--red-text); }
.cap-key--idee { background: var(--fill); color: var(--text); }
/* Festhalten als „+“ oben rechts, klappt ein Feld auf (06.11.2026, Wunsch Hannes: Zeile nahm zu viel Platz) */
.capture-box { position: relative; flex: none; align-self: center; }
.capture-open { list-style: none; width: 44px; height: 44px; font-size: 26px; line-height: 1; background: var(--blue); color: #fff; transition: transform .15s ease; }
.capture-open::-webkit-details-marker { display: none; }
.capture-open:hover { background: color-mix(in srgb, var(--blue) 85%, #000); }
.capture-box[open] > .capture-open { transform: rotate(45deg); }
.capture-pop { position: absolute; right: 0; top: 54px; z-index: 40; width: min(760px, calc(100vw - 32px)); background: var(--card); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 18px 18px 12px; }
.capture-pop .todo-add { margin-bottom: 0; }

/* ---------- Werkzeug „Index & Sitemap“ (06.11.2026; src/Views/index_tool.php) – Optik wie der Website-Check ---------- */
.ix-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--gap); margin-bottom: 18px; }
.ix-kpis .kpi { min-height: 100%; }
.ix-kpis .kpi-value { font-size: 30px; margin: 4px 0 2px; }
.ix-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; }
.ix-filter label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.ix-filter input[type="search"] { width: min(320px, 100%); font-size: 14px; padding: 7px 10px; }
.ix-h3 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.ix-path .mono, .ix-query { overflow-wrap: anywhere; }
.ix-table wbr, .ix-path wbr { display: none; }
.ix-table .tag { margin: 1px 4px 1px 0; }
.ix-explain { padding-top: 2px; }
.ix-explain p + p { margin-top: 8px; }
.ix-steps { margin: 4px 0 0; padding-left: 20px; max-width: 75ch; }
.ix-steps li { margin: 2px 0; }
.ix-items { max-height: 640px; }
.ix-items li { align-items: flex-start; }
.ix-item-main { display: grid; gap: 2px; min-width: 0; }
.ix-item-main .check-item-title { white-space: normal; overflow-wrap: anywhere; }
.ix-item-meta { font-size: 12.5px; }
.ix-hints { margin: 4px 0 2px; padding-left: 18px; color: var(--text); max-width: 80ch; }
.ix-hints li { border: 0; padding: 1px 0; display: list-item; font-size: 13px; }
.ix-btn { padding: 5px 12px; font-size: 13px; white-space: nowrap; }
.ix-task { font-size: 13px; white-space: nowrap; }
.ix-metric { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ix-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 14px; }
.ix-kw > summary { flex-wrap: wrap; }
.ix-kw-sum { display: inline-flex; gap: 12px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ix-kw-body { padding: 0 24px 16px; }
.ix-kw-foot { margin: 10px 0 0; }
.ix-kw-table td.ix-query { min-width: 14rem; white-space: normal; }
.ix-up { color: var(--green-text); }
.ix-down { color: var(--red-text); }
.ix-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 8px 0 0; }
@media (max-width: 767px) {
  .ix-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ix-kpis .kpi { padding: 14px 16px; }
  .ix-kpis .kpi-value { font-size: 26px; }
  .ix-filter input[type="search"] { width: 100%; min-height: 44px; font-size: 16px; }
  .ix-filter .btn-quiet, .ix-btn, .ix-pager .btn-quiet { min-height: 44px; padding: 10px 16px; font-size: 15px; }
  .ix-task { display: inline-flex; align-items: center; min-height: 44px; }
  .ix-controls .ghost-filter { display: flex; width: 100%; }
  .ix-controls .ghost-filter a { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
  .ix-table wbr, .ix-path wbr { display: inline; }
  /* Tabellen als Blöcke je Zeile: kein seitlicher Bildlauf bei 390 px. */
  .ix-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ix-table, .ix-table tbody { display: block; }
  .ix-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ix-table tbody tr:last-child { border-bottom: 0; }
  .ix-table td, .ix-table td + td, .ix-table td.num { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  .ix-table td:first-child { grid-column: 1 / -1; }
  .ix-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--text-2); }
  .ix-kw-table td.ix-query { min-width: 0; font-weight: 600; }
  .ix-kw-body { padding: 0 18px 14px; }
  .ix-kw-sum { order: 3; flex-basis: 100%; }
}

/* ---------- Keyword-Radar (06.11.2026): Tabellen wie die Chancen, Vergleich Kriterien × Websites; Text in Farbe nur über die *-text-Tokens ---------- */
.kr-note { margin-top: 0; }
.kr-gsc { max-width: 90ch; margin: 0 0 var(--gap); font-size: 14px; }
.kr-prio { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.kr-prio-hoch { color: var(--red-text); background: var(--red-soft); }
.kr-prio-mittel { color: var(--orange-text); background: var(--orange-soft); }
.kr-table th[scope="row"] { color: var(--text-2); font-weight: 500; font-size: 13px; white-space: normal; min-width: 11rem; padding-top: 10px; position: static; background: none; }
.kr-compare td { white-space: normal; min-width: 9rem; }
.kr-compare .mono { overflow-wrap: anywhere; }
.kr-table .mono { overflow-wrap: break-word; }
.kr-table wbr { display: none; }
.kr-variants, .kr-target { color: var(--text-2); max-width: 90ch; margin: 10px 0 0; }
.kr-hints { margin: 0; padding-left: 18px; display: grid; gap: 6px; max-width: 90ch; }
.kr-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.kr-acts form { margin: 0; }
.kr-btn { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 13px; margin: 0; }
.kr-all { margin: 10px 0 0; }
.kr-form-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 var(--gap); }
.kr-form-grid .kr-span { grid-column: 1 / -1; }
.kr-form-grid select { width: 100%; }
.kr-form textarea { resize: vertical; min-height: 64px; }
.kr-suggest > summary { cursor: pointer; color: var(--blue-text); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.kr-empty .table-wrap { margin-bottom: 8px; }
@media (max-width: 767px) {
  .kr-form-grid { grid-template-columns: minmax(0, 1fr); }
  .kr-btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
  .kr-table .op-task { display: inline-flex; align-items: center; min-height: 44px; }
  .kr-table wbr { display: inline; }
  /* Tabellen als Blöcke je Zeile: kein seitlicher Bildlauf bei 390 px; im Vergleich je Kriterium ein Block mit den Websites. */
  .kr-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .kr-table, .kr-table tbody { display: block; }
  .kr-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .kr-table tbody tr:last-child { border-bottom: 0; }
  .kr-table td, .kr-table th[scope="row"], .kr-table td + td, .kr-table td.num { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  .kr-table td:first-child, .kr-table th[scope="row"] { grid-column: 1 / -1; }
  .kr-table th[scope="row"] { font-weight: 600; color: var(--text); font-size: 14px; }
  .kr-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--text-2); }
  .kr-acts { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- Markt-Radar: Druck (08.11.2026, Entscheidung des Inhabers: PDF über die Druckansicht des Browsers) ----------
   Nur auf der Markt-Radar-Seite (<div class="mr-page">, :has). Navigation, Formulare, Knöpfe, Filter, Ergänzung und „Was wird gesendet?“
   fallen weg; immer helle Farben (auch bei Dunkel), Karten untereinander ohne Schatten und nicht über einen Seitenumbruch geteilt.
   „Bewertung und Quellen“ ist aufgeklappt: per ::details-content (Chromium) und vorher per beforeprint in app.js (alle Browser). */
@media print {
  :root:has(.mr-page), :root[data-theme="dark"]:has(.mr-page) {
    color-scheme: light;
    --bg: #ffffff; --card: #ffffff; --text: #1d1d1f; --text-2: #4a4a4f; --text-3: #5f5f64; --tab-text-2: #4a4a4f;
    --line: rgba(0, 0, 0, .18); --fill: rgba(0, 0, 0, .05); --blue: #0071e3; --blue-text: #0058b0; --blue-soft: rgba(0, 113, 227, .10);
    --green: #28a745; --green-text: #1e7d34; --green-soft: rgba(52, 199, 89, .14); --orange: #f08c00; --orange-text: #8a5000;
    --orange-soft: rgba(255, 159, 10, .16); --red: #e5352b; --red-text: #b3261e; --red-soft: rgba(255, 59, 48, .12);
    --indigo: #5e5ce6; --teal: #30b0c7; --shadow: none; --shadow-sm: none;
  }
  :root:has(.mr-page) body { background: #ffffff; color: var(--text); }
  :root:has(.mr-page) .topbar, :root:has(.mr-page) .skip, :root:has(.mr-page) .tools-nav, :root:has(.mr-page) .proj-meta,
  .mr-page .market-nav, .mr-page .crumbs, .mr-page form, .mr-page button, .mr-page .btn, .mr-page .btn-quiet, .mr-page .cop-filter,
  .mr-page .mr-tools, .mr-page .mr-print-hint, .mr-page .cop-acts, .mr-page .cop-start, .mr-page #ergaenzung, .mr-page #gesendet,
  .mr-page .cop-go, .mr-page .spinner, .mr-page [data-mr-none][hidden], :root:has(.mr-page) dialog { display: none !important; }
  :root:has(.mr-page) .main { padding: 0; max-width: none; }
  :root:has(.mr-page) .proj-head { margin-bottom: 8px; }
  .mr-page .cop-grid, .mr-page .cop-lower { display: block; }
  .mr-page .cop-card, .mr-page .panel, .mr-page .card, .mr-page .cop-hero { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; margin: 0 0 12px; }
  .mr-page .cop-card { border-top-width: 3px; }
  .mr-page .table-wrap { overflow: visible; }
  .mr-page a { color: var(--text); text-decoration: underline; }
  .mr-page .cop-why > summary { list-style: none; font-weight: 600; color: var(--text); }
  .mr-page .cop-why > summary::-webkit-details-marker { display: none; }
  .mr-page details.cop-why::details-content { content-visibility: visible; display: block; }
}

/* ---------- Organigramm (Neubau 30.11.2026 nach dem freigegebenen Entwurf des Inhabers; src/Views/organigram.php, organigram_edit.php) ----------
   Startansicht wie der Entwurf: H1 40 px, Untertitel 17 px --text-2, Legende 13 px mit 9-px-Punkten, Bühne 48 px darunter. Baum als
   verschachtelte Listen, Linien 1,5 px in --org-line aus ::before/::after (28 px senkrecht, Ecken 10 px rund), Abstand 28 px zwischen
   Geschwistern. Gesellschaft: Karte 300 px in --org-company, Schrift --org-on-company (Rolle --org-on-company-2), mittig. Domain: weiße
   Karte 260 px, Radius 16, Schatten --org-node-shadow, Name 16/600 einzeilig mit Punkt, Rolle 13 px --text-2 höchstens zwei Zeilen;
   Hauptdomain mit Label 11 px Versalien --text-3 und 2-px-Umrandung innen (--org-main-ring, box-shadow, damit der Fokusring frei
   bleibt). Statuspunkte: live --green, im Aufbau --orange, geparkt --org-parked, Weiterleitung --blue, offen nur Ring. Pfad bis zur
   Muttergesellschaft (organigram.js): Karten mit Ring in --blue, die Linien dazwischen (p-down, .org-path-line) ebenfalls --blue.
   Unter 768 px dieselbe Liste eingerückt (je Ebene 30 px) mit Linien links, Karten über die ganze Breite, kein seitlicher Bildlauf.
   „Noch ohne Zuordnung“ 72 px unter dem Baum, mittig, Chips als Pillen. Seitenpanel: dialog rechts, 420 px, auf dem Handy ganz. */
.org-page { padding-bottom: 24px; }
.org-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.org-head h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.org-sub { color: var(--text-2); font-size: 17px; margin: 6px 0 0; }
.org-edit-btn { flex: none; margin-top: 6px; }
.org-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 13px; }
.org-legend li { display: inline-flex; align-items: center; gap: 7px; }
.org-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--org-parked); }
.org-dot--live { background: var(--green); }
.org-dot--im_aufbau { background: var(--orange); }
.org-dot--geparkt { background: var(--org-parked); }
.org-dot--weiterleitung { background: var(--blue); }
.org-dot--offen { background: transparent; box-shadow: inset 0 0 0 1.5px var(--org-parked); }
.org-empty h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.org-page .org-empty { margin-top: 32px; }
.org-none { margin: 40px 0 0; color: var(--text-2); }

/* Innenabstand der Bühne: Platz für Schatten und Fokusring (overflow schneidet sonst ab); 36 + 12 = 48 px wie im Entwurf. */
.org-stage { margin-top: 36px; padding: 12px 8px 28px; overflow-x: auto; overflow-y: hidden; }
.org-fit { width: max-content; margin: 0 auto; }
.org-tree { margin: 0; padding: 0; list-style: none; line-height: 1.4; }
.org-tree ul { margin: 0; padding: 0; list-style: none; }
.org-node {
  position: relative; display: block; box-sizing: border-box; width: min-content; min-width: 260px; max-width: 360px;
  padding: 14px 18px; border-radius: 16px; background: var(--card); color: var(--text); text-align: left; box-shadow: var(--org-node-shadow);
}
.org-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; white-space: nowrap; min-width: 0; }
.org-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Rolle und Label bestimmen die Breite nicht mit (width 0, min-width 100 %): Die Karte ist 260 px oder so breit wie der Domainname. */
.org-role {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  width: 0; min-width: 100%; margin-top: 4px; font-size: 13px; color: var(--text-2);
}
.org-badge { display: block; width: 0; min-width: 100%; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.org-node--main { box-shadow: inset 0 0 0 2px var(--org-main-ring), var(--org-node-shadow); }
.org-node--company { min-width: 300px; max-width: 400px; background: var(--org-company); color: var(--org-on-company); text-align: center; }
.org-node--company .org-name { justify-content: center; font-size: 17px; white-space: normal; text-wrap: balance; }
.org-node--company .org-role { color: var(--org-on-company-2); }
.org-logo-wrap { display: inline-flex; align-items: center; flex: none; padding: 3px 6px; border-radius: 6px; background: var(--org-logo-bg); }
.org-logo { display: block; width: auto; height: 20px; max-width: 96px; object-fit: contain; }
.org-node--domain .org-logo-wrap { margin-left: auto; }
.org-node--company .org-logo-wrap { margin: 0 auto 8px; }
.org-node[role="button"], .org-chip[role="button"] { cursor: pointer; }
.org-path-line { display: none; }
.org-node.is-path { box-shadow: 0 0 0 2px var(--blue), var(--org-node-shadow); }
.org-node--main.is-path { box-shadow: inset 0 0 0 2px var(--org-main-ring), 0 0 0 2px var(--blue), var(--org-node-shadow); }
.org-node.is-here, .org-node:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue), var(--org-node-shadow); }
.org-node--main.is-here, .org-node--main:focus-visible { box-shadow: inset 0 0 0 2px var(--org-main-ring), 0 0 0 2px var(--bg), 0 0 0 4px var(--blue), var(--org-node-shadow); }

@media (min-width: 768px) {
  .org-tree, .org-tree ul { display: flex; justify-content: center; }
  .org-tree { width: max-content; } /* eigene Breite, auch wenn organigram.js die Hülle beim Verkleinern schmaler macht */
  .org-tree ul { position: relative; padding-top: 28px; }
  .org-tree li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 28px 14px 0; }
  .org-tree li::before, .org-tree li::after { content: ""; position: absolute; top: 0; width: 50%; height: 28px; border-top: 1.5px solid var(--org-line); }
  .org-tree li::before { right: 50%; }
  .org-tree li::after { left: 50%; border-left: 1.5px solid var(--org-line); }
  .org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
  .org-tree li:only-child { padding-top: 0; }
  .org-tree li:first-child::before, .org-tree li:last-child::after { border: 0 none; }
  .org-tree li:last-child::before { border-right: 1.5px solid var(--org-line); border-radius: 0 10px 0 0; }
  .org-tree li:first-child::after { border-radius: 10px 0 0 0; }
  .org-tree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 28px; border-left: 1.5px solid var(--org-line); }
  .org-tree > li { padding-top: 0; }
  .org-tree > li::before, .org-tree > li::after { display: none; }
  /* Pfad (organigram.js): senkrecht unter der Eltern-Karte (p-down), dazu je Schritt eine Linie von der Mitte bis über die Karte. */
  .org-tree ul.p-down::before { border-left-color: var(--blue); }
  .org-path-line { position: absolute; top: 0; z-index: 1; display: block; box-sizing: border-box; height: 28px; border: 0 solid var(--blue); pointer-events: none; }
  .org-path-line--v { width: 0; border-left-width: 1.5px; }
  .org-path-line--l { border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 10px; }
  .org-path-line--r { border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 10px; }
  .org-fit.is-scaled { margin: 0; } /* Breite und Höhe setzt organigram.js; der verkleinerte Baum zählt mit seiner sichtbaren Größe */
  .org-fit.is-scaled .org-tree { transform-origin: top left; }
}

.org-pool { margin: 72px auto 0; max-width: 900px; text-align: center; color: var(--text-2); font-size: 14px; }
.org-stage + .org-pool { margin-top: 44px; } /* 28 px Innenabstand der Bühne + 44 = 72 px wie im Entwurf */
.org-pool-title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.org-pool-empty { margin: 6px 0 0; }
.org-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.org-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--card); color: var(--text); box-shadow: var(--org-chip-shadow); }
.org-chip:focus-visible, .org-chip.is-here { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue); }

/* Seitenpanel (dialog, organigram.js): rechts, ruhig, nur lesen. */
.org-panel {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(420px, 100vw); max-width: 100vw; height: 100%; max-height: 100%;
  padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--card); color: var(--text); box-shadow: var(--shadow-pop); overflow-y: auto;
}
.org-panel::backdrop { background: var(--org-backdrop); }
.org-panel-head { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 22px 22px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.org-panel-kicker { grid-column: 1; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.org-panel-kicker:empty { display: none; }
.org-panel-head h2 { grid-column: 1; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; overflow-wrap: anywhere; }
.org-panel-head h2:focus { outline: none; }
.org-panel-close {
  grid-column: 2; grid-row: 1 / span 2; align-self: start; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%; background: var(--fill); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.org-panel-close:hover { background: var(--line); }
.org-panel-body { padding: 16px 22px 32px; }
.org-panel-body .org-logo-wrap { margin: 0 0 12px; }
.org-panel-link { display: inline-block; margin: 0 0 14px; }
.org-facts { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; }
.org-facts dt { color: var(--text-2); }
.org-facts dd { margin: 0; overflow-wrap: anywhere; }
.org-facts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.org-ref { display: inline-flex; align-items: center; gap: 7px; }
.org-panel h3 { margin: 24px 0 8px; font-size: 15px; font-weight: 600; }
.org-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; }
.org-notes p { margin: 0; }
.org-note-meta { color: var(--text-2); font-size: 13px; }

/* Bearbeiten (organigram_edit.php) */
.org-edit-head .crumbs { margin-bottom: 4px; }
.org-count-line { margin: 0; color: var(--text-2); }
.org-flash { margin: 10px 0; scroll-margin-top: 120px; }
.org-add { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.org-add .card { margin-bottom: 0; scroll-margin-top: 120px; }
.org-form h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.org-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); }
.org-form-grid select { width: 100%; }
.org-form textarea { resize: vertical; min-height: 96px; font-family: var(--mono); font-size: 13px; }
.org-result { margin: 4px 0 6px; padding: 10px 0 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.org-result-title { margin: 6px 0 2px; font-weight: 600; }
.org-result-hosts { margin: 0; overflow-wrap: anywhere; }
.org-result-list { display: grid; gap: 2px; margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.org-seed { margin: 10px 0 6px; }
.org-seed p { margin: 0; max-width: 70ch; }
.org-hint { margin: 0 0 10px; }
.org-rows { list-style: none; margin: 0; padding: 0; }
.org-rows-head, .org-row-sum { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .7fr) minmax(0, 2fr) 5.5em; gap: 14px; align-items: center; }
.org-row-sum--company { grid-template-columns: minmax(0, 1.1fr) minmax(0, 3.8fr) 5.5em; }
.org-rows-head { padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--text-3); }
.org-rows > li + li .org-row, .org-rows-head + .org-rows .org-row { border-top: 1px solid var(--line); }
.org-rows > li:first-child .org-row { border-top: 0; }
.org-row-sum { min-height: 44px; padding: 10px 0; cursor: pointer; list-style: none; font-size: 14px; }
.org-row-sum::-webkit-details-marker { display: none; }
.org-row-sum:hover .org-c-act { text-decoration: underline; }
.org-c { min-width: 0; overflow-wrap: anywhere; }
.org-c-host { font-weight: 600; }
.org-c-status { display: inline-flex; align-items: center; gap: 7px; }
.org-c-role { color: var(--text-2); }
.org-c-sub { color: var(--text-2); }
.org-c-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.org-c-act { justify-self: end; color: var(--blue-text); font-size: 13.5px; }
.org-act-close, .org-row[open] .org-act-open { display: none; }
.org-row[open] .org-act-close { display: inline; }
.org-indent-1 { padding-left: 18px; } .org-indent-2 { padding-left: 36px; } .org-indent-3 { padding-left: 54px; } .org-indent-4 { padding-left: 72px; }
.org-indent-1::before, .org-indent-2::before, .org-indent-3::before, .org-indent-4::before { content: "↳ "; color: var(--text-3); font-weight: 400; margin-left: -18px; }
.org-row-body { display: grid; gap: 14px; padding: 2px 0 20px; }
.org-row-form { max-width: 760px; }
.org-row-form label:first-child { margin-top: 0; }
.org-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.org-inline label { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 500; color: var(--text-2); }
.org-inline input[type="text"] { flex: 1 1 240px; width: auto; min-width: 0; max-width: 480px; }
.org-inline input[type="file"] { flex: 1 1 240px; width: auto; min-width: 0; max-width: 420px; padding: 6px; font-size: 13px; }
.org-logo-box { display: grid; gap: 8px; max-width: 760px; padding-top: 12px; border-top: 1px solid var(--line); }
.org-logo-title, .org-logo-now { margin: 0; font-size: 14px; font-weight: 600; }
.org-logo-now .org-logo { height: 28px; max-width: 160px; }
.org-history { margin-top: 40px; }
.org-history > summary { width: fit-content; cursor: pointer; color: var(--blue-text); font-size: 14px; font-weight: 500; }
.org-history > .dash-sec { padding-top: 12px; }

@media (max-width: 767px) {
  .org-head { flex-wrap: wrap; }
  .org-sub { font-size: 16px; }
  .org-legend { gap: 6px 16px; }
  .org-stage { margin-top: 24px; padding: 4px 0 0; overflow: visible; }
  .org-fit { width: auto; }
  .org-tree li { display: block; padding: 0; position: relative; }
  .org-tree ul { margin-left: 14px; padding-left: 16px; }
  .org-tree ul > li { padding-top: 10px; }
  .org-tree ul > li::before { content: ""; position: absolute; left: -16px; top: 0; width: 12px; height: 34px; border-left: 1.5px solid var(--org-line); border-bottom: 1.5px solid var(--org-line); border-bottom-left-radius: 10px; }
  .org-tree ul > li::after { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 1.5px solid var(--org-line); }
  .org-tree ul > li:last-child::after { display: none; }
  .org-node, .org-node--company { width: auto; min-width: 0; max-width: none; text-align: left; }
  .org-node--company .org-name { justify-content: flex-start; }
  .org-node--company .org-logo-wrap { margin: 0 0 8px; }
  .org-name { white-space: normal; align-items: flex-start; }
  .org-name > .org-dot { margin-top: 6.5px; } /* Punkt an der ersten Zeile, wenn der Domainname umbricht */
  .org-host { overflow: visible; overflow-wrap: anywhere; }
  .org-pool, .org-stage + .org-pool { margin-top: 48px; }
  .org-chip { min-height: 44px; }
  .org-panel-close { width: 44px; height: 44px; }
  .org-facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .org-facts dd + dt { margin-top: 10px; }
  .org-add, .org-form-grid { grid-template-columns: minmax(0, 1fr); }
  .org-rows-head { display: none; }
  .org-row-sum, .org-row-sum--company { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .org-c-host { grid-column: 1; }
  .org-c-act { grid-column: 2; grid-row: 1; align-self: center; min-height: 44px; display: inline-flex; align-items: center; }
  .org-c-to, .org-c-status, .org-c-role { grid-column: 1 / -1; font-size: 13.5px; }
  .org-c-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; color: var(--text-3); }
  .org-row-form input, .org-row-form select, .org-form input, .org-form select, .org-form textarea, .org-inline input { min-height: 44px; font-size: 16px; }
  .org-inline .btn-quiet { padding: 0 16px; font-size: 14px; }
  .org-history > summary { display: flex; align-items: center; min-height: 44px; }
}
