/* ============================================
   NETLINE – Portfolio
   Ergänzt style.css (Tokens, Karten, Buttons).
   Kundenfarben je Beispiel über --case-*.
   ============================================ */

:root {
  --live: #4fbf8a;
  --live-dark: #2f8f5b;
  --repl: #7fb0d4;
}

/* ── Hero ── */
.pf-hero { padding-bottom: 60px; }
.pf-hero h1 { font-size: clamp(2rem, 5.2vw, 4.2rem); }
.pf-hero h1 .highlight { color: var(--accent); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(79,191,138,0.4);
  background: rgba(79,191,138,0.08);
  color: #a9e3c6;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.live-pill i,
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(79,191,138,0.6);
  animation: livePulse 1.8s infinite;
  flex-shrink: 0;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(79,191,138,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(79,191,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,191,138,0); }
}

.pf-crumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.pf-crumbs a { color: var(--text-muted); transition: var(--transition); }
.pf-crumbs a:hover { color: var(--accent); }

.pf-section-alt {
  background: linear-gradient(to bottom, rgba(171,157,120,0.03) 0%, transparent 100%);
  border-top: 1px solid var(--border);
}
.pf-section-dark {
  background: linear-gradient(135deg, #0d0d0d 0%, #111111 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pf-lead {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 1.05rem;
}
.pf-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 860px;
  margin: 2.5rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--accent-dark);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 0.9rem;
}
.pf-note svg { color: var(--accent); flex-shrink: 0; }

/* ── Badges & Chips ── */
.src-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.src-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.src-graphql { color: var(--accent-light); border-color: rgba(171,157,120,0.45); background: rgba(171,157,120,0.08); }
.src-write   { color: var(--text); border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }
.src-repl    { color: var(--repl); border-color: rgba(74,127,165,0.55); background: rgba(74,127,165,0.1); }
.src-ingest  { color: #a9e3c6; border-color: rgba(79,191,138,0.45); background: rgba(79,191,138,0.08); }
.src-other   { color: var(--text-light); border-color: var(--border); background: rgba(255,255,255,0.03); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font-size: 0.8rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-light);
}

/* ── Datenfluss-Grafiken (SVG) ── */
.flow { position: relative; }
.flow-svg { width: 100%; height: auto; display: block; overflow: visible; }
.flow-svg.is-tall { display: none; max-width: 420px; margin: 0 auto; }
.flow-svg text { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; }
.flow-svg .fnode rect { fill: #121212; stroke: #2c2c2c; stroke-width: 1.5; }
.flow-svg .fnode .t { fill: var(--text); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.flow-svg .fnode .s { fill: var(--text-muted); font-size: 13.5px; font-weight: 500; }
.flow-svg .n-erp rect { stroke: var(--accent); }
.flow-svg .n-gql rect { stroke: rgba(171,157,120,0.55); }
.flow-svg .n-rep rect { stroke: rgba(74,127,165,0.85); }
.flow-svg .n-board rect,
.flow-svg .n-public rect { fill: rgba(171,157,120,0.10); stroke: var(--accent); stroke-width: 2; }
.flow-svg .n-user rect { fill: #161616; }
.flow-svg .n-ingest rect { stroke: rgba(79,191,138,0.7); }
.flow-svg .fpath { fill: none; stroke-width: 2.2; }
.flow-svg .p-read  { stroke: rgba(171,157,120,0.45); }
.flow-svg .p-write { stroke: rgba(255,255,255,0.22); stroke-dasharray: 4 7; }
.flow-svg .p-rep,
.flow-svg .p-int   { stroke: rgba(74,127,165,0.6); stroke-dasharray: 8 8; animation: flowDash 1.1s linear infinite; }
.flow-svg .p-out,
.flow-svg .p-pub   { stroke: rgba(171,157,120,0.35); }
.flow-svg .p-push  { stroke: rgba(79,191,138,0.55); stroke-width: 2.5; }
@keyframes flowDash { to { stroke-dashoffset: -16; } }
.flow-svg .pkt-read circle  { fill: var(--accent); }
.flow-svg .pkt-write circle { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.flow-svg .pkt-rep circle   { fill: var(--secondary); }
.flow-svg .pkt-out circle   { fill: var(--accent-light); }
.flow-svg .pkt-read,
.flow-svg .pkt-out { filter: drop-shadow(0 0 5px rgba(171,157,120,0.85)); }
.flow-svg .pkt-rep { filter: drop-shadow(0 0 5px rgba(74,127,165,0.9)); }
.flow-svg .pkt-sealed rect { fill: #0f2a1f; stroke: var(--live); stroke-width: 2; }
.flow-svg .pkt-sealed path { fill: none; stroke: var(--live); stroke-width: 2; }
.flow-svg .pkt-sealed rect.lk { fill: var(--live); stroke: none; }
.flow-svg .pkt-sealed { filter: drop-shadow(0 0 6px rgba(79,191,138,0.7)); }
.flow-svg .fzone rect { fill: rgba(255,255,255,0.015); stroke: #2a2a2a; stroke-dasharray: 6 6; }
.flow-svg .fzone.z-net rect { fill: rgba(79,191,138,0.025); }
.flow-svg .fzone text { fill: var(--text-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.flow-svg .fwall line { stroke: #c0614f; stroke-width: 3; stroke-dasharray: 2 6; stroke-linecap: round; }
.flow-svg .fwall text { fill: #d98b7c; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.flow-svg .fblocked path { stroke: rgba(192,97,79,0.45); stroke-width: 2; stroke-dasharray: 3 6; fill: none; }
.flow-svg .fblocked circle { fill: #1a0f0d; stroke: #c0614f; stroke-width: 2; }
.flow-svg .fblocked line { stroke: #e08b79; stroke-width: 2.5; stroke-linecap: round; }
.flow-svg .fblocked text { fill: #d98b7c; font-size: 12.5px; font-weight: 600; }

.flow-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.flow-legend li { display: flex; align-items: center; gap: 0.5rem; }
.flow-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.flow-legend .lg-read   { background: var(--accent); }
.flow-legend .lg-write  { background: #fff; border: 2px solid var(--accent); }
.flow-legend .lg-rep    { background: var(--secondary); }
.flow-legend .lg-sealed { background: var(--live); border-radius: 3px; }
.flow-legend .lg-block  { background: transparent; border: 2px solid #c0614f; }

.flow-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
}

/* Schritte neben/unter einer Grafik */
.pf-steps { list-style: none; display: grid; gap: 0.75rem; counter-reset: pfstep; }
.pf-steps li {
  position: relative;
  padding: 1rem 1.1rem 1rem 3.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.pf-steps li::before {
  counter-increment: pfstep;
  content: counter(pfstep);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(171,157,120,0.12);
  color: var(--accent);
}
.pf-steps li.is-active { border-color: var(--accent); background: rgba(171,157,120,0.06); }
.pf-steps li.is-active::before { background: var(--accent); color: #000; }
.pf-steps h4 { font-size: 0.98rem; font-weight: 800; text-transform: none; letter-spacing: -0.01em; color: var(--text); margin-bottom: 0.25rem; }
.pf-steps p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

.pf-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.pf-split.is-top { align-items: start; }

/* ── Säulen der Live-Anbindung ── */
.pillar-card { position: relative; overflow: hidden; }
.pillar-card .pillar-key {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}
.pillar-card ul { list-style: none; display: grid; gap: 0.5rem; margin-top: 1rem; }
.pillar-card li { display: flex; gap: 0.55rem; font-size: 0.88rem; color: var(--text-light); }
.pillar-card li svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.pillar-card.is-repl li svg { color: var(--repl); }

/* ── Filter ── */
.pf-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.25rem;
}
.pf-filter button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font: 600 0.85rem 'Inter', 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.pf-filter button:hover,
.pf-filter button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(171,157,120,0.08);
}

/* ── Beispiel-Kacheln ── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.case-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.case-card:hover {
  transform: translateY(-4px);
  border-color: var(--case-accent, var(--accent));
  box-shadow: 0 14px 44px rgba(0,0,0,0.5);
}
.case-card.is-hidden,
.more-card.is-hidden { display: none; }
.case-thumb {
  height: 150px;
  background: var(--case-surface);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.thumb-top { height: 16px; background: var(--case-primary); }
.thumb-body { display: flex; height: calc(100% - 16px); }
.thumb-side { width: 22%; background: var(--case-primary); opacity: 0.92; }
.thumb-main { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.thumb-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumb-tiles i {
  height: 24px;
  background: #fff;
  border-radius: 4px;
  border-top: 3px solid var(--case-accent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.thumb-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  background: #fff;
  border-radius: 4px;
  padding: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.thumb-bars b { flex: 1; background: var(--case-primary); border-radius: 2px 2px 0 0; transition: height 0.6s ease; }
.thumb-bars b:nth-child(3n) { background: var(--case-accent); }
.case-card:hover .thumb-bars b:nth-child(odd) { filter: brightness(1.15); }
.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.case-meta .case-label { margin-bottom: 0; }
.case-swatches { display: inline-flex; gap: 4px; flex-shrink: 0; }
.case-swatches i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
}
.case-body {
  padding: 1.4rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.case-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.case-body h3 {
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: 1.18rem;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.case-body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.1rem; }
.case-body .src-badges { margin-top: auto; margin-bottom: 1.1rem; }
.case-more {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}
.case-card:hover .case-more { gap: 0.7rem; }

/* ── Themen & KPI-Katalog ── */
.theme-card .chips { margin-top: 1rem; }
.theme-card .theme-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}
.theme-card ul { list-style: none; display: grid; gap: 0.4rem; margin-top: 0.9rem; }
.theme-card li { font-size: 0.86rem; color: var(--text-light); padding-left: 1rem; position: relative; }
.theme-card li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.theme-count {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  vertical-align: middle;
}
.kpi-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
}
.kpi-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.kpi-group h4 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.9rem;
}
.kpi-group h4 span { font-size: 0.75rem; color: var(--accent); font-weight: 700; white-space: nowrap; }
.kpi-group .chip { font-size: 0.76rem; }

/* ── Weitere Projekte ── */
.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.more-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.more-card:hover { border-color: var(--accent-dark); }
.more-card h4 { font-size: 1rem; font-weight: 800; text-transform: none; letter-spacing: -0.01em; color: var(--text); margin: 0.2rem 0 0.45rem; }
.more-card p { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.more-card .case-label { margin-bottom: 0; font-size: 0.7rem; }
.more-card .src-badges { margin-top: auto; }

/* ── Demo-Fenster (Nachbau mit Pseudodaten) ── */
.demo { margin: 0 auto; max-width: 1060px; }
.demo-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #2c2c2c;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(171,157,120,0.06);
  background: var(--case-surface);
}
.demo-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: #1a1a1a;
  border-bottom: 1px solid #262626;
}
.demo-chrome > span { width: 11px; height: 11px; border-radius: 50%; background: #3b3b3b; }
.demo-chrome > span:nth-child(1) { background: #e0675d; }
.demo-chrome > span:nth-child(2) { background: #d9b04f; }
.demo-chrome > span:nth-child(3) { background: #5fae5a; }
.demo-address {
  margin-left: 0.75rem;
  flex: 1;
  max-width: 440px;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.22rem 0.7rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
}
.demo-app {
  display: grid;
  grid-template-columns: 196px 1fr;
  min-height: 430px;
  color: var(--case-text);
  font-size: 13px;
  text-align: left;
}
.demo-side { background: var(--case-primary); color: rgba(255,255,255,0.82); padding: 1rem 0.75rem; }
.demo-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 0.86rem;
  color: #fff;
  margin-bottom: 1.1rem;
  line-height: 1.2;
}
.demo-logo {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--case-accent);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}
.demo-side ul { list-style: none; display: grid; gap: 2px; }
.demo-side li {
  padding: 0.48rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-side li.is-active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 700; }
.demo-main {
  padding: 1rem 1.1rem 1.2rem;
  background: var(--case-surface);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}
.demo-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.demo-top h4 { font-size: 1.02rem; text-transform: none; letter-spacing: -0.01em; color: var(--case-text); font-weight: 800; line-height: 1.2; }
.demo-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--live-dark);
  background: rgba(47,143,91,0.1);
  border: 1px solid rgba(47,143,91,0.25);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.demo-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--live-dark); animation: livePulse 1.8s infinite; }
.demo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; }
.demo-tile {
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-top: 3px solid var(--case-accent);
  min-width: 0;
}
.demo-tile .t-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0,0,0,0.55);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-tile .t-value {
  display: block;
  font-size: 1.32rem;
  font-weight: 900;
  color: var(--case-text);
  margin: 0.18rem 0 0.1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.demo-tile .t-trend { font-size: 0.7rem; font-weight: 700; }
.dir-up   { color: #2f8f5b; }
.dir-down { color: #c0504d; }
.dir-flat { color: rgba(0,0,0,0.45); }
.demo-tile.is-tick { animation: tileTick 1.4s ease; }
@keyframes tileTick {
  0%   { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
  25%  { box-shadow: 0 0 0 3px color-mix(in srgb, var(--case-accent) 55%, transparent); }
  100% { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
}
.demo-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0.7rem; }
.demo-grid.is-single { grid-template-columns: 1fr; }
.demo-card {
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  min-width: 0;
}
.demo-card-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0,0,0,0.6);
  margin-bottom: 0.45rem;
}
.demo-chart-svg { width: 100%; height: auto; display: block; }
.demo-chart-svg .grid { stroke: rgba(0,0,0,0.07); stroke-width: 1; }
.demo-chart-svg .axis { stroke: rgba(0,0,0,0.2); stroke-width: 1; }
.demo-chart-svg .bar.s0 { fill: var(--case-primary); }
.demo-chart-svg .bar.s1 { fill: var(--case-accent); }
.demo-chart-svg .bar.s2 { fill: var(--case-secondary); }
.demo-chart-svg .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.demo-chart-svg .line.s0 { stroke: var(--case-primary); }
.demo-chart-svg .line.s1 { stroke: var(--case-accent); }
.demo-chart-svg .line.s2 { stroke: var(--case-secondary); }
.demo-chart-svg .pt { fill: #fff; stroke-width: 2; }
.demo-chart-svg .pt.s0 { stroke: var(--case-primary); }
.demo-chart-svg .pt.s1 { stroke: var(--case-accent); }
.demo-chart-svg .pt.s2 { stroke: var(--case-secondary); }
.demo-chart-svg .area { fill: var(--case-primary); opacity: 0.1; }
.demo-chart-svg .lbl { font: 600 11px 'Inter', 'Segoe UI', system-ui, sans-serif; fill: rgba(0,0,0,0.5); }
.demo-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.68rem; color: rgba(0,0,0,0.6); margin-top: 0.35rem; }
.demo-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; }
.demo-legend i.s0 { background: var(--case-primary); }
.demo-legend i.s1 { background: var(--case-accent); }
.demo-legend i.s2 { background: var(--case-secondary); }
.demo-table-scroll { overflow-x: auto; }
.demo-table table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.demo-table th {
  text-align: left;
  font-weight: 800;
  color: rgba(0,0,0,0.55);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 0.35rem 0.45rem;
  white-space: nowrap;
}
.demo-table td {
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--case-text);
  white-space: nowrap;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-table td.num, .demo-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.demo-process {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
}
.demo-process li {
  background: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.7rem 0.65rem;
  font-size: 0.72rem;
  border: 1px solid rgba(0,0,0,0.07);
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}
.demo-process em {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--case-accent) 20%, #fff);
  color: var(--case-text);
  margin-bottom: 0.35rem;
}
.demo-process strong { display: block; font-size: 0.76rem; color: var(--case-text); line-height: 1.25; margin-bottom: 0.15rem; }
.demo-process span { color: rgba(0,0,0,0.55); line-height: 1.35; display: block; }
.demo-process li.is-active {
  border-color: var(--case-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--case-accent) 40%, transparent);
}
.demo-process li.is-active em,
.demo-process li.is-done em { background: var(--case-accent); color: #fff; }
.demo figcaption {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}
.demo figcaption svg { color: var(--accent); flex-shrink: 0; }

/* JS-Zustände (ohne JS bleibt alles statisch sichtbar) */
.demo.is-ready .demo-tile,
.demo.is-ready .demo-card,
.demo.is-ready .demo-process li {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease calc(var(--i, 0) * 90ms), transform 0.55s ease calc(var(--i, 0) * 90ms), border-color 0.4s ease, box-shadow 0.4s ease;
}
.demo.is-ready.is-play .demo-tile,
.demo.is-ready.is-play .demo-card { opacity: 1; transform: none; }
.demo.is-ready.is-play .demo-process li { opacity: 0.6; transform: none; }
.demo.is-ready.is-play .demo-process li.is-active,
.demo.is-ready.is-play .demo-process li.is-done { opacity: 1; }
.demo.is-ready .bar {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1) calc(400ms + var(--d, 0ms));
}
.demo.is-ready.is-play .bar { transform: scaleY(1); }
.demo.is-ready .line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s ease 0.5s; }
.demo.is-ready.is-play .line { stroke-dashoffset: 0; }
.demo.is-ready .area,
.demo.is-ready .pt { opacity: 0; transition: opacity 0.6s ease 1.4s; }
.demo.is-ready.is-play .area { opacity: 0.1; }
.demo.is-ready.is-play .pt { opacity: 1; }
.demo.is-ready .demo-table tbody tr { opacity: 0; transition: opacity 0.45s ease var(--d, 0ms); }
.demo.is-ready.is-play .demo-table tbody tr { opacity: 1; }

/* ── Fallseite ── */
.case-hero .case-label { display: inline-block; margin-bottom: 1rem; }
.case-hero h1 { font-size: clamp(1.8rem, 4.4vw, 3.4rem); }
.case-hero .src-badges { justify-content: center; margin-top: 1.5rem; }
.case-palette {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.case-palette i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.18);
  display: inline-block;
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}
.fact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  text-align: center;
}
.fact strong { display: block; font-size: 1.45rem; font-weight: 900; color: var(--accent); line-height: 1.15; margin-bottom: 0.25rem; }
.fact span { font-size: 0.8rem; color: var(--text-muted); }
.pf-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.9rem;
  height: 100%;
}
.pf-panel.is-problem { border-top: 3px solid #c0614f; }
.pf-panel.is-solution { border-top: 3px solid var(--accent); }
.pf-panel h3 { display: flex; align-items: center; gap: 0.6rem; text-transform: none; letter-spacing: -0.02em; margin-bottom: 1.1rem; }
.pf-panel.is-problem h3 svg { color: #e08b79; }
.pf-panel.is-solution h3 svg { color: var(--accent); }
.pf-panel ul { list-style: none; display: grid; gap: 0.75rem; }
.pf-panel li { position: relative; padding-left: 1.2rem; font-size: 0.93rem; color: var(--text-light); line-height: 1.6; }
.pf-panel li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pf-panel.is-problem li::before { background: #c0614f; }

.flow-chain {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0;
  margin: 1.75rem 0 0.5rem;
}
.flow-chain li { display: flex; align-items: center; }
.flow-chain li span {
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.flow-chain li:first-child span { border-color: var(--accent); }
.flow-chain li:last-child span { background: rgba(171,157,120,0.1); border-color: var(--accent); }
.flow-chain li + li::before {
  content: '';
  width: 44px;
  height: 2px;
  margin: 0 0.25rem;
  background: linear-gradient(90deg, rgba(171,157,120,0.15), rgba(171,157,120,0.15)), linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 100% 100%, 40% 100%;
  background-repeat: no-repeat;
  animation: chainFlow 1.6s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.25s);
}
@keyframes chainFlow {
  from { background-position: 0 0, -40% 0; }
  to   { background-position: 0 0, 140% 0; }
}
.highlight-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; }
.highlight-list li {
  display: flex;
  gap: 0.8rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-light);
}
.highlight-list svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.module-cards .card h3 { font-size: 1.02rem; }
.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}
.case-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.case-nav a:hover { border-color: var(--accent); }
.case-nav small { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; }
.case-nav strong { color: var(--text); font-size: 0.98rem; }
.case-nav .next { text-align: right; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-split { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 760px) {
  .demo-app { grid-template-columns: 1fr; min-height: 0; }
  .demo-side { padding: 0.7rem 0.75rem; }
  .demo-brand { margin-bottom: 0.55rem; }
  .demo-side ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .demo-side ul::-webkit-scrollbar { display: none; }
  .demo-side li { flex-shrink: 0; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-tiles { grid-template-columns: repeat(2, 1fr); }
  .demo-tile .t-value { font-size: 1.12rem; }
  .flow-chain { flex-direction: column; align-items: stretch; }
  .flow-chain li { flex-direction: column; }
  .flow-chain li span { width: 100%; text-align: center; white-space: normal; }
  .flow-chain li + li::before { width: 2px; height: 22px; margin: 0.25rem 0; background: linear-gradient(180deg, transparent, var(--accent), transparent); animation: none; }
  .case-nav { grid-template-columns: 1fr; }
  .case-nav .next { text-align: left; }
  .flow-panel { padding: 1.25rem 1rem; }
}
@media (max-width: 700px) {
  .flow-svg.is-wide { display: none; }
  .flow-svg.is-tall { display: block; }
}
@media (max-width: 640px) {
  .case-grid { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .live-pill i, .live-dot, .demo-live i { animation: none; }
  .flow-svg .pkt { display: none; }
  .flow-svg .p-rep, .flow-svg .p-int { animation: none; }
  .flow-chain li + li::before { animation: none; background: rgba(171,157,120,0.4); }
}

/* ── Ergänzungen für Vorlagen ── */
.pf-subhead {
  text-align: center;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin: 4rem 0 1.5rem;
  color: var(--text-light);
}
.pf-h3 { font-size: clamp(1.2rem, 2.6vw, 1.7rem); }
.pf-steps.is-row { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.chips.is-center { justify-content: center; }
.fact-note { display: block; margin-top: 0.4rem; font-size: 0.72rem; color: var(--text-muted); opacity: 0.8; }
.pf-bullets { list-style: none; display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.pf-bullets li { position: relative; padding-left: 1rem; font-size: 0.9rem; color: var(--text-light); }
.pf-bullets li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dev-highlight .pf-bullets { margin-top: 0.4rem; }
.pf-platform-points { list-style: none; display: grid; gap: 0.45rem; margin-top: 1.25rem; }
.pf-platform-points li { position: relative; padding-left: 1.1rem; font-size: 0.9rem; color: rgba(0,0,0,0.78); font-weight: 600; }
.pf-platform-points li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,0.55); }
.pf-timeline { max-width: 760px; margin: 0 auto; }
.case-hero .src-badges { display: flex; }

/* ── Feinschliff nach QA ── */
.demo, .demo-frame, .flow-panel { max-width: 100%; }
.demo-app > *, .pf-split > *, .demo-grid > * { min-width: 0; }
.pf-hero h1, .section-header h2, .case-body h3 { overflow-wrap: break-word; hyphens: auto; }
.pf-hero h1 .highlight { display: block; font-size: 0.62em; margin-top: 0.35rem; letter-spacing: -0.02em; }
.pf-stats .stats-grid { grid-template-columns: repeat(3, 1fr); }
.pf-stats .stat-card { cursor: help; }
.fact strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.dev-highlight .pf-bullets { text-align: left; }
@media (max-width: 768px) {
  .pf-stats .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dev-highlight > div { width: 100%; }
}
