/* ===== Древо Жизни — рабочая схема (/drevo.html), фаза 1 — added 2026-08-16 ===== */

.drevo-draft-badge {
  margin: 0;
  padding: 4px 10px;
  border: 1px dashed #a78bfa;
  border-radius: 999px;
  color: #a78bfa;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drevo-eyebrow {
  margin: 0 0 10px;
  color: #a78bfa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drevo-lead {
  max-width: 56ch;
  margin: 14px auto 0;
  color: #cbc3e6;
  font-size: 15px;
}

.drevo-stage-section {
  position: relative;
  width: min(1160px, calc(100% - 24px));
  margin: 24px auto 40px;
}

.drevo-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.drevo-btn {
  min-width: 44px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  color: #f1ecff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.drevo-btn:hover {
  background: rgba(139, 92, 246, 0.24);
}

.drevo-btn-wide {
  font-size: 13px;
}

.drevo-stage-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.drevo-list {
  flex: 0 0 300px;
  overflow-y: auto;
  height: 70vh;
  min-height: 460px;
  padding: 16px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 18px;
  background: rgba(20, 18, 31, 0.6);
}

.drevo-list-item {
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.drevo-list-item:hover,
.drevo-list-item.is-active {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.5);
}

.drevo-list-item h4 {
  margin: 0 0 4px;
  color: #f1ecff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 16px;
}

.drevo-list-item.is-open h4::after {
  content: " ?";
  color: #f0b35c;
}

.drevo-list-item p {
  margin: 0;
  color: #cbc3e6;
  font-size: 13px;
  line-height: 1.5;
}

.drevo-viewport {
  position: relative;
  flex: 1 1 auto;
  height: 70vh;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 10%, rgba(139, 92, 246, 0.14), transparent 60%), #05050b;
  cursor: grab;
  touch-action: none;
}

.drevo-viewport.is-dragging {
  cursor: grabbing;
}

.drevo-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 2700px;
  transform-origin: 0% 0%;
  will-change: transform;
}

.drevo-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}

.drevo-node {
  cursor: pointer;
}

.drevo-node circle.drevo-node-dot {
  transition: r 0.15s ease, filter 0.15s ease;
}

.drevo-node:hover circle.drevo-node-dot,
.drevo-node:focus circle.drevo-node-dot {
  filter: brightness(1.3);
}

.drevo-node text {
  fill: #f1ecff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  paint-order: stroke;
  stroke: #05050b;
  stroke-width: 4px;
  pointer-events: none;
}

.drevo-node.is-unknown circle.drevo-node-dot {
  stroke-dasharray: 4 4;
}

.drevo-node.is-unknown text {
  fill: #8f84ad;
}

.drevo-panel {
  margin-top: 14px;
  padding: 20px 24px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  background: rgba(20, 18, 31, 0.7);
  min-height: 88px;
}

.drevo-panel-hint {
  margin: 0;
  color: #8f84ad;
  font-size: 14px;
}

.drevo-panel-title {
  margin: 0 0 8px;
  color: #f1ecff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
}

.drevo-panel-body {
  margin: 0;
  color: #cbc3e6;
  font-size: 15px;
  line-height: 1.6;
}

.drevo-panel-status {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.drevo-panel-status.status-known {
  color: #7ee0a8;
  background: rgba(126, 224, 168, 0.12);
}

.drevo-panel-status.status-open {
  color: #f0b35c;
  background: rgba(240, 179, 92, 0.12);
}

.drevo-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 14px;
}

.drevo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.drevo-table th,
.drevo-table td {
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(139, 92, 246, 0.18);
}

.drevo-table th {
  color: #a78bfa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.1);
}

.drevo-table td {
  color: #e8e4f5;
}

.drevo-table tbody tr:last-child td {
  border-bottom: none;
}

.drevo-table tbody tr:hover td {
  background: rgba(139, 92, 246, 0.08);
}

@media (max-width: 900px) {
  .drevo-stage-row {
    flex-direction: column;
  }

  .drevo-list {
    flex-basis: auto;
    height: 220px;
  }
}

@media (max-width: 720px) {
  .drevo-viewport {
    height: 60vh;
  }

  .drevo-table {
    font-size: 12px;
  }

  .drevo-table th,
  .drevo-table td {
    padding: 8px 10px;
  }
}
