:root {
  color-scheme: dark;
  --bg: #030910;
  --bg-2: #06131b;
  --panel: rgba(13, 22, 36, 0.84);
  --panel-strong: rgba(18, 29, 46, 0.92);
  --panel-soft: rgba(24, 38, 58, 0.78);
  --ink: #eef5ff;
  --muted: #99a9bd;
  --line: rgba(91, 128, 169, 0.26);
  --line-strong: rgba(92, 151, 205, 0.42);
  --green: #37d7be;
  --green-soft: rgba(45, 212, 191, 0.14);
  --amber: #ff8b22;
  --amber-soft: rgba(255, 139, 34, 0.14);
  --coral: #ef6b5b;
  --coral-soft: rgba(239, 107, 91, 0.14);
  --violet: #8b6ccf;
  --blue: #2f7df5;
  --cyan: #18c8f4;
  --steel: #7d8797;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(2, 6, 11, 0.82) 0%, rgba(2, 6, 11, 0.72) 46%, rgba(2, 6, 11, 0.9) 100%),
    radial-gradient(circle at 18% -8%, rgba(28, 130, 120, 0.28), transparent 28rem),
    radial-gradient(circle at 86% 8%, rgba(26, 84, 164, 0.24), transparent 30rem),
    image-set(url("background.avif") type("image/avif"), url("background.jpg") type("image/jpeg")) center / cover fixed no-repeat,
    linear-gradient(180deg, #06141b 0%, #03070d 42%, #02060b 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.15));
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 10px 8px 42px;
}

.floating-copyright {
  position: fixed;
  left: 50%;
  bottom: 8px;
  z-index: 80;
  transform: translateX(-50%);
  min-height: 28px;
  max-width: calc(100vw - 32px);
  padding: 0 14px;
  border: 1px solid rgba(55, 215, 190, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(7, 22, 34, 0.92), rgba(9, 25, 44, 0.9)),
    rgba(7, 13, 24, 0.88);
  color: #dcecff;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.36),
    0 0 22px rgba(55, 215, 190, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: default;
  font: 800 0.74rem/1 Inter, "Segoe UI", sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.topbar {
  position: sticky;
  top: 6px;
  z-index: 95;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto 8px;
  max-width: none;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(7, 14, 28, 0.98), rgba(8, 34, 58, 0.92)),
    rgba(6, 13, 25, 0.92);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 50%;
  width: 132px;
  height: 64px;
  transform: translateY(-50%);
  background: url("../bk_branca.png") center / contain no-repeat;
  opacity: 0.08;
  filter: grayscale(1);
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.back-to-tcoptics {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(55, 215, 190, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(55, 215, 190, 0.18), rgba(47, 125, 245, 0.2)),
    rgba(7, 13, 24, 0.82);
  color: #dffefa;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow:
    0 18px 38px rgba(24, 139, 245, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  opacity: 0.94;
  backdrop-filter: blur(14px);
}

.back-to-tcoptics:hover {
  color: #fff;
  border-color: rgba(55, 215, 190, 0.58);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  opacity: 1;
}

.title-block {
  min-width: 0;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-logo {
  width: clamp(42px, 4vw, 64px);
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.32));
}

.title-row picture {
  display: contents;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.05vw, 2.25rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.top-actions,
.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 13, 24, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.panel-header .top-actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.icon-button,
.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button {
  min-width: 42px;
  padding: 0 10px;
  font-weight: 800;
}

.segmented-control button {
  padding: 0 14px;
  font-weight: 750;
}

.icon-button:hover,
.segmented-control button:hover {
  color: #fff;
  background: rgba(47, 125, 245, 0.18);
}

.icon-button.is-active,
.segmented-control button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(24, 139, 245, 0.28);
}

.top-subtitle {
  max-width: 820px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.8fr) minmax(320px, 0.95fr);
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.simulator-panel {
  grid-column: 1 / -1;
}

.left-rail,
.right-rail {
  display: grid;
  gap: 12px;
  align-content: start;
}

.left-rail {
  grid-column: 1;
}

.right-rail {
  grid-column: 2 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.control-panel {
  grid-column: 1 / -1;
}

.score-panel {
  grid-column: 1;
  grid-row: 2;
}

.classic-panel {
  grid-column: 3;
  grid-row: 2;
}

.coverage-panel {
  grid-column: 2;
  grid-row: 2;
}

.security-panel {
  grid-column: 1 / -1;
}

.control-panel label {
  align-items: end;
}

@media (min-width: 1181px) {
  .right-rail > .score-panel,
  .right-rail > .classic-panel,
  .right-rail > .coverage-panel {
    align-self: stretch;
  }

  .right-rail > .classic-panel ul {
    grid-template-columns: 1fr;
  }

  .right-rail > .coverage-panel .coverage-map {
    grid-template-columns: 1fr;
  }

  .right-rail > .coverage-panel .coverage-map span:first-child {
    grid-row: auto;
    min-height: 42px;
  }

  .right-rail > .coverage-panel .coverage-map i {
    display: none;
  }

  .control-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 18px;
    align-items: end;
  }

  .control-panel h2 {
    grid-column: 1 / -1;
  }

  .control-panel .scenario-source {
    grid-column: 1 / -1;
  }

  .control-panel label {
    margin-top: 0;
  }
}

.score-panel,
.classic-panel,
.coverage-panel,
.security-panel {
  min-width: 0;
}

.metric-panel,
.simulator-panel,
.control-panel,
.security-panel,
.classic-panel,
.coverage-panel,
.score-panel,
.comparison-band,
.analytics-band,
.multiplier-band,
.executive-summary,
.chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 27, 43, 0.92), rgba(7, 13, 24, 0.9)),
    var(--panel);
  box-shadow: var(--shadow);
}

.metric-panel {
  min-height: 132px;
  padding: 18px;
  border-left: 6px solid var(--green);
}

.metric-panel span,
.comparison-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric-panel strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 2.2rem;
  line-height: 1;
}

.metric-panel small {
  color: var(--muted);
  line-height: 1.35;
}

.accent-amber {
  border-left-color: var(--amber);
}

.accent-coral {
  border-left-color: var(--coral);
}

.accent-blue {
  border-left-color: var(--blue);
}

.control-panel,
.security-panel,
.classic-panel,
.score-panel,
.coverage-panel {
  padding: 16px;
}

.simulator-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100dvh - 158px);
  min-height: 520px;
  overflow: hidden;
}

.panel-header,
.band-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.topology-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  background:
    radial-gradient(circle at 15% 18%, rgba(55, 215, 190, 0.13), transparent 22rem),
    radial-gradient(circle at 86% 10%, rgba(47, 125, 245, 0.13), transparent 24rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(3, 9, 16, 0.92);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px, 100% 100%;
}

.topology-stage::before,
.topology-stage::after {
  position: absolute;
  inset: 7% auto auto 4%;
  z-index: 0;
  width: 34%;
  height: 78%;
  border: 1px dashed rgba(40, 110, 158, 0.36);
  border-radius: 8px;
  background: rgba(40, 110, 158, 0.05);
  content: "";
  pointer-events: none;
}

.topology-stage::after {
  inset: 12% 4% auto auto;
  width: 43%;
  height: 76%;
  border-color: rgba(22, 128, 101, 0.34);
  background: rgba(22, 128, 101, 0.04);
}

body[data-scenario="classic"] .topology-stage::before,
body[data-scenario="classic"] .topology-stage::after {
  display: none;
}

#topologyCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.device-label {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 6px;
  background: rgba(7, 14, 27, 0.9);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  pointer-events: none;
}

.space-tag {
  position: absolute;
  z-index: 2;
  max-width: 190px;
  padding: 7px 9px;
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 8px;
  background: rgba(7, 14, 27, 0.9);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 780;
  line-height: 1.25;
  pointer-events: none;
}

.space-tag b {
  color: var(--ink);
}

.remote-room {
  display: none;
  top: 6.5%;
  left: 38%;
  transform: translateX(-50%);
}

.campus-tag {
  top: 4%;
  right: 4%;
}

.building-a {
  top: 15%;
  right: 13%;
}

.building-b {
  top: 41%;
  right: 13%;
}

.building-c {
  top: 67%;
  right: 13%;
  bottom: auto;
}

.classic-ethernet-tag {
  top: 2.5%;
  left: 3%;
  max-width: 240px;
  border-color: rgba(185, 120, 18, 0.36);
  background: rgba(47, 31, 15, 0.92);
}

.classic-rooms-tag {
  right: 3%;
  bottom: 3%;
  max-width: 230px;
  border-color: rgba(201, 79, 61, 0.3);
  background: rgba(47, 20, 19, 0.92);
}

.fiber-desk {
  top: 35%;
  right: 32%;
  border-color: rgba(22, 128, 101, 0.28);
  background: rgba(10, 43, 39, 0.92);
}

.redundancy-tag {
  left: 35%;
  bottom: 5%;
  border-color: rgba(185, 120, 18, 0.32);
  background: rgba(45, 29, 10, 0.92);
}

body[data-scenario="classic"] .redundancy-tag,
body[data-scenario="classic"] .fiber-desk,
body[data-scenario="classic"] .remote-room,
body[data-scenario="classic"] .campus-tag,
body[data-scenario="classic"] .building-a,
body[data-scenario="classic"] .building-b,
body[data-scenario="classic"] .building-c,
body[data-scenario="classic"] .classic-ethernet-tag {
  display: none;
}

.firewall-label {
  display: none;
  top: 29%;
  left: 38%;
  transform: translateX(-50%);
}

.olt-label {
  display: none;
  top: 71%;
  left: 38%;
  transform: translateX(-50%);
}

.splitter-label {
  top: 39%;
  left: 49%;
}

.switch-label {
  display: none;
  top: 32%;
  left: 51%;
}

.room-label {
  display: none;
  top: 66%;
  left: 34%;
}

.pc-a-label,
.pc-b-label,
.pc-c-label,
.classic-ethernet-tag,
.classic-rooms-tag {
  display: none;
}

body[data-scenario="classic"] .olt-label,
body[data-scenario="classic"] .splitter-label,
body[data-scenario="classic"] .firewall-label,
body[data-scenario="classic"] .cloud-label,
body[data-scenario="classic"] .onu-a-label,
body[data-scenario="classic"] .onu-b-label,
body[data-scenario="classic"] .onu-c-label {
  display: none;
}

body[data-scenario="classic"] .classic-rooms-tag {
  display: block;
}

.cloud-label {
  top: 8%;
  left: 42%;
}

.onu-a-label {
  right: 5%;
  top: 24%;
}

.onu-b-label {
  right: 5%;
  top: 50%;
}

.onu-c-label {
  right: 5%;
  top: 76%;
  bottom: auto;
}

.pc-a-label {
  right: 14%;
  top: 34%;
}

.pc-b-label {
  right: 9%;
  top: 61%;
}

.pc-c-label {
  right: 22%;
  bottom: 18%;
}

.story-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.story-strip span {
  min-height: 42px;
  display: grid;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(6, 14, 27, 0.76);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.story-strip span.is-active {
  color: #fff;
  background: var(--green);
}

.control-panel label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 12px;
  margin-top: 16px;
}

.scenario-source {
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(55, 215, 190, 0.2);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.08);
  color: #bfeee7;
  font-size: 0.76rem;
  font-weight: 820;
}

.control-panel label span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.control-panel label b {
  font-size: 0.88rem;
}

.control-panel input {
  grid-column: span 2;
  width: 100%;
  accent-color: var(--green);
}

.score-panel {
  background: linear-gradient(180deg, rgba(17, 27, 43, 0.94), rgba(7, 13, 24, 0.92));
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  margin-top: 9px;
  padding: 0 10px;
  border: 1px solid rgba(22, 128, 101, 0.18);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.score-row strong {
  color: #92fff0;
  white-space: nowrap;
}

.policy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 760;
}

.security-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: rgba(55, 215, 190, 0.34);
  background:
    linear-gradient(120deg, rgba(55, 215, 190, 0.14), rgba(47, 125, 245, 0.09) 48%, rgba(7, 13, 24, 0.92)),
    rgba(9, 18, 32, 0.96);
}

.security-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--amber));
}

.security-dashboard {
  display: grid;
  grid-template-columns: minmax(360px, 0.48fr) minmax(0, 1.52fr);
  gap: 12px;
  padding: 14px 14px 10px;
}

.security-hero {
  display: grid;
  align-content: start;
  min-height: 148px;
  padding: 16px;
  border: 1px solid rgba(55, 215, 190, 0.24);
  border-radius: 8px;
  background: rgba(4, 11, 22, 0.72);
}

.security-hero span {
  color: #89fff0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.security-hero h2 {
  max-width: 460px;
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(1.35rem, 1.55vw, 1.95rem);
  line-height: 1.02;
}

.security-hero p {
  max-width: 520px;
  margin: 10px 0 0;
  color: #c2d0e2;
  font-size: 0.82rem;
  line-height: 1.34;
}

.security-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.security-kpis strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 22, 39, 0.9);
  color: #dcecff;
  font-size: 0.72rem;
  line-height: 1.15;
}

.security-kpis em {
  color: var(--green);
  font-size: 1.45rem;
  font-style: normal;
  font-weight: 950;
}

.lock-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 10px;
}

.lock-grid figure {
  display: grid;
  place-items: stretch;
  min-height: 0;
  aspect-ratio: 1777 / 1024;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(55, 215, 190, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 40, 68, 0.98), rgba(7, 16, 30, 0.94)),
    rgba(7, 13, 24, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.lock-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.security-image-card {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.security-image-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.security-image-card:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}

.security-image-card:hover img {
  filter: brightness(1.08) saturate(1.08);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 32px 36px;
  background: rgba(1, 5, 11, 0.88);
  backdrop-filter: blur(12px);
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox img {
  display: block;
  max-width: min(96vw, 1680px);
  max-height: 86vh;
  border: 1px solid rgba(55, 215, 190, 0.42);
  border-radius: 10px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(91, 128, 169, 0.48);
  border-radius: 8px;
  background: rgba(7, 13, 24, 0.94);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(55, 215, 190, 0.18);
}

body.lightbox-open {
  overflow: hidden;
}

.policy-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 12px;
  margin-top: 0;
}

.policy-matrix .policy-row {
  min-height: 34px;
  margin-top: 0;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.policy-matrix .policy-row strong {
  padding: 5px 8px;
  font-size: 0.68rem;
}

.policy-row strong {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.status-pass {
  color: #92fff0;
  background: var(--green-soft);
}

.status-block {
  color: #ffb4a9;
  background: var(--coral-soft);
}

.status-watch {
  color: #ffd1aa;
  background: var(--amber-soft);
}

.classic-panel ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.classic-panel li {
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 0 10px 0 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 139, 34, 0.11);
  color: #ffd1aa;
  font-size: 0.8rem;
  font-weight: 800;
  position: relative;
}

.classic-panel li::before {
  position: absolute;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.coverage-panel p,
.chart-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
}

.coverage-map {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) 26px minmax(260px, 1.4fr);
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.coverage-map span {
  min-height: 38px;
  display: grid;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 14, 27, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.coverage-map span:first-child {
  grid-row: span 3;
  min-height: 154px;
  color: var(--ink);
  background: rgba(47, 125, 245, 0.14);
  border-color: rgba(40, 110, 158, 0.28);
}

.coverage-map i {
  grid-row: span 3;
  width: 26px;
  height: 154px;
  border-top: 3px solid var(--green);
  border-bottom: 3px dashed var(--amber);
}

.comparison-band {
  grid-column: 1 / -1;
  overflow: hidden;
}

.multiplier-band,
.executive-summary {
  grid-column: 1 / -1;
  overflow: hidden;
}

.analytics-band {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  align-items: stretch;
}

.band-header strong {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.multiplier-grid,
.decision-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.comparison-grid article,
.multiplier-grid article,
.decision-grid article {
  min-height: 154px;
  padding: 18px;
  background: rgba(7, 13, 24, 0.92);
}

.comparison-grid b,
.multiplier-grid b {
  display: block;
  margin: 8px 0;
  font-size: 1.05rem;
}

.comparison-grid p,
.multiplier-grid p,
.decision-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.multiplier-grid span,
.decision-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.decision-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 1.05rem;
}

.executive-summary {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr);
  gap: 1px;
  background: var(--line);
}

.summary-copy {
  padding: 20px;
  background: rgba(7, 13, 24, 0.92);
}

.summary-copy h2 {
  max-width: 620px;
  font-size: 1.25rem;
}

.summary-copy p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.chart-card {
  min-height: 168px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(7, 13, 24, 0.92);
}

.chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-title span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.chart-title strong {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.14);
  color: #92fff0;
  font-size: 0.82rem;
}

.bar-chart {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.bar-row span,
.bar-row b {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.bar-track {
  height: 22px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(100, 130, 164, 0.18);
}

.bar-track i {
  display: block;
  width: var(--bar, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-color, var(--green)), rgba(255, 255, 255, 0.36));
  transition: width 680ms ease;
}

#classicTcoBar {
  --bar-color: var(--coral);
}

#polTcoBar {
  --bar-color: var(--green);
}

.donut {
  position: relative;
  display: grid;
  width: min(112px, 46vw);
  aspect-ratio: 1;
  place-items: center;
  margin: 12px auto 0;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--donut, 61%), rgba(100, 130, 164, 0.18) 0);
  transition: background 680ms ease;
}

.donut::after {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: #08111f;
  content: "";
}

.donut b {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
}

.availability-chart {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.carbon-impact {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 72px;
}

.carbon-card {
  position: relative;
  min-height: 168px;
}

.carbon-card p {
  width: 100%;
}

.carbon-row {
  display: grid;
  grid-template-columns: 126px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
}

.carbon-row span {
  color: var(--ink);
  font-weight: 850;
}

.carbon-row i {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 130, 164, 0.18);
}

.carbon-row i::before {
  position: absolute;
  inset: 0;
  width: var(--carbon, 68%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), rgba(55, 215, 190, 0.58));
  content: "";
}

.carbon-row.secondary i::before {
  width: 54%;
  background: linear-gradient(90deg, var(--blue), rgba(47, 125, 245, 0.58));
}

.carbon-row.passive i::before {
  width: 78%;
  background: linear-gradient(90deg, var(--amber), rgba(255, 139, 34, 0.54));
}

.path {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 10px;
  align-items: center;
}

.path span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.path i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(100, 130, 164, 0.18);
}

.path i::after {
  position: absolute;
  inset: 0;
  width: 38%;
  border-radius: inherit;
  background: var(--green);
  animation: pulsePath 2.2s linear infinite;
  content: "";
}

.path.backup i {
  border: 1px dashed rgba(185, 120, 18, 0.75);
  background: rgba(255, 139, 34, 0.08);
}

.path.backup i::after {
  background: var(--amber);
  animation-delay: 0.7s;
}

@keyframes pulsePath {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(280%);
  }
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .simulator-panel,
  .left-rail,
  .comparison-band,
  .multiplier-band,
  .executive-summary {
    grid-column: 1 / -1;
  }

  .left-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
  }

  .control-panel {
    grid-column: 1 / -1;
  }

  .score-panel,
  .classic-panel,
  .coverage-panel,
  .security-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .security-panel {
    grid-column: 1 / -1;
  }

  .security-dashboard {
    grid-template-columns: 1fr;
  }

  .lock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-matrix {
    grid-template-columns: 1fr;
  }

  .coverage-map {
    grid-template-columns: 1fr;
  }

  .coverage-map span:first-child {
    grid-row: auto;
    min-height: 42px;
  }

  .coverage-map i {
    display: none;
  }

  .analytics-band,
  .multiplier-grid,
  .decision-grid,
  .executive-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .app-shell {
    padding: 12px 12px 72px;
  }

  .carbon-card {
    min-height: auto;
  }

  .carbon-impact,
  .carbon-card p {
    width: 100%;
  }

  .carbon-impact {
    margin-top: 18px;
  }

  .topbar,
  .panel-header,
  .band-header {
    align-items: stretch;
    flex-direction: column;
  }

  .back-to-tcoptics {
    position: static;
    width: 100%;
    transform: none;
  }

  .dashboard,
  .left-rail,
  .right-rail,
  .comparison-grid,
  .analytics-band,
  .multiplier-grid,
  .decision-grid,
  .executive-summary {
    grid-template-columns: 1fr;
  }

  .control-panel,
  .coverage-panel,
  .score-panel,
  .classic-panel,
  .security-panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .lock-grid,
  .security-kpis {
    grid-template-columns: 1fr;
  }

  .story-strip {
    grid-template-columns: 1fr 1fr;
  }

  .title-line {
    align-items: flex-start;
  }

  .title-logo {
    width: 52px;
  }

  .top-actions {
    width: 100%;
    justify-content: center;
  }

  .panel-header .top-actions {
    margin-left: 0;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
    padding-inline: 8px;
  }

  .topology-stage,
  #topologyCanvas {
    min-height: 420px;
  }

  .space-tag {
    max-width: 150px;
    font-size: 0.67rem;
  }

  .remote-room {
    top: 6%;
    left: 38%;
  }

  .campus-tag {
    top: 2%;
    right: 3%;
  }
}

@media (max-width: 520px) {
  .floating-copyright {
    width: calc(100vw - 24px);
    padding-inline: 10px;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .story-strip {
    grid-template-columns: 1fr;
  }

  .device-label {
    font-size: 0.68rem;
    padding: 4px 6px;
  }
}

/* TCOPTICS dark theme alignment */
.simulator-panel {
  order: -1;
}

.metric-panel,
.control-panel,
.security-panel,
.classic-panel,
.coverage-panel,
.score-panel {
  background:
    linear-gradient(180deg, rgba(17, 27, 43, 0.92), rgba(7, 13, 24, 0.9)),
    rgba(10, 18, 31, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.simulator-panel {
  background:
    radial-gradient(circle at 88% 12%, rgba(47, 125, 245, 0.13), transparent 28rem),
    linear-gradient(180deg, rgba(17, 27, 43, 0.95), rgba(4, 10, 20, 0.94));
  border-color: var(--line-strong);
}

.metric-panel strong,
.band-header strong,
.comparison-grid b,
.multiplier-grid b,
.decision-grid strong,
.summary-copy h2,
.panel-header h2,
.classic-panel h2,
.score-panel h2,
.coverage-panel h2,
.control-panel h2,
.security-panel h2 {
  color: #ffffff;
}

.metric-panel span,
.comparison-grid span,
.multiplier-grid span,
.decision-grid span,
.control-panel label span,
.chart-title span,
.bar-row span,
.bar-row b,
.path span {
  color: #b4c2d6;
}

.panel-header,
.band-header,
.story-strip {
  border-color: var(--line);
}

.comparison-band,
.analytics-band,
.multiplier-band,
.executive-summary {
  border-color: var(--line);
  background: var(--line);
}

.summary-copy,
.comparison-grid article,
.multiplier-grid article,
.decision-grid article,
.chart-card {
  background:
    linear-gradient(180deg, rgba(17, 27, 43, 0.9), rgba(7, 13, 24, 0.9)),
    rgba(10, 18, 31, 0.88);
}

.band-header strong {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(24, 139, 245, 0.28);
}

.dashboard > .analytics-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: transparent;
}

.analytics-band .chart-card {
  position: relative;
  min-height: 0;
  padding: 0;
  aspect-ratio: 1680 / 930;
  border: 1px solid rgba(55, 215, 190, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 12%, rgba(55, 215, 190, 0.18), transparent 16rem),
    radial-gradient(circle at 16% 88%, rgba(47, 125, 245, 0.12), transparent 18rem),
    linear-gradient(180deg, rgba(10, 24, 43, 0.96), rgba(4, 10, 21, 0.94));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.analytics-band .chart-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 10, 21, 0.02), rgba(4, 10, 21, 0.08)),
    var(--eco-art) center / 100% 100% no-repeat;
  opacity: 1;
  filter: saturate(1.04);
}

.analytics-band .chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--amber));
}

.tco-card {
  --eco-art: image-set(url("tco.avif") type("image/avif"), url("tco.png") type("image/png"));
}

.energy-card {
  --eco-art: image-set(url("energia.avif") type("image/avif"), url("energia.png") type("image/png"));
}

.carbon-card {
  --eco-art: image-set(url("co2.avif") type("image/avif"), url("co2.png") type("image/png"));
}

.analytics-band .chart-title {
  position: static;
  z-index: 3;
}

.analytics-band .chart-title span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.analytics-band .chart-title strong {
  position: absolute;
  top: 8.5%;
  right: 5.2%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24.7%;
  height: 14.2%;
  padding: 0 10px;
  line-height: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #92fff0;
  font-size: clamp(0.8rem, 1.36vw, 1.15rem);
  font-weight: 950;
  text-align: center;
  text-shadow: 0 0 14px rgba(55, 215, 190, 0.46);
  box-shadow: none;
}

.energy-card .chart-title strong {
  top: 7.7%;
  right: 5.8%;
  width: 24%;
  transform: translateY(-1px);
}

.carbon-card .chart-title strong {
  top: 7.7%;
  right: 5.8%;
  width: 24%;
  transform: translateY(-1px);
}

.analytics-band .bar-chart {
  position: absolute;
  top: 35.2%;
  right: 4.6%;
  left: 29.2%;
  z-index: 3;
  display: grid;
  height: 24.8%;
  align-content: space-between;
  gap: 0;
  margin-top: 0;
}

.analytics-band .donut {
  z-index: 3;
}

.analytics-band .bar-row {
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
}

.analytics-band .bar-row b {
  color: #e8f7ff;
  font-size: clamp(0.68rem, 1vw, 0.92rem);
  font-weight: 950;
  text-align: right;
  text-shadow: 0 0 10px rgba(69, 202, 255, 0.42);
}

.analytics-band .bar-row span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.analytics-band .bar-track {
  height: clamp(13px, 3.15vw, 25px);
  border: 1px solid rgba(91, 128, 169, 0.2);
  border-radius: 999px;
  background: rgba(8, 20, 36, 0.72);
  box-shadow:
    inset 0 1px 8px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(69, 202, 255, 0.08);
}

.analytics-band .bar-track i {
  box-shadow:
    0 0 18px rgba(55, 215, 190, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.analytics-band .donut {
  position: absolute;
  top: 46%;
  left: 50.2%;
  width: 21.8%;
  margin-top: 0;
  transform: translate(-50%, -50%);
  background:
    conic-gradient(var(--green) var(--donut, 61%), rgba(100, 130, 164, 0.18) 0);
  box-shadow:
    0 0 44px rgba(55, 215, 190, 0.34),
    inset 0 0 0 7px rgba(69, 202, 255, 0.08);
}

.analytics-band .donut::after {
  inset: 27%;
  background:
    radial-gradient(circle, rgba(17, 34, 55, 0.98), rgba(5, 14, 27, 0.98));
}

.analytics-band .donut b {
  color: #fff;
  font-size: clamp(1.1rem, 2.6vw, 2.7rem);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.24);
}

.analytics-band .chart-card p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.analytics-band .carbon-impact {
  position: absolute;
  top: 35.5%;
  left: 26.4%;
  z-index: 3;
  display: grid;
  width: 47.4%;
  height: 29.5%;
  align-content: space-between;
  gap: 0;
  margin-top: 0;
}

.analytics-band .carbon-row {
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

.analytics-band .carbon-row b {
  color: #f1f7ff;
  font-size: clamp(0.68rem, 1vw, 0.92rem);
  font-weight: 950;
  text-align: left;
  text-shadow: 0 0 10px rgba(69, 202, 255, 0.42);
}

.analytics-band .carbon-row span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.analytics-band .carbon-row i {
  height: clamp(13px, 3vw, 24px);
  border: 1px solid rgba(69, 202, 255, 0.12);
  border-radius: 999px;
  background: rgba(8, 20, 36, 0.64);
  box-shadow:
    inset 0 1px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(69, 202, 255, 0.05);
}

.analytics-band .carbon-row i::before {
  width: var(--carbon, 68%);
  transition: width 680ms ease;
}

.analytics-band .carbon-row.secondary i::before {
  width: var(--carbon, 54%);
}

.analytics-band .carbon-row.passive i::before {
  width: var(--carbon, 78%);
}

.analytics-band .carbon-card p {
  max-width: 92%;
}

/* Responsive/performance pass - 2026-05-25
   Keeps the approved topology composition while making the stage adapt better
   to short projectors, notebooks and ultrawide displays. */
@media (min-width: 1181px) {
  .app-header {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .app-shell {
    padding-inline: clamp(6px, 0.6vw, 10px);
  }

  .dashboard {
    gap: clamp(8px, 0.72vw, 14px);
  }

  .simulator-panel {
    height: calc(100svh - clamp(126px, 14svh, 168px));
    min-height: min(520px, calc(100svh - 146px));
  }
}

@media (max-width: 1440px) and (min-width: 1181px) {
  .control-panel {
    gap: 8px 12px;
  }

  .simulator-panel {
    height: calc(100svh - 138px);
  }

  .security-dashboard {
    grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1.58fr);
  }
}

@media (max-height: 820px) and (min-width: 1181px) {
  .app-shell {
    padding-top: 6px;
  }

  .topbar,
  .scenario-bar {
    padding-block: 8px;
  }

  .simulator-panel {
    height: calc(100svh - 124px);
    min-height: 430px;
  }

  .segmented-control button {
    min-height: 32px;
    padding-inline: 12px;
  }
}

@media (max-width: 760px) {
  .app-header {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .simulator-panel {
    min-height: 460px;
  }
}

@supports (content-visibility: auto) {
  .security-panel,
  .comparison-band,
  .analytics-band,
  .multiplier-band,
  .executive-summary {
    content-visibility: auto;
    contain-intrinsic-size: 520px;
  }
}

input[type="range"] {
  accent-color: var(--green);
}
