/* Scoped to the infrastructure view; the surrounding Monitoring UI is unchanged. */
.topology {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 36px #1826690a;
  overflow: hidden;
}
.topo-header {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 18px; padding: 25px 27px 21px;
}
.topo-kicker { margin: 0 0 5px; font-size: 11px; font-weight: 750; letter-spacing: .16em; color: var(--brand); }
.topo-header h2 { font-size: clamp(30px, 4vw, 43px); line-height: 1.05; color: var(--brand); }
.topo-header p:not(.topo-kicker) { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.topo-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.topo-freshness { padding: 8px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 650; }
.topo-demo { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
.topo-demo select { border: 1px solid var(--line); border-radius: 9px; padding: 7px 27px 7px 9px; color: var(--text); background: var(--surface); font: inherit; max-width: 100%; }
.topo-map {
  padding: 20px 25px 8px;
  background: radial-gradient(circle at 68% 22%, #e9edfb77, transparent 62%), radial-gradient(#d9dff0 1px, transparent 1px) 0 0 / 17px 17px, #f7f8fd;
  border-block: 1px solid var(--line);
}
.topo-network { position: relative; padding-bottom: 38px; }
.topo-grid { position: relative; display: grid; grid-template-columns: .83fr 1.12fr 1.12fr 1.27fr; gap: clamp(22px, 4vw, 51px); padding-inline-end: 16px; }
.topo-lane { min-width: 0; }
.topo-lane > h3 { margin: 0 0 13px; color: var(--muted); font: 700 10px/1.3 var(--font); letter-spacing: .11em; text-transform: uppercase; }
.topo-stack { display: grid; align-content: start; gap: 13px; }
.topo-lane.edge .topo-stack { margin-top: 100px; }
.topo-lane.hosts .topo-stack { gap: 44px; margin-top: 14px; }
.topo-lane.data .topo-stack { margin-top: 69px; gap: 12px; }
.topo-node {
  --tone: var(--muted);
  --soft: #eef1f7;
  position: relative; z-index: 1; width: 100%; min-width: 0;
  padding: 12px 12px 10px; text-align: left; background: var(--surface);
  border: 1px solid #dce1ef; border-radius: 14px;
  box-shadow: 0 3px 12px #20327809; cursor: pointer;
}
.topo-node:hover { border-color: #a4b2e1; }
.topo-node[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px #283a9722, 0 4px 14px #283a9710; }
.topo-node:focus-visible, .topo-demo select:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.topo-node[data-state="ok"], .topo-legend [data-state="ok"] { --tone: #146b38; --soft: #e6f5ec; }
.topo-node[data-state="warn"], .topo-legend [data-state="warn"] { --tone: #875400; --soft: #fff0c7; }
.topo-node[data-state="bad"], .topo-legend [data-state="bad"] { --tone: #ab302b; --soft: #fce8e6; }
.topo-node[data-state="unknown"], .topo-legend [data-state="unknown"] { --tone: #586781; --soft: #eef1f7; }
.topo-node[data-state="warn"] { border-color: #e8c879; }
.topo-node[data-state="bad"] { border-color: #ecaca7; }
.topo-node-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topo-glyph {
  display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px;
  background: var(--brand-soft); color: var(--brand); border-radius: 9px;
}
.topo-name { display: block; color: #1c2a62; font-size: 14px; font-weight: 750; line-height: 1.2; }
.topo-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.topo-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; max-width: 100%;
  background: var(--soft); color: var(--tone); padding: 3px 7px;
  border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.45;
}
.topo-badge::before, .topo-legend span::before {
  content: ""; display: inline-block; flex: 0 0 6px; width: 6px; height: 6px;
  background: currentColor; border-radius: 50%;
}
[data-state="warn"] > .topo-badge::before, .topo-legend [data-state="warn"]::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
[data-state="bad"] > .topo-badge::before, .topo-legend [data-state="bad"]::before { border-radius: 1px; }
[data-state="unknown"] > .topo-badge::before, .topo-legend [data-state="unknown"]::before { background: transparent; border: 1px solid currentColor; }
.topo-wires { pointer-events: none; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.topo-wires path { fill: none; stroke: #aeb8ce; stroke-width: 1.65; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.topo-wires path[data-state="ok"] { stroke: #5c71bc; stroke-width: 2; }
.topo-wires path[data-state="warn"] { stroke: #c2850c; stroke-width: 2; }
.topo-wires path[data-state="bad"] { stroke: #d14f4a; stroke-width: 2; stroke-dasharray: 3 4; }
.topo-wires path[data-state="unknown"], .topo-wires path[data-secondary="true"] { stroke-dasharray: 4 5; }
.topo-direct { position: absolute; z-index: 1; bottom: 8px; left: 57%; translate: -50% 0; background: #f7f8fd; padding: 0 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.topo-mobile-routes { display: none; }
.topo-storage { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 13px; padding: 16px 0 11px; border-top: 1px solid #dfe4f2; }
.topo-storage .topo-node { min-height: 88px; }
.topo-legend { display: flex; flex-wrap: wrap; gap: 6px 15px; padding: 4px 0 10px; font-size: 10px; }
.topo-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--tone); }
.topo-inspect { padding: 14px 27px 17px; display: grid; grid-template-columns: minmax(138px, .75fr) 2.4fr; align-items: start; gap: 15px; }
.topo-inspect strong { font-size: 13px; color: var(--brand); }
.topo-inspect small { display: block; color: var(--muted); font-size: 10px; }
.topo-inspect p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.55; }
@media (max-width: 850px) {
  .topo-map { padding-inline: 17px; }
  .topo-grid { grid-template-columns: 1fr 1fr; gap: 18px; padding-inline-end: 0; }
  .topo-lane.edge .topo-stack, .topo-lane.hosts .topo-stack, .topo-lane.data .topo-stack { margin-top: 0; gap: 9px; }
  .topo-network { padding-bottom: 14px; }
  .topo-wires, .topo-direct { display: none; }
  .topo-mobile-routes { display: block; color: var(--muted); margin: 14px 0 0; font-size: 11px; line-height: 1.55; }
}
@media (max-width: 510px) {
  .topo-header { padding: 18px 15px; gap: 13px; }
  .topo-map { padding: 14px 11px 5px; }
  .topo-grid { gap: 14px 8px; }
  .topo-lane > h3 { font-size: 9px; letter-spacing: .04em; margin-bottom: 7px; }
  .topo-node { padding: 9px 8px; }
  .topo-glyph { flex-basis: 25px; width: 25px; height: 25px; }
  .topo-glyph .ico { width: 13px; height: 13px; }
  .topo-node-head { gap: 5px; }
  .topo-name { font-size: 12px; }
  .topo-storage { grid-template-columns: 1fr; gap: 7px; }
  .topo-storage .topo-node { min-height: auto; }
  .topo-inspect { padding: 13px 15px; grid-template-columns: 1fr; gap: 5px; }
}
