/* Umbau Shell nach Mockup 24 (freigegeben 11.11.): schmales Kopfband in Tiefsee-Blau mit Wellenkante, helle und klare Seitenleiste, verweigerte Einträge mit dem Wort „Kein Zugriff“,
   Begleiter nur klein in der Kontext-Hilfe, Fokusrahmen 3 px. Lädt nach app.css, nav.css und ruhe.css und überschreibt nur Farben, Maße und Flächen der Shell; Aufbau (rail, topbar,
   nav-toggle, Bogen von unten bis 960 px), Routen, Selektoren und Texte bleiben. Kein Dunkelmodus (Task #122 später). Gemeinsam für Governance, SOC und Architect (Variante ohne Suche). */
:root { --sh-a: #0b0f33; --sh-b: #121c78; --sh-focus: #cfd5ff; --sh-cur: #e3e7fd; --sh-demo: #f1d28a; --sh-band: 56px; --sh-welle: 14px; }
/* Wellenkante: Fläche in der Grundfarbe der Seite (--ground #eaecf6), die unten in das Band hineinragt; eine Fläche über volle Fensterbreite, damit Leiste und Kopfzeile eine Kante teilen */
.sh-welle { --sh-welle-bild: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 16' preserveAspectRatio='none'%3E%3Cpath fill='%23eaecf6' fill-opacity='.45' d='M0 8C200 0 400 0 640 8S1080 16 1280 6 1400 4 1440 8V16H0Z'/%3E%3Cpath fill='%23eaecf6' d='M0 11C220 3 420 3 660 11S1100 16 1300 9 1400 7 1440 11V16H0Z'/%3E%3C/svg%3E"); }

/* ---------- Kopfband (ab 961 px): Leistenkopf und Kopfzeile bilden eine Zeile von 56 px, darunter die Wellenkante ---------- */
@media (min-width: 961px) {
  .app { background-image: none; background-color: var(--ground); }
  /* Scroll-Hinweis (nav.css, Runde 2 N-01, R1): liegt auf der Navigation (#rail-nav), nur in den Farben der hellen Leiste; kein Kurzschreib-background, sonst gingen Position und Anheftung verloren */
  .rail { background-color: var(--surface); color: var(--ink); padding: 0 0 16px; scrollbar-color: #b3b8d6 var(--surface); }
  .rail nav { background-image: linear-gradient(var(--surface) 30%, rgba(255, 255, 255, 0)), linear-gradient(rgba(255, 255, 255, 0), var(--surface) 70%), radial-gradient(farthest-side at 50% 0, rgba(16, 19, 52, 0.16), rgba(16, 19, 52, 0)), radial-gradient(farthest-side at 50% 100%, rgba(16, 19, 52, 0.16), rgba(16, 19, 52, 0)); }
  .rail-top { position: relative; display: flex; align-items: center; height: calc(var(--sh-band) + var(--sh-welle)); padding: 0 0 var(--sh-welle) 20px; margin: 0 0 6px; color: #fff; background: linear-gradient(180deg, var(--sh-a) 0%, var(--sh-b) 100%); }
  .rail-top::after, .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--sh-welle); background-image: var(--sh-welle-bild, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 16' preserveAspectRatio='none'%3E%3Cpath fill='%23eaecf6' fill-opacity='.45' d='M0 8C200 0 400 0 640 8S1080 16 1280 6 1400 4 1440 8V16H0Z'/%3E%3Cpath fill='%23eaecf6' d='M0 11C220 3 420 3 660 11S1100 16 1300 9 1400 7 1440 11V16H0Z'/%3E%3C/svg%3E")); background-size: 100vw var(--sh-welle); background-repeat: no-repeat; pointer-events: none; }
  .rail-top::after { background-position: 0 0; }
  .topbar::after { background-position: calc(-1 * var(--rail-w, 248px)) 0; }
  .rail-brand { display: flex; align-items: center; min-height: 44px; padding: 0; }
  .rail-brand img { width: 104px; }
  .rail-brand-portal { display: none; }
  .rail-brand:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 4px; border-radius: 6px; }
  /* Kopfzeile als Teil des Bands */
  .topbar { position: sticky; top: 0; z-index: 10; min-height: calc(var(--sh-band) + var(--sh-welle)); padding: 0 20px var(--sh-welle) 0; gap: 10px 14px; color: #fff; background: linear-gradient(180deg, var(--sh-a) 0%, var(--sh-b) 100%); border-bottom: 0; }
  .topbar-portal { flex: none; padding: 0 14px 0 0; margin-right: 2px; font: 700 14px/1.3 var(--sans); white-space: nowrap; }
  .topbar-id { flex: 0 1 300px; min-width: 0; padding-right: 10px; margin-right: auto; }
  .topbar-id-row { min-width: 0; }
  .topbar-tenant { overflow: hidden; text-overflow: ellipsis; color: #fff; font: 700 14px/1.3 var(--sans); }
  .topbar .plan-tag, .topbar a.plan-tag { margin-left: 8px; padding: 1px 8px; border: 1px solid #b9a3ea; border-radius: 6px; background: #efe8fb; color: #3b1380; font: 700 11.5px/1.4 var(--sans); }
  .topbar .plan-tag.plan-free { background: #e8eaf4; color: #2a2f68; border-color: #aab0d8; }
  .topbar a.plan-tag:hover { background: #fff; }
  .topbar a.plan-tag { position: relative; }
  .topbar a.plan-tag::after { content: ""; position: absolute; inset: -12px -4px; } /* Trefffläche 44 px ohne größere Marke */
  .topbar .demo-note { color: var(--sh-demo); font: 600 11.5px/1.3 var(--sans); }
  .topsearch { flex: 1 1 220px; max-width: 340px; }
  .topsearch input[type="search"] { min-height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); color: #fff; }
  .topsearch input[type="search"]::placeholder { color: #dfe3f8; }
  .topsearch input[type="search"]:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 2px; box-shadow: inset 0 0 0 1px #fff; }
  .topsearch-key { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.2); color: #fff; }
  .topsearch-go { color: #fff; }
  .topsearch-go:hover { background: rgba(255, 255, 255, 0.16); }
  .topbar-right { gap: 2px; color: #fff; }
  .topbar-help a, .topbar .topbar-role { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 10px; color: #fff; font-weight: 600; font-size: 13.5px; }
  .topbar-help a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
  .topbar .kh-knopf > span { border-color: #fff; color: #fff; background: transparent; }
  .topbar .kh-knopf:hover > span, .topbar .kh[open] > .kh-knopf > span { background: #fff; border-color: #fff; color: var(--sh-a); }
  .topbar .ansicht-menu > summary { min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 10px; background: transparent; color: #fff; }
  .topbar .ansicht-menu > summary:hover { background: rgba(255, 255, 255, 0.16); }
  .topbar .ansicht-menu > summary strong, .topbar .ansicht-label { color: #fff; }
  .topbar .ansicht-symbol, .topbar .ansicht-pfeil { color: #fff; stroke: currentColor; }
  .topbar .inline-form .btn { min-height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 10px; background: transparent; color: #fff; font-weight: 600; }
  .topbar .inline-form .btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
  .topbar :focus-visible, .topbar a:focus-visible, .topbar button:focus-visible, .topbar summary:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 2px; border-radius: 8px; }
  /* Leiste: hell, Gruppen als ruhige Überschriften, aktive Seite als helle Fläche mit Punkt */
  .rail-group h2, .rail-fold > summary { color: var(--muted); font: 700 13px/1.4 var(--sans); text-transform: none; letter-spacing: 0; }
  .rail-fold > summary { min-height: 32px; } /* Nacharbeit Welle 2: 32 statt 36 px, damit die Leiste je Rolle ohne Cookie in 760 px bleibt (bb10-shell Spur K) */
  .rail-fold > summary:hover { color: var(--ink); background: var(--hairline); }
  .rail-fold > summary::after { border-color: var(--muted); }
  .rail a.nav-item { color: var(--ink); font-weight: 450; }
  .rail a.nav-item:hover { background: var(--hairline); color: var(--ink); }
  .rail a.nav-item[aria-current="page"] { background: var(--sh-cur); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
  .rail a.nav-item.is-locked, .rail a.nav-item.is-locked[aria-current="page"] { color: var(--muted); }
  .rail .lock { color: var(--violet); }
  .rail-fold[data-rail-fold="bereiche"] a.nav-item:not([aria-current="page"]) { color: var(--muted); }
  .rail-fold.rail-sub > summary { color: var(--ink); }
  .rail-fold.rail-sub { border-left: 1px solid var(--hairline); margin-left: 16px; }
  .rail :focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 6px; }
  .rail-top :focus-visible { outline-color: var(--sh-focus); outline-offset: 2px; }
  .nav-toggle, .nav-toggle-link { display: none; }
}
@media (min-width: 961px) and (max-width: 1180px) { .topsearch { flex-basis: 160px; } }
/* Q97: Zwischen 961 und 1359 px reicht die Kopfzeile für Portalname, Mandantenfeld, Suche und die rechte Gruppe nicht. Der Portalname steht erst ab 1360 px (der Name steht auch in der Seitenleiste und im Seitentitel);
   das Mandantenfeld (Name, Etikett, Demo-Hinweis) behält seine Breite, der Name kürzt mit Ellipse, das Etikett bleibt; die Suche darf bis 110 px schrumpfen (ohne Tastenhinweis), statt das Feld zu überlagern. */
@media (min-width: 961px) and (max-width: 1439px) {
  .topbar-id { min-width: 150px; align-items: stretch; }
  .topbar-id .plan-tag { flex: none; }
  .topbar-id .demo-note { overflow: hidden; text-overflow: ellipsis; }
  .topbar:has(.ansicht) .topsearch { min-width: 110px; }
  .topsearch input[type="search"] { padding-right: 40px; }
  .topsearch-key { display: none; }
}
@media (min-width: 961px) and (max-width: 1359px) { .topbar-portal { display: none; } }
/* Q97: Bis 1079 px steht die Ansicht nur als Symbol im Knopf (Name und Pfeil bleiben für Screenreader im Knopf), sonst wird die rechte Gruppe breiter als die Zeile (seitlicher Überlauf). */
@media (min-width: 961px) and (max-width: 1079px) {
  .topbar .ansicht-menu > summary { width: 44px; padding-left: 0; padding-right: 0; justify-content: center; }
  .topbar .ansicht-menu > summary strong, .topbar .ansicht-menu > summary .ansicht-pfeil { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Bis 960 px: dunkles Kopfband bleibt (Menü-Knopf, Suche und Ansicht im Band), dazu Verlauf, Wellenkante und Fokusrahmen 3 px ---------- */
@media (max-width: 960px) {
  .rail-top { background: linear-gradient(180deg, var(--sh-a) 0%, var(--sh-b) 100%); }
  .rail-top::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: var(--sh-b) var(--sh-welle-bild, none) 0 0 / 100% 12px no-repeat; pointer-events: none; z-index: 41; }
  .rail:not(.rail-open) .rail-top::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 16' preserveAspectRatio='none'%3E%3Cpath fill='%23eaecf6' fill-opacity='.45' d='M0 8C200 0 400 0 640 8S1080 16 1280 6 1400 4 1440 8V16H0Z'/%3E%3Cpath fill='%23eaecf6' d='M0 11C220 3 420 3 660 11S1100 16 1300 9 1400 7 1440 11V16H0Z'/%3E%3C/svg%3E"); }
  .rail.rail-open .rail-top::after { display: none; }
  .topbar { padding-top: 14px; }
  .topbar-portal { display: none; }
  .rail-top :focus-visible, .nav-toggle:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 2px; }
  .rail nav :focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
}

/* ---------- Verweigerte Einträge: ausgegraut, ohne Link, mit dem Wort „Kein Zugriff“ (nie nur Farbe) ---------- */
.nav-denied { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 8px; padding: 2px 16px; min-height: 26px; border-radius: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; cursor: not-allowed; }
.nav-denied > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.nav-denied-wort { flex: none; padding: 0 6px; border: 1px dashed currentColor; border-radius: 6px; font: 700 10.5px/1.6 var(--sans); white-space: nowrap; }
/* Nacharbeit Welle 2: ab zwei verweigerten Seiten je Gruppe eine zugeklappte Zeile (Wort zuerst, dann die Zahl); die Einträge darin wie oben, etwas eingerückt */
.nav-denied-fold { margin: 0; }
.nav-denied-fold > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; margin: 0 8px; padding: 2px 16px; min-height: 26px; border-radius: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.nav-denied-fold > summary::-webkit-details-marker { display: none; }
.nav-denied-fold > summary::after { content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; margin-right: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 120ms var(--ease-out); }
.nav-denied-fold[open] > summary::after { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) { .nav-denied-fold > summary:hover { color: var(--ink); background: var(--hairline); } }
.nav-denied-fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.nav-denied-fold > .rail-list .nav-denied { padding-left: 24px; }
@media (max-width: 960px) {
  .nav-denied, .nav-denied-fold > summary { min-height: 44px; margin: 1px 8px; color: var(--shell-muted); font-size: 14px; }
  .nav-denied-fold > summary:focus-visible { outline: 3px solid #fff; }
  .nav-denied-fold > summary:active { background: rgba(255, 255, 255, 0.07); }
}
@media (prefers-reduced-motion: reduce) { .nav-denied-fold > summary::after { transition: none; } }

/* ---------- Kontext-Hilfe: der Begleiter nur klein als Tipp am Ende ---------- */
.kh-begleiter { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--ground); color: var(--ink); }
.kh-begleiter-figur { flex: none; width: 44px; line-height: 0; }
.kh-begleiter-figur svg { width: 100%; height: auto; }
.kh-begleiter p { margin: 0; font-size: 13px; line-height: 1.45; }
.kh-begleiter b { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- Fokus und Zielgrößen in der Anwendung: 3 px, sichtbar auf Hell und Dunkel ---------- */
.skip-link:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.site-foot.is-compact a:focus-visible { outline-width: 3px; }

/* ---------- Netz weg (Mockup 25, neu, nur im Browser): Hinweisleiste, die netz.js bei fehlender Verbindung zeigt ---------- */
.netz-weg { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 auto; max-width: 720px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 30px rgba(16, 19, 52, 0.22); }
.netz-weg[hidden] { display: none; }
.netz-weg-text { flex: 1 1 260px; min-width: 0; margin: 0; }
.netz-weg-text strong { display: block; }
.netz-weg .btn { min-height: 44px; }
@media (prefers-reduced-motion: no-preference) { .netz-weg { animation: netz-auf 200ms var(--ease-out) both; } }
@keyframes netz-auf { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Einheitlicher Fuss (Nacharbeit Welle 2b): Marke, Sicherheitszusage, Hauptweg; Akzentlinie oben; nur bestehende Farben ---------- */
.site-foot:not(.is-compact) { position: relative; }
.site-foot:not(.is-compact)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #0e24ea, #6a8cff 55%, #a4a9d1); }
.site-foot .sf-logo { display: inline-block; padding: 0; min-height: 44px; }
.site-foot .sf-logo:hover { text-decoration: none; }
.site-foot .sf-zusage { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.site-foot .sf-zusage li { padding: 4px 12px; border: 1px solid rgba(164, 169, 209, 0.45); border-radius: 999px; color: var(--shell-text); font-size: 13px; line-height: 1.4; }
.site-foot a.sf-cta { margin-top: 20px; padding: 0 24px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; text-decoration: none; transition: background-color 120ms ease-out, transform 120ms ease-out; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .site-foot a.sf-cta:hover { background: #e3e7fd; color: var(--navy); text-decoration: none; } }
.site-foot a.sf-cta:active { transform: scale(0.97); }
.site-foot a.sf-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .site-foot a.sf-cta { transition: none; } .site-foot a.sf-cta:active { transform: none; } }
/* Nacharbeit Welle 4: Brotkrumen auf den Lage-Seiten (Vorstand) 5 bis 7 px niedriger, damit der Lage-Kopf bei 1280 x 800 im ersten Bildschirm endet (bb10-3-lage); Lage-Kopf selbst unverändert. */
@media (min-width: 961px) { .main:has(.le-page) .crumbs { padding-top: 2px; line-height: 1.3; } }
