/* ============================================
   nslabs — Active Development Streams
   Mission-control style dashboard
   ============================================ */
:root {
  --bg-deep: #07090f;
  --bg-panel: #0d1324;
  --bg-elevated: #121a30;
  --accent: #4f7df5;
  --accent-2: #8b5cf6;
  --accent-live: #4ade80;
  --text-primary: #e8ecf6;
  --text-secondary: #8a93ad;
  --text-dim: #5b6480;
  --border: rgba(140, 160, 220, 0.10);
  --border-strong: rgba(140, 160, 220, 0.18);
  --radius-md: 12px;
  --radius-lg: 16px;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* ============================================
   SECTION
   ============================================ */
.ns-streams {
  position: relative;
  padding: 140px 24px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(79, 125, 245, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(180deg, #07090f 0%, #0a0e1a 100%);
}
.ns-streams::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(140, 160, 220, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140, 160, 220, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 85%);
  pointer-events: none;
}
.ns-container {
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* ============================================
   HEADER
   ============================================ */
.ns-streams-header {
  margin-bottom: 56px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.ns-streams-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.ns-streams-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--accent);
  padding: 8px 16px;
  border: 1px solid rgba(79, 125, 245, 0.3);
  border-radius: 100px;
  background: rgba(79, 125, 245, 0.08);
}
.ns-streams-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: stPulse 1.6s ease-in-out infinite;
}
.ns-streams-uplink {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}
.ns-streams-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 920px;
}
.ns-streams-sub {
  margin: 0 0 32px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 680px;
}
/* Stat row */
.ns-streams-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat {
  padding: 16px 18px;
  background: rgba(13, 19, 36, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(20px);
}
.stat-k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}
.stat-v {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-live);
  -webkit-text-fill-color: var(--accent-live);
  background: none;
  font-size: 1.1rem;
}
.stat-live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-live);
  box-shadow: 0 0 12px var(--accent-live);
  animation: stPulse 1.4s ease-in-out infinite;
}
@keyframes stPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
/* ============================================
   COMMAND BAR (tabs)
   ============================================ */
.ns-streams-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding: 8px;
  background: rgba(13, 19, 36, 0.5);
  border: 1px solid var(--border);
  border-radius: 100px;
  backdrop-filter: blur(20px);
  width: fit-content;
  max-width: 100%;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.nav-pill:hover {
  color: var(--text-primary);
  background: rgba(79, 125, 245, 0.08);
}
.nav-pill.is-active {
  background: linear-gradient(135deg, rgba(79, 125, 245, 0.25), rgba(139, 92, 246, 0.15));
  border-color: rgba(79, 125, 245, 0.45);
  color: var(--text-primary);
  box-shadow: 0 0 24px rgba(79, 125, 245, 0.25);
}
.pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.pill-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  background: rgba(79, 125, 245, 0.15);
  border: 1px solid rgba(79, 125, 245, 0.25);
  border-radius: 4px;
  color: var(--accent);
}
/* ============================================
   GRID
   ============================================ */
.streams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
/* ============================================
   STREAM CARD
   ============================================ */
.stream-card {
  position: relative;
  padding: 28px 28px 24px;
  background: linear-gradient(180deg, rgba(18, 26, 48, 0.7), rgba(13, 19, 36, 0.5));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  opacity: 1;
}
.stream-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 100% 0%, rgba(79, 125, 245, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.stream-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stream-card:hover {
  border-color: rgba(79, 125, 245, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.stream-card:hover::before { opacity: 1; }
.stream-card:hover::after { transform: scaleY(1); }
/* Dimmed when filtered out */
.stream-card.is-dim {
  opacity: 0.18;
  filter: grayscale(0.6);
  transform: scale(0.985);
}
.stream-card.is-focus {
  border-color: rgba(79, 125, 245, 0.55);
  box-shadow: 0 0 0 1px rgba(79, 125, 245, 0.4) inset, 0 30px 60px rgba(0,0,0,0.45);
}
.stream-card.is-focus::after { transform: scaleY(1); }
/* Top row */
.stream-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.stream-id {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}
.stream-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent-live);
  padding: 4px 10px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 100px;
}
.s-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-live);
  box-shadow: 0 0 8px var(--accent-live);
  animation: stPulse 1.5s ease-in-out infinite;
}
.stream-name {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.stream-desc {
  margin: 0 0 22px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
/* List */
.stream-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px dashed var(--border);
  padding-top: 18px;
}
.stream-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  transition: color 0.25s;
}
.stream-list li:hover { color: var(--text-primary); }
.li-mark {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  margin-top: 3px;
  border: 1px solid rgba(79, 125, 245, 0.35);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(79, 125, 245, 0.2), rgba(139, 92, 246, 0.1));
  position: relative;
}
.li-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--accent);
}
/* Footer */
.stream-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}
.progress-pct {
  color: var(--accent);
  font-weight: 600;
}
.progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(140, 160, 220, 0.08);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  box-shadow: 0 0 14px rgba(79, 125, 245, 0.5);
  transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.progress-fill::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 30px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
  animation: stShine 2.4s ease-in-out infinite;
}
@keyframes stShine {
  0% { transform: translateX(-60px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(30px); opacity: 0; }
}
.stream-objective {
  padding: 14px 16px;
  background: rgba(7, 9, 15, 0.55);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.obj-k {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 4px;
}
/* ============================================
   SUMMARY
   ============================================ */
.ns-streams-summary {
  margin-top: 60px;
  padding: 48px 40px;
  background: linear-gradient(135deg, rgba(79, 125, 245, 0.10), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(79, 125, 245, 0.25);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.ns-streams-summary::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,125,245,0.2), transparent 70%);
  top: -150px; right: -150px;
  filter: blur(60px);
  pointer-events: none;
  animation: stBreath 6s ease-in-out infinite;
}
@keyframes stBreath {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.summary-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.summary-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid rgba(79, 125, 245, 0.3);
  border-radius: 100px;
  background: rgba(79, 125, 245, 0.08);
}
.summary-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(79, 125, 245, 0.4), transparent);
}
.summary-title {
  margin: 0 0 32px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 880px;
  position: relative;
  z-index: 1;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.sum-cell {
  padding: 18px 18px;
  background: rgba(7, 9, 15, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s;
}
.sum-cell:hover {
  border-color: rgba(79, 125, 245, 0.4);
  transform: translateY(-2px);
}
.sum-k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.sum-v {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-primary);
}
.summary-closing {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  position: relative;
  z-index: 1;
}
.summary-closing strong {
  display: inline-block;
  margin-left: 4px;
  font-weight: 500;
  font-style: italic;
  background: linear-gradient(120deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1000px) {
  .streams-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ns-streams { padding: 90px 18px; }
  .ns-streams-stats { grid-template-columns: repeat(2, 1fr); }
  .ns-streams-nav { border-radius: 16px; padding: 6px; }
  .nav-pill { padding: 8px 14px; font-size: 0.78rem; }
  .stream-card { padding: 22px 20px; }
  .stream-name { font-size: 1.25rem; }
  .ns-streams-summary { padding: 32px 22px; }
  .summary-grid { grid-template-columns: 1fr; }
}