@font-face {
  font-family: "Degular";
  src: local("Degular"), local("Degular Regular");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --hintergrund: #f2f5f7;
  --linie: #6f818c;
  --linie-sanft: #7f929d;
  --text: #2f434f;
  --text-sanft: #4a5f6b;
  --node: #f9fbfc;
  --akzent: #cdf1e7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Degular", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--hintergrund);
}

#app {
  padding: 10px;
}

.tree-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.tree-header {
  margin: 2px 4px 16px;
}

.tree-header h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.12;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tree-header p {
  margin: 8px 0 0;
  color: var(--text-sanft);
  font-size: 0.96rem;
}

.tree-header-microcopy {
  font-size: 0.86rem;
}

.tree-stage {
  position: relative;
  border: 1px solid #d8e0e5;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
}

.tree-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tree-edge {
  fill: none;
  stroke: var(--linie);
  stroke-width: 2.8;
  stroke-linecap: round;
  opacity: 0.78;
}

.tree-edge.is-active {
  stroke: var(--akzent);
  opacity: 0.96;
}

.tree-edge.is-dimmed {
  opacity: 0.3;
  stroke-dasharray: 5 6;
}

.tree-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid var(--linie);
  border-radius: 18px;
  background: var(--node);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(39, 57, 66, 0.08);
  overflow: hidden;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.tree-node.is-flow-focus {
  border-color: var(--akzent);
  box-shadow: 0 0 0 4px rgba(205, 241, 231, 0.95), 0 12px 24px rgba(39, 57, 66, 0.08);
}

.tree-node-active {
  display: grid;
  grid-template-columns: 1fr 68px;
  overflow: hidden;
}

.knoten-inhalt {
  padding: 14px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.knoten-index {
  position: absolute;
  left: 14px;
  bottom: -34px;
  font-size: 1.95rem;
  font-weight: 500;
  color: #2f434f;
  opacity: 0.92;
}

.knoten-side {
  border-left: 2px solid var(--linie);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.06));
}

.knoten-headline {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.knoten-subline {
  margin: 6px 0 12px;
  color: var(--text-sanft);
  font-size: 0.9rem;
}

.knoten-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--akzent);
}

.knoten-inhalt h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.14;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.tree-node-question .knoten-inhalt h2,
.tree-node-result .knoten-inhalt h2 {
  font-size: 1.42rem;
}

.knoten-inhalt p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.4;
  color: var(--text-sanft);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.knoten-hilfe {
  font-size: 0.87rem;
}

.tree-node-option {
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.tree-node-option.is-selected {
  border-color: var(--akzent);
  background: #f3fbf8;
  box-shadow: 0 14px 24px rgba(205, 241, 231, 0.85);
}

.tree-node-option.is-dimmed {
  border-color: #bcc8cf;
  background: #f1f5f7;
  opacity: 0.62;
}

.tree-node-option:hover,
.tree-node-option:focus-visible {
  transform: translate(-50%, -50%) translateY(-2px);
  border-color: var(--akzent);
  box-shadow: 0 14px 24px rgba(205, 241, 231, 0.9);
  outline: none;
}

.tree-node-option.is-dimmed:hover,
.tree-node-option.is-dimmed:focus-visible {
  opacity: 0.78;
}

.tree-node-option-cta {
  background: #eff9f5;
}

.option-text {
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 600;
  color: #2f434f;
  white-space: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.option-verdeckt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7d909b;
}

.neu-start {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #365868;
  font-size: 0.86rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 920px) {
  #app {
    padding: 8px;
  }

  .tree-stage {
    border-radius: 14px;
  }

  .knoten-index {
    font-size: 1.55rem;
    bottom: -28px;
  }

  .knoten-headline {
    font-size: 1.05rem;
  }

  .knoten-inhalt h2 {
    font-size: 1.25rem;
  }

  .tree-node-question .knoten-inhalt h2,
  .tree-node-result .knoten-inhalt h2 {
    font-size: 1.05rem;
  }

  .option-text {
    font-size: 0.9rem;
  }
}
