/* IT-Net SmartHome, showcase styles. Light engineering look, accent #4c86b0. */

:root {
  --bg: #f5f6f8;
  --bg-alt: #eef1f4;
  --panel: #ffffff;
  --ink: #101827;
  --muted: #55606e;
  --line: #dfe4e9;
  --accent: #4c86b0;
  --accent-ink: #35618c;
  --ok: #16a34a;
  --warn: #b91c1c;
  --vlan-mgmt: #3b82f6;
  --vlan-smart: #22c55e;
  --vlan-iot: #ef4444;
  --vlan-guest: #f59e0b;
  --sans:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono:
    ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "Courier New",
    monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 39, 0.05), 0 8px 24px rgba(16, 24, 39, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1em;
}

ul,
ol,
dl,
figure {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

a {
  color: var(--accent-ink);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus-visible {
  top: 12px;
}

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ------------------------------------------------------------------ */
/* Topbar & Hero                                                       */
/* ------------------------------------------------------------------ */

.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: grid;
  place-items: center;
}

.brand-text {
  display: grid;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: 8px;
}

.topnav a:hover {
  color: var(--ink);
  background: var(--bg-alt);
}

.hero {
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
  padding: 58px 0 46px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  max-width: 21ch;
  margin-bottom: 18px;
}

.hero-copy {
  max-width: 68ch;
  font-size: 17px;
  color: #2b3442;
}

.hero-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 26px;
}

.badge-real {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-weight: 600;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
}

.hero-stats li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  display: grid;
  gap: 2px;
}

.hero-stats strong {
  font-size: 19px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-head h2 {
  font-size: clamp(23px, 3vw, 30px);
}

.section-head p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.fineprint {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

/* ------------------------------------------------------------------ */
/* Stage: controls                                                     */
/* ------------------------------------------------------------------ */

.stage-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 12px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.15s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent-ink);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.switch-label small {
  color: var(--muted);
  font-weight: 400;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 3px;
  gap: 2px;
  margin: 0;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.segmented span {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.segmented input:checked + span {
  background: var(--ink);
  color: #fff;
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.btn-ghost {
  font: 500 13.5px/1 var(--sans);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  margin-left: auto;
}

.btn-ghost:hover {
  border-color: #b9c2cc;
  background: var(--bg-alt);
}

/* ------------------------------------------------------------------ */
/* Stage: canvas + overlays                                            */
/* ------------------------------------------------------------------ */

.stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(
    120% 110% at 50% 0%,
    #ffffff 0%,
    #eef2f5 62%,
    #dfe6ea 100%
  );
  height: clamp(420px, 58vw, 620px);
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: none;
  cursor: grab;
}

.stage:active {
  cursor: grabbing;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.webgl-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
/* display:grid above would beat the UA [hidden] rule; restate it explicitly,
   otherwise the static fallback paints ON TOP of the working 3D scene. */
.webgl-fallback[hidden] {
  display: none;
}

.webgl-fallback svg {
  width: min(480px, 100%);
  height: auto;
}

.vlan-legend {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 5;
}

.vlan-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vlan-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  margin: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-panel {
  position: absolute;
  right: 12px;
  top: 12px;
  width: min(320px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  z-index: 6;
}

.dp-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.dp-head h3 {
  font-size: 15.5px;
  margin: 0;
  flex: 1;
}

.dp-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
}

#dp-close {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

#dp-close:hover {
  color: var(--ink);
  background: var(--bg-alt);
}

#dp-purpose {
  font-size: 13.5px;
  color: #2b3442;
  margin-bottom: 10px;
}

.dp-meta {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.dp-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}

.dp-meta dt {
  color: var(--muted);
}

.dp-meta dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.device-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 12.5px/1 var(--sans);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}

.device-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.device-chip:hover {
  border-color: #b9c2cc;
}

.device-chip[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.guardrails {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.guardrails li {
  font: 500 12px/1 var(--mono);
  color: var(--muted);
  border: 1px dashed #c4ccd4;
  border-radius: 8px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------------ */
/* Story                                                               */
/* ------------------------------------------------------------------ */

.defizite {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card-num {
  display: inline-block;
  font-size: 11.5px;
  color: var(--warn);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 15.5px;
}

.card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.story-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
}

.soll-box h3,
.my-part h3 {
  font-size: 17px;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
  font-size: 14px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--ok);
  font-weight: 700;
}

.my-part {
  border-left: 4px solid var(--accent);
}

.my-part p {
  font-size: 14.5px;
}

.my-part .muted {
  font-size: 13px;
  margin-bottom: 0;
}

.markt-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 600;
}

.markt-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.markt-stats li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  display: grid;
  gap: 3px;
}

.markt-stats strong {
  font-size: 17px;
}

.markt-stats span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ------------------------------------------------------------------ */
/* Netzwerkplan                                                        */
/* ------------------------------------------------------------------ */

.netplan-wrap {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow-x: auto;
}

#netplan {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

#netplan text {
  font-family: var(--sans);
  fill: var(--ink);
}

#netplan .np-title {
  font-size: 14px;
  font-weight: 600;
}

#netplan .np-sub {
  font-size: 11px;
  fill: var(--muted);
}

#netplan .np-head-label {
  font-size: 13px;
  font-weight: 600;
}

#netplan .np-item-label {
  font-size: 12.5px;
}

#netplan .np-item {
  fill: #ffffff;
  stroke: #dbe2e8;
  stroke-width: 1.2;
}

#netplan .np-line {
  stroke: #94a3b8;
  stroke-width: 1.6;
}

#netplan .np-trunk {
  fill: none;
  stroke-width: 2;
  opacity: 0.85;
}

#netplan .np-drop {
  stroke: #cbd5e1;
  stroke-width: 1.4;
}

#netplan .np-zigbee {
  stroke: #16a34a;
  stroke-width: 1.6;
  stroke-dasharray: 4 5;
  opacity: 0.75;
}

#netplan [data-tip] {
  cursor: help;
}

#netplan [data-tip]:hover rect,
#netplan [data-tip]:hover ellipse,
#netplan [data-tip]:focus-visible rect,
#netplan [data-tip]:focus-visible ellipse {
  stroke: var(--accent-ink);
  stroke-width: 2;
}

.svg-tip {
  position: absolute;
  z-index: 20;
  max-width: 300px;
  background: var(--ink);
  color: #f3f6f9;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(16, 24, 39, 0.28);
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Pakete                                                              */
/* ------------------------------------------------------------------ */

.pkg-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.pkg-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.pkg-card h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pkg-price {
  font-size: 34px;
  font-weight: 700;
  margin: 2px 0 2px;
  letter-spacing: -0.02em;
}

.pkg-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 14px;
}

.pkg-highlight {
  border: 2px solid var(--accent);
  box-shadow: 0 10px 30px rgba(76, 134, 176, 0.2);
}

.pkg-badge {
  position: absolute;
  top: -11px;
  left: 20px;
  background: var(--accent-ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 11px;
  border-radius: 999px;
}

.matrix-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.matrix {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

.matrix th,
.matrix td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.matrix thead th {
  font-size: 13.5px;
  line-height: 1.4;
  padding-top: 15px;
}

.matrix thead .num {
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.matrix tbody th {
  text-align: left;
  font-weight: 500;
  color: #2b3442;
}

.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td {
  border-bottom: 0;
}

.matrix .ok {
  color: var(--ok);
  font-weight: 700;
}

.matrix .no {
  color: #b9c2cc;
}

.matrix .lvl {
  font-size: 12.5px;
  color: var(--muted);
}

.matrix .hl {
  background: rgba(76, 134, 176, 0.09);
}

/* ------------------------------------------------------------------ */
/* Break-even                                                          */
/* ------------------------------------------------------------------ */

.be-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 14px;
  align-items: start;
}

.be-slider-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.be-slider-row label {
  font-weight: 600;
  font-size: 14.5px;
}

.be-n {
  font-size: 30px;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-ink);
  margin: 0 0 16px;
  cursor: pointer;
}

.be-switch {
  margin-bottom: 16px;
}

.be-numbers {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.be-numbers div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  font-size: 14px;
}

.be-numbers dt {
  color: var(--muted);
}

.be-numbers dd {
  margin: 0;
  font-weight: 600;
}

.be-status {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 13px;
}

.be-status[data-ok="true"] {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.be-status[data-ok="false"] {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--warn);
}

.be-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.be-grid-lines line {
  stroke: #edf1f4;
  stroke-width: 1;
}

.be-axis-labels text {
  font-size: 10.5px;
  fill: var(--muted);
  font-family: var(--mono);
}

.be-axis-labels .be-axis-name {
  font-family: var(--sans);
  font-size: 11px;
}

.be-line-fix {
  stroke: #dc2626;
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.be-line-db {
  stroke: #35618c;
  stroke-width: 2.5;
}

.be-line-now {
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-dasharray: 3 4;
}

.be-dot-now {
  fill: var(--accent);
  stroke: #263e52;
  stroke-width: 1.5;
}

.be-dot-cross {
  fill: #111827;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.be-tag {
  font-size: 11px;
  fill: var(--ink);
  font-weight: 600;
  font-family: var(--mono);
}

.be-tag-fix {
  fill: #b91c1c;
}

.be-tag-db {
  fill: #35618c;
  font-family: var(--sans);
  font-weight: 500;
}

.be-chart figcaption {
  padding: 10px 6px 0;
}

/* ------------------------------------------------------------------ */
/* Entscheidungen                                                      */
/* ------------------------------------------------------------------ */

.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.nutzwert h3,
.fmea h3 {
  font-size: 17px;
  margin-bottom: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 70px 1fr 56px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.bar-label {
  font-weight: 600;
  font-size: 14px;
}

.bar-track {
  height: 22px;
  background: var(--bg-alt);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 6px 0 0 6px;
  transition: width 0.6s ease;
}

.bar-zigbee {
  background: #16a34a;
}

.bar-knx {
  background: #9aa6b2;
}

.bar-value {
  text-align: right;
  font-weight: 700;
  font-size: 15px;
}

.nutzwert .muted {
  font-size: 13px;
  margin: 6px 0 0;
}

.fmea-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fbfcfd;
}

.fmea-card:last-child {
  margin-bottom: 0;
}

.rpz {
  flex: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--warn);
  font-weight: 700;
  font-size: 13px;
  border-radius: 9px;
  padding: 7px 10px;
  white-space: nowrap;
}

.fmea-card h4 {
  font-size: 14.5px;
  margin-bottom: 4px;
}

.fmea-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Phasen-Timeline                                                     */
/* ------------------------------------------------------------------ */

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  counter-reset: phase;
  padding-top: 16px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 4%;
  right: 4%;
  height: 2px;
  background: var(--line);
}

.timeline li {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px 14px 14px;
  box-shadow: var(--shadow);
}

.tl-num {
  position: absolute;
  top: -14px;
  left: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.timeline h3 {
  font-size: 14.5px;
  margin-bottom: 5px;
}

.timeline p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.tl-mine {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(76, 134, 176, 0.18);
}

.tl-mine .tl-num {
  background: var(--accent-ink);
}

.tl-tag {
  display: inline-block;
  margin-top: 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
  background: rgba(76, 134, 176, 0.12);
  border: 1px solid rgba(76, 134, 176, 0.45);
  border-radius: 999px;
  padding: 3px 9px;
}

.tl-note {
  color: var(--muted);
  font-size: 13.5px;
  margin: 18px 0 0;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 90px;
  background: var(--bg-alt);
}

.footer p {
  font-size: 13.5px;
  color: #2b3442;
  max-width: 90ch;
}

.footer .muted {
  font-size: 12.5px;
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Demo ribbon (standard chrome, exact)                                */
/* ------------------------------------------------------------------ */

.demo-ribbon {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 18, 22, 0.85);
  color: #fff;
  font:
    500 12px/1 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.demo-ribbon:hover,
.demo-ribbon:focus-visible {
  opacity: 1;
}
@media print {
  .demo-ribbon {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
  .defizite {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .markt-stats,
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
  }

  .timeline::before {
    display: none;
  }

  .timeline li {
    margin-top: 16px;
  }
}

@media (max-width: 900px) {
  .topnav {
    display: none;
  }

  .story-cols,
  .decision-grid,
  .be-grid {
    grid-template-columns: 1fr;
  }

  .pkg-cards {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .pkg-highlight {
    order: -1;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 46px 0;
  }

  .hero {
    padding: 40px 0 34px;
  }

  .defizite,
  .markt-stats,
  .hero-stats,
  .timeline {
    grid-template-columns: 1fr;
  }

  .device-panel {
    left: 10px;
    right: 10px;
    top: 10px;
    width: auto;
  }

  .btn-ghost {
    margin-left: 0;
  }

  .stage {
    height: clamp(380px, 110vw, 480px);
  }

  .stage-hint {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
