

/* =========================================
   Performance Standards — Modern Diagram
   Responsive: stacks on tablet + mobile
   Colorful icons: safe (won’t blow up size)
   ========================================= */

.perf-diagram__canvas {
  --bg: rgba(255, 255, 255, 0.7);
  --stroke: rgba(0, 0, 0, 0.12);
  --hdr: rgba(245, 246, 248, 0.98);
  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.62);

  /* Theme accents (tweak to match your site) */
  --accent-a: #6d5efc; /* violet */
  --accent-b: #22c55e; /* green */
  --accent-c: #06b6d4; /* cyan */
  --accent-d: #f97316; /* orange */

  padding: 18px 18px 54px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: var(--bg);
  position: relative;
  overflow: hidden;

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 14px 14px;
  align-items: stretch;
}

.perf-diagram__title {
  grid-column: 1 / -1;
  grid-row: 1;
  text-align: center;
  padding: 10px 12px 16px;
}

.perf-diagram__title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}

.perf-diagram__title p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* Cards */
.perf-node {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  position: relative;
}

.perf-node__icon {
  /* Hard-locked sizing (prevents “huge icon” issues) */
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;

  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  display: grid;
  place-items: center;

  /* SVG uses currentColor for stroke */
  color: rgba(11, 16, 32, 0.9);

  position: relative;
  overflow: hidden;
  background: var(--hdr);
}

.perf-ico {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
}

.perf-node__kicker {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 2px;
}

.perf-node__heading {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.perf-node__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 26px;
  border-radius: 999px;
  opacity: 0.9;
}

.perf-node__list {
  margin: 0;
  padding-left: 18px;
  color: rgba(0, 0, 0, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.perf-node__list li {
  margin: 6px 0;
}

/* Placement (desktop) */
.perf-node--targets { grid-column: 1; grid-row: 2; }
.perf-node--measurement { grid-column: 2; grid-row: 2; }
.perf-node--monitoring { grid-column: 1; grid-row: 3; }
.perf-node--gates { grid-column: 2; grid-row: 3; }

/* Decorative connector lines (desktop only) */
.perf-diagram__lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}

.perf-line {
  fill: none;
  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 6 10;
}
.perf-line--alt {
  stroke: rgba(0, 0, 0, 0.12);
}

/* Bottom badge */
.perf-diagram__badge {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);

  display: flex;
  gap: 10px;
  align-items: center;

  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.perf-pill {
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.78);
  white-space: nowrap;
}

.perf-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

/* Colorful icon tiles + matching heading underline */
.perf-node--targets .perf-node__icon {
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.18), rgba(6, 182, 212, 0.18));
}
.perf-node--measurement .perf-node__icon {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(34, 197, 94, 0.16));
}
.perf-node--monitoring .perf-node__icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(249, 115, 22, 0.14));
}
.perf-node--gates .perf-node__icon {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(109, 94, 252, 0.16));
}

/* Small status dot in icon tile */
.perf-node__icon::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}
.perf-node--targets .perf-node__icon::after { background: var(--accent-a); }
.perf-node--measurement .perf-node__icon::after { background: var(--accent-c); }
.perf-node--monitoring .perf-node__icon::after { background: var(--accent-b); }
.perf-node--gates .perf-node__icon::after { background: var(--accent-d); }

.perf-node--targets .perf-node__heading::after { background: var(--accent-a); }
.perf-node--measurement .perf-node__heading::after { background: var(--accent-c); }
.perf-node--monitoring .perf-node__heading::after { background: var(--accent-b); }
.perf-node--gates .perf-node__heading::after { background: var(--accent-d); }

/* ✅ Tablet + Mobile: stack into a single column */
@media (max-width: 1024px) {
  .perf-diagram__canvas {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 16px 14px 18px;
  }

  .perf-node--targets,
  .perf-node--measurement,
  .perf-node--monitoring,
  .perf-node--gates {
    grid-column: 1;
    grid-row: auto;
  }

  .perf-diagram__lines { display: none; }

  .perf-diagram__badge {
    position: static;
    transform: none;
    margin: 8px auto 0;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Mobile refinements */
@media (max-width: 520px) {
  .perf-node { grid-template-columns: 42px 1fr; padding: 12px; }
  .perf-node__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
  }
  .perf-ico { width: 22px; height: 22px; }
  .perf-node__list { font-size: 12.5px; }
  .perf-diagram__title h3 { font-size: 20px; }
}
