/* ==========================================================
   NETWORK RESCUE — INTERACTIVE LAB
   ========================================================== */

.nr-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.08), transparent 28%),
    radial-gradient(circle at 15% 80%, rgba(56, 189, 248, 0.08), transparent 26%),
    var(--bg);
}

.nr-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
}

.nr-section > .container {
  position: relative;
  z-index: 1;
}

.nr-heading {
  margin-bottom: 38px;
}

.nr-app {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(13, 21, 36, 0.98), rgba(7, 12, 22, 0.99));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

.nr-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.018);
}

.nr-topbar > div:first-child {
  min-width: 0;
}

.nr-kicker,
.nr-panel-label,
.nr-device-card span,
.nr-objective span {
  display: block;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nr-topbar strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
}

.nr-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nr-progress-dot {
  width: 28px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, width 0.2s ease;
}

.nr-progress-dot.is-active,
.nr-progress-dot.is-complete {
  background: var(--accent);
}

.nr-progress-dot.is-active {
  width: 42px;
}

.nr-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  min-height: 430px;
}

.nr-incident-panel {
  padding: 30px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.nr-incident-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8d9caf;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nr-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 0 5px rgba(251, 113, 133, 0.08);
}

.nr-incident-panel h3 {
  margin: 21px 0 10px;
  color: var(--text);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.nr-incident-panel > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.nr-device-card {
  margin-top: 28px;
  padding: 17px 18px;
  border: 1px solid rgba(125, 211, 252, 0.13);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.035);
}

.nr-device-card strong,
.nr-device-card small {
  display: block;
}

.nr-device-card strong {
  margin-top: 5px;
  color: #dce8f5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
}

.nr-device-card small {
  margin-top: 3px;
  color: #7e8da1;
  font-size: 11px;
}

.nr-objective {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nr-objective p,
.nr-rule {
  margin: 7px 0 0 !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
}

.nr-rule strong {
  color: var(--accent-light);
}

.nr-console-panel {
  min-width: 0;
  padding: 30px;
}

.nr-terminal {
  overflow: hidden;
  min-height: 290px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: #03070d;
  box-shadow: inset 0 0 50px rgba(56, 189, 248, 0.025);
}

.nr-terminal-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: #65748a;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.nr-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b4657;
}

.nr-dot:nth-child(1) { background: #fb7185; }
.nr-dot:nth-child(2) { background: #fbbf24; }
.nr-dot:nth-child(3) { background: #86efac; }

.nr-terminal-bar span:last-child {
  margin-left: 5px;
}

.nr-terminal-output {
  min-height: 247px;
  max-height: 325px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b7c7da;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.7;
}

.nr-command-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.nr-command,
.nr-primary,
.nr-secondary {
  min-height: 45px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.nr-command {
  padding: 9px 10px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(56, 189, 248, 0.045);
  color: #9edfff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.nr-command:hover:not(:disabled),
.nr-command.is-used {
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(56, 189, 248, 0.09);
}

.nr-command:disabled {
  cursor: default;
  opacity: 0.48;
}

.nr-diagnosis-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.7fr) auto;
  align-items: start;
  gap: 22px;
  padding: 24px 30px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
}

.nr-diagnosis-panel > div:first-child p {
  margin: 7px 0 0;
  color: #7f8ca0;
  font-size: 11px;
  line-height: 1.55;
}

.nr-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nr-option {
  position: relative;
}

.nr-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nr-option label {
  min-height: 45px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  color: #a9b6c8;
  background: rgba(255, 255, 255, 0.018);
  font-size: 11px;
  cursor: pointer;
  transition: 0.18s ease;
}

.nr-option input:focus-visible + label {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

.nr-option input:checked + label {
  color: #e7f6ff;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.09);
}

.nr-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 145px;
}

.nr-primary,
.nr-secondary {
  padding: 10px 15px;
  font-size: 11px;
  font-weight: 750;
}

.nr-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #03111c;
}

.nr-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.nr-primary:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.nr-secondary {
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: transparent;
  color: var(--accent-light);
}

.nr-secondary:hover {
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(56, 189, 248, 0.06);
}

.nr-feedback {
  grid-column: 1 / -1;
  min-height: 0;
  font-size: 12px;
}

.nr-feedback.is-success {
  color: var(--success);
}

.nr-feedback.is-error {
  color: #fda4af;
}

.nr-complete {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 28px 30px;
  border-top: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(134, 239, 172, 0.07), rgba(56, 189, 248, 0.04));
}

.nr-complete[hidden] {
  display: none;
}

.nr-complete-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(134, 239, 172, 0.28);
  border-radius: 50%;
  color: var(--success);
  background: rgba(134, 239, 172, 0.07);
  font-size: 22px;
}

.nr-complete h3 {
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 22px;
}

.nr-complete p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
}

.nr-score {
  min-width: 150px;
  text-align: right;
}

.nr-score strong,
.nr-score span {
  display: block;
}

.nr-score strong {
  color: var(--success);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 30px;
}

.nr-score span {
  color: #7d8b9f;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nr-built-with {
  padding: 13px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  color: #56657a;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-align: right;
}

@media (max-width: 900px) {
  .nr-layout {
    grid-template-columns: 1fr;
  }

  .nr-incident-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .nr-diagnosis-panel {
    grid-template-columns: 1fr;
  }

  .nr-actions {
    flex-direction: row;
  }

  .nr-primary,
  .nr-secondary {
    flex: 1;
  }
}

@media (max-width: 700px) {
  .nr-topbar,
  .nr-incident-panel,
  .nr-console-panel,
  .nr-diagnosis-panel,
  .nr-complete {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .nr-options {
    grid-template-columns: 1fr;
  }

  .nr-complete {
    grid-template-columns: auto 1fr;
  }

  .nr-score {
    grid-column: 1 / -1;
    text-align: left;
  }

  .nr-built-with {
    padding-left: 18px;
    padding-right: 18px;
    text-align: left;
  }
}

@media (max-width: 430px) {
  .nr-progress-dot {
    width: 19px;
  }

  .nr-progress-dot.is-active {
    width: 28px;
  }

  .nr-actions {
    flex-direction: column;
  }

  .nr-command-group {
    grid-template-columns: 1fr;
  }
}