:root {
  --teal: #2a9d8f;
  --teal-deep: #1d7a6f;
  --teal-soft: #d8f0ec;
  --ink: #1a1f1e;
  --ink-muted: #5c6b68;
  --paper: #f4f7f6;
  --paper-2: #eef3f1;
  --line: #c5d4d0;
  --probe: #b45309;
  --probe-bg: #fff4e5;
  --aktiv: #1d7a6f;
  --aktiv-bg: #e3f5f1;
  --mensch: #1a1f1e;
  --ki: #2a9d8f;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --radius: 4px;
  --max: 1120px;
  --org-max: 1240px;
  --ink-deep: #0e1614;
  --glow: rgba(42, 157, 143, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(42, 157, 143, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(29, 122, 111, 0.12), transparent 50%),
    linear-gradient(180deg, #f7faf9 0%, var(--paper) 40%, #e8f2ef 100%);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  cursor: pointer;
}

/* Shell */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.45rem 0.7rem;
  }
  .nav a.is-active {
    border-left: none;
    border-bottom-color: var(--teal);
  }
}

.sidebar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--line);
  padding: 1.5rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand-link {
  display: block;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  width: min(100%, 168px);
  height: auto;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-mark span {
  color: var(--teal-deep);
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  font-size: 0.95rem;
}

.nav a:hover {
  background: var(--teal-soft);
}

.nav a.is-active {
  background: var(--teal-soft);
  border-left-color: var(--teal);
  font-weight: 650;
}

.sidebar-meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.45;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.main {
  padding: 1.75rem 1.75rem 3rem;
}

.main-inner {
  max-width: var(--max);
  margin: 0 auto;
}

/* Hero */
.hero {
  margin-bottom: 2rem;
}

.hero-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
  font-weight: 650;
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 0.65rem;
}

.hero-brand {
  margin: 0 0 0.85rem;
}

.hero-logo {
  width: min(100%, 300px);
  height: auto;
}

.hero p {
  margin: 0;
  max-width: 38rem;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.stat span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Sections */
.section {
  margin-bottom: 2.25rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-head .hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Org chart — hierarchical tree + KI pipeline */
#view-organigramm .section {
  max-width: var(--org-max);
}

.org {
  position: relative;
}

.org-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.5rem 0 0.25rem;
}

.org-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: org-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--tier, 0) * 80ms);
}

.org-tier-apex {
  --tier: 0;
}

.org-tier-board {
  --tier: 1;
}

.org-tier-ops {
  --tier: 2;
}

.org-tier-label {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  font-weight: 700;
}

.org-stem {
  width: 2px;
  height: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.org-stem > span {
  display: block;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal), var(--teal-deep));
  border-radius: 2px;
  transform-origin: top;
  animation: org-stem 0.55s ease both;
}

.org-stem-ki {
  height: 36px;
  margin-top: 0.35rem;
}

.org-branches {
  position: relative;
  width: min(100%, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-tier-apex .org-branches {
  width: min(100%, 920px);
}

.org-rail {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal) 12%, var(--teal) 88%, transparent);
  opacity: 0.7;
}

.org-rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 2px;
  height: 14px;
  background: var(--teal);
  transform: translateX(-50%);
}

.org-branch-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.25rem;
  padding-top: 1.1rem;
  width: 100%;
}

.org-tier-apex .org-branch-row {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.org-tier-apex .org-node {
  flex: 0 0 auto;
  min-width: 200px;
  max-width: 240px;
}

.org-branch-ops {
  width: min(100%, 860px);
}

.org-branch-ki {
  width: min(100%, 980px);
}

/* Abteilungen */
.org-tier-depts {
  width: 100%;
  align-items: stretch;
}

.org-tier-depts > .org-tier-label {
  text-align: center;
  width: 100%;
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 0.35rem;
}

@media (max-width: 900px) {
  .dept-grid {
    grid-template-columns: 1fr;
  }
}

.dept-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 32px -24px rgba(14, 22, 20, 0.35);
  animation: org-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.2s + var(--i, 0) * 0.07s);
}

.dept-head {
  text-align: center;
  margin-bottom: 0.75rem;
  width: 100%;
}

.dept-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.dept-lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.dept-lead-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.dept-lead .org-node {
  border: 2.5px solid var(--teal-deep);
  min-width: min(100%, 240px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(42, 157, 143, 0.12),
    0 12px 28px -16px rgba(29, 122, 111, 0.4);
}

.dept-lead .org-node:hover {
  border-color: #15665c;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(42, 157, 143, 0.2),
    0 16px 36px -14px rgba(29, 122, 111, 0.5);
}

.dept-stem {
  width: 2px;
  height: 22px;
  margin: 0.35rem 0;
}

.dept-stem span {
  display: block;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal), var(--teal-deep));
  border-radius: 2px;
}

.dept-members {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  align-items: stretch;
}

.dept-members .org-node {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  min-height: 118px;
  box-sizing: border-box;
}

.dept-members .org-node.is-ki {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
}

.org-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.org-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.4rem;
  border-radius: 2px;
  border: 1px solid currentColor;
}

.org-tag-probe {
  color: var(--probe);
  background: var(--probe-bg);
}

.org-tag-aktiv {
  color: var(--aktiv);
  background: var(--aktiv-bg);
}

.org-tag-warn {
  color: #9a3412;
  background: #ffedd5;
}

.org-tag-out {
  color: #7f1d1d;
  background: #fee2e2;
}

.org-tag-ausfall {
  color: #334155;
  background: #e2e8f0;
}

.org-since {
  font-size: 0.68rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.org-eo {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #9a3412;
  background: rgba(255, 244, 229, 0.95);
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
}

.org-node.is-ki .org-eo {
  color: #ffedd5;
  background: rgba(180, 83, 9, 0.45);
}

.org-node.is-ki {
  border-color: rgba(100, 185, 175, 0.35);
  background:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(100, 185, 175, 0.22), transparent 55%),
    linear-gradient(165deg, #1a2e2a 0%, #0f1a18 100%);
  color: #e8f4f1;
  box-shadow:
    0 0 0 1px rgba(100, 185, 175, 0.12) inset,
    0 14px 32px -18px rgba(0, 0, 0, 0.45);
}

.org-node.is-ki .role,
.org-node.is-ki .org-since {
  color: rgba(232, 244, 241, 0.62);
}

.org-node.is-ki:hover {
  border-color: #64b9af;
  box-shadow:
    0 0 0 1px rgba(100, 185, 175, 0.25) inset,
    0 0 24px -8px rgba(42, 157, 143, 0.45),
    0 18px 40px -16px rgba(0, 0, 0, 0.55);
}

.org-node.is-mensch {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 248, 0.92));
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.status-icon-probe {
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid rgba(194, 65, 12, 0.35);
}

.status-icon-warn {
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #9a3412;
}

.status-icon-out {
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #991b1b;
}

.status-icon-ausfall {
  color: #334155;
  background: #e2e8f0;
  border: 1px solid #64748b;
  font-size: 0.65rem;
}

.avatar-probe {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c2410c;
  border: 2px solid #fff;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(194, 65, 12, 0.25);
}

.org-node.is-ki .avatar-probe {
  border-color: #0f1a18;
}

/* Legende */
.org-legend {
  width: 100%;
  margin-top: 1.75rem;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.org-legend h3 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  font-weight: 700;
}

.org-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
}

.org-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.legend-swatch {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.legend-mensch {
  background: linear-gradient(165deg, #fff, #f3faf8);
}

.legend-ki {
  background: linear-gradient(165deg, #1a2e2a, #0f1a18);
  border-color: rgba(100, 185, 175, 0.35);
}

/* Nodes */
.org-node {
  --i: 0;
  appearance: none;
  position: relative;
  border: 1px solid rgba(197, 212, 208, 0.9);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 248, 0.92));
  border-radius: 14px;
  padding: 0.75rem 0.9rem 0.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  text-align: left;
  min-width: 200px;
  max-width: 260px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 28px -18px rgba(14, 22, 20, 0.35);
  transition:
    border-color 0.2s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
  animation: org-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.12s + var(--i) * 0.06s);
}

.org-node:hover {
  border-color: var(--teal);
  transform: translateY(-4px) scale(1.015);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px -16px rgba(29, 122, 111, 0.45);
  z-index: 2;
}

.org-node:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.org-node-lg {
  min-width: 280px;
  max-width: 320px;
  padding: 1rem 1.15rem 1.05rem;
  border-width: 1.5px;
  border-color: rgba(42, 157, 143, 0.45);
  background:
    radial-gradient(ellipse 90% 80% at 10% 0%, rgba(42, 157, 143, 0.16), transparent 55%),
    linear-gradient(165deg, #fff, #eef8f5);
}

.org-node-lg .org-avatar img {
  width: 72px;
  height: 72px;
}

.org-node-ki {
  min-width: 168px;
  max-width: 188px;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 1.1rem 0.75rem 0.9rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(42, 157, 143, 0.22), transparent 55%),
    linear-gradient(180deg, #12201d 0%, #0e1614 100%);
  border-color: rgba(42, 157, 143, 0.35);
  color: #e8f4f1;
  box-shadow:
    0 0 0 1px rgba(42, 157, 143, 0.12) inset,
    0 16px 36px -18px rgba(0, 0, 0, 0.55);
}

.org-node-ki .role {
  color: rgba(232, 244, 241, 0.62);
}

.org-node-ki:hover {
  border-color: #64b9af;
  box-shadow:
    0 0 0 1px rgba(100, 185, 175, 0.25) inset,
    0 0 28px -6px var(--glow),
    0 20px 40px -16px rgba(0, 0, 0, 0.6);
}

.org-avatar {
  position: relative;
  display: grid;
  place-items: center;
}

.org-avatar img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--paper-2);
  position: relative;
  z-index: 1;
}

.org-node-ki .org-avatar img {
  width: 56px;
  height: 56px;
  box-shadow: 0 0 0 2px rgba(100, 185, 175, 0.45);
}

.org-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--teal), transparent 60%, var(--teal-deep)) border-box;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.35s ease;
  transform: scale(0.92);
  pointer-events: none;
}

.org-node:hover .org-ring {
  opacity: 1;
  transform: scale(1);
}

.org-node-ki .org-ring {
  background:
    linear-gradient(#12201d, #12201d) padding-box,
    linear-gradient(135deg, #64b9af, transparent 55%, #2a9d8f) border-box;
}

.org-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.org-node-ki .org-copy {
  align-items: center;
  margin-top: 0.15rem;
}

.org-node .name {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.org-node-lg .name {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.org-node-ki .name {
  font-size: 0.88rem;
}

.org-node .role {
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.org-step {
  position: absolute;
  top: 0.45rem;
  left: 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64b9af;
  opacity: 0.9;
}

.org-score {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(100, 185, 175, 0.18);
  color: #9ee0d6;
  border: 1px solid rgba(100, 185, 175, 0.35);
}

.org-score.is-empty {
  opacity: 0.45;
}

.node-probezeit {
  border-left: 3px solid var(--probe);
}

.org-node-ki.node-probezeit {
  border-left: none;
  box-shadow:
    0 0 0 1px rgba(180, 83, 9, 0.45) inset,
    0 16px 36px -18px rgba(0, 0, 0, 0.55);
}

.node-aktiv {
  border-left: 3px solid var(--aktiv);
}

.org-node-ki.node-aktiv,
.org-node-lg.node-aktiv {
  border-left-width: 1.5px;
}

.node-out {
  opacity: 0.45;
  filter: grayscale(0.7);
}

/* KI pipeline */
.org-pipeline {
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 20px;
  padding: 1.25rem 1.15rem 1.35rem;
  background:
    radial-gradient(ellipse 70% 60% at 15% 0%, rgba(42, 157, 143, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 50% at 100% 100%, rgba(100, 185, 175, 0.12), transparent 50%),
    linear-gradient(145deg, #16302b 0%, #0c1412 55%, #12201c 100%);
  color: #e8f4f1;
  box-shadow:
    0 0 0 1px rgba(100, 185, 175, 0.18) inset,
    0 28px 60px -30px rgba(8, 20, 18, 0.75);
  animation: org-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.28s;
  overflow: hidden;
}

.org-pipeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.15rem;
  padding: 0 0.25rem;
}

.org-pipeline-head .org-tier-label {
  color: rgba(232, 244, 241, 0.55);
  margin-bottom: 0.35rem;
}

.org-pipeline-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.org-pipeline-sub {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: rgba(232, 244, 241, 0.58);
}

.org-pipeline-meta {
  display: flex;
  gap: 0.5rem;
}

.org-pipeline-meta span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(100, 185, 175, 0.35);
  color: #9ee0d6;
  background: rgba(100, 185, 175, 0.08);
}

.org-pipeline-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding: 0.35rem 0.2rem 0.65rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.org-pipeline-track::-webkit-scrollbar {
  height: 6px;
}

.org-pipeline-track::-webkit-scrollbar-thumb {
  background: rgba(100, 185, 175, 0.35);
  border-radius: 99px;
}

.pipe-stage {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.pipe-link {
  width: 36px;
  height: 2px;
  margin: 0 0.15rem;
  position: relative;
  background: linear-gradient(90deg, rgba(100, 185, 175, 0.15), #64b9af, rgba(100, 185, 175, 0.15));
  flex-shrink: 0;
}

.pipe-link::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #64b9af;
  transform: translateY(-50%);
}

.pipe-dot {
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #64b9af;
  box-shadow: 0 0 10px var(--glow);
  animation: pipe-pulse 1.8s ease-in-out infinite;
}

@keyframes org-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes org-stem {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes pipe-pulse {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.5;
  }
  50% {
    transform: translateX(22px);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .org-rail {
    left: 6%;
    right: 6%;
  }

  .org-node,
  .org-node-lg {
    min-width: min(100%, 260px);
    max-width: 100%;
  }

  .pipe-link {
    width: 22px;
  }
}

/* Directory */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.chip.is-active {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}

.directory {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.dir-row {
  appearance: none;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 52px 1.4fr 1.2fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  text-align: left;
}

.dir-row:last-child {
  border-bottom: none;
}

.dir-row:hover {
  background: var(--teal-soft);
}

@media (max-width: 720px) {
  .dir-row {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .dir-row .hide-sm {
    display: none;
  }
}

.dir-row img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.dir-row .name {
  font-weight: 650;
}

.dir-row .muted {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 2px;
  border: 1px solid currentColor;
}

.badge-probezeit {
  color: var(--probe);
  background: var(--probe-bg);
}

.badge-icon-only {
  padding: 0.28rem;
  min-width: 1.5rem;
  justify-content: center;
}

.badge-icon-only svg {
  display: block;
}

.badge-aktiv {
  color: var(--aktiv);
  background: var(--aktiv-bg);
}

.badge-warn {
  color: #9a3412;
  background: #ffedd5;
  border-color: #9a3412;
}

.badge-ausfall {
  color: #334155;
  background: #e2e8f0;
  border-color: #64748b;
}

.badge-out {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #991b1b;
}

.profile-hr {
  margin: 1.1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--line);
}

.profile-hr h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.45rem;
  color: var(--ink-muted);
  font-weight: 650;
}

.profile-hr dl {
  margin: 0.5rem 0;
}

.profile-hr .muted {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.path-block {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0 0;
  max-width: 100%;
  min-width: 0;
}

.path-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.path-full {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  background: #f1f5f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.btn-copy-path {
  justify-self: start;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.badge-mensch {
  color: var(--mensch);
  background: #eee;
  border-color: #bbb;
}

.badge-ki {
  color: var(--ki);
  background: var(--teal-soft);
}

/* Profile */
.profile {
  display: none;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.profile.is-open {
  display: grid;
}

@media (max-width: 700px) {
  .profile.is-open {
    grid-template-columns: 1fr;
  }
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper-2);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.profile h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}

.profile .role-line {
  color: var(--ink-muted);
  margin: 0;
}

.profile dl {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.55rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.profile dt {
  color: var(--ink-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile dd {
  margin: 0;
}

.profile-bio {
  margin: 0;
  max-width: 40rem;
}

.profile-skills {
  margin: 1.1rem 0 0;
}

.profile-skills h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.45rem;
  color: var(--ink-muted);
  font-weight: 650;
}

.profile-skills ul {
  margin: 0;
  padding-left: 1.1rem;
  max-width: 36rem;
}

.profile-skills li {
  margin: 0.2rem 0;
  font-size: 0.95rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--teal-deep);
  background: var(--teal-deep);
  color: #fff;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
}

.btn:hover {
  filter: brightness(1.05);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.empty {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* —— KI-Einarbeitung —— */
.eo-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .eo-layout {
    grid-template-columns: 1.35fr 0.9fr;
    align-items: start;
  }
}

.eo-people h3,
.eo-steps h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.eo-lead {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.eo-people-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.eo-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.eo-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.eo-card-head img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.eo-card-head .name {
  display: block;
  font-weight: 650;
}

.eo-progress {
  display: flex;
  gap: 0.28rem;
  margin: 0.75rem 0 0.45rem;
  flex-wrap: wrap;
}

.eo-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d5e0dd;
  border: 1px solid #b7c7c2;
}

.eo-dot.is-done {
  background: var(--teal);
  border-color: var(--teal-deep);
}

.eo-dot.is-next {
  background: #fff4e5;
  border-color: var(--probe);
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.25);
}

.eo-status {
  margin: 0;
  font-size: 0.9rem;
}

.eo-note {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
}

.eo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.eo-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.eo-step-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.eo-step-n {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 0.8rem;
}

.eo-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.eo-step-body strong {
  font-size: 0.92rem;
}

.eo-step-body code {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.section-head .hint a {
  color: var(--teal-deep);
}
