.test-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-0);
}

.test-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  position: relative;
  z-index: 20;
}

.test-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 5px;
  margin-right: auto;
}

.test-nav .sunburst-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 30;
}

.test-nav .sunburst-link:hover {
  background: var(--bg-2);
}

.test-nav .sunburst-link.active {
  color: var(--fg-0);
  border-color: var(--fg-2);
  background: var(--bg-2);
}

.test-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 12px;
}

.test-limit select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-0);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 3px;
}

.test-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 24px;
  min-height: 0;
}

.test-summary {
  width: 100%;
  max-width: 960px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.3px;
}

.test-chart-wrap {
  flex: 1;
  width: 100%;
  max-width: 960px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-0);
  border: none;
  border-radius: 8px;
  padding: 16px 12px 12px;
}

.sunburst-chart {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.sunburst-chart svg {
  max-width: 100%;
  max-height: 100%;
  height: auto;
}


/* Legend */
.sunburst-legend-host {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.sunburst-legend {
  display: flex;
  gap: 16px;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-1);
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.test-hint {
  margin: 12px 0 0;
  max-width: 960px;
  width: 100%;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-2);
  text-align: center;
  line-height: 1.5;
}

.page-hint {
  position: fixed;
  top: 56px;
  right: 20px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-2);
  letter-spacing: 0.3px;
  z-index: 10;
  pointer-events: none;
}

/* Orbit cards - positioned around the sunburst */
.orbit-cards {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.orbit-card {
  position: absolute;
  width: 200px;
  padding: 14px 16px;
  background: rgba(10, 13, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-family: var(--mono);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.orbit-card.visible {
  opacity: 1;
}

.orbit-card--threat {
  top: 50%;
  right: calc(50% - 560px);
  transform: translateY(-90%);
}

.orbit-card--probability {
  top: 50%;
  right: calc(50% - 540px);
  transform: translateY(60%);
}

.orbit-card--people {
  top: 50%;
  left: calc(50% - 560px);
  transform: translateY(-50%);
}

.threat-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-0);
  margin-bottom: 4px;
}

.threat-danger {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.threat-low { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.threat-medium { background: rgba(250, 204, 21, 0.2); color: #fbbf24; }
.threat-high { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.threat-critical { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.threat-mitigation {
  font-size: 10px;
  color: var(--fg-2);
  line-height: 1.4;
}

.probability-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-2);
  margin-bottom: 4px;
}

.probability-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-0);
}

/* People card */
.people-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-2);
  margin-bottom: 8px;
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.person-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.person-avatar--internal { background: #3b82f6; }
.person-avatar--external { background: #8b5cf6; }

.person-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.person-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-role {
  font-size: 9px;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
