:root {
  --bg: #1B1F27;
  --panel: #242A35;
  --panel-hover: #2C333F;
  --border: #363E4C;
  --text-primary: #E9ECF1;
  --text-secondary: #9AA3B2;
  --text-muted: #6B7385;
  --amber: #E8A33D;
  --amber-dim: #6B5227;
  --teal: #4FAF8B;
  --teal-dim: #2A4A3D;
  --red: #D6634C;
  --red-dim: #5A3226;
  --radius: 10px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  min-height: 100vh;
  line-height: 1.5;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* Terminal-style header */
.prompt-bar {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.prompt-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

.prompt-bar .path {
  color: var(--amber);
}

.prompt-bar .env-tag {
  margin-left: auto;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--amber-dim);
  color: var(--amber);
  flex-shrink: 0;
}

header.hero {
  margin-bottom: 36px;
}

header.hero h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(24px, 5vw, 32px);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

header.hero p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 15px;
  max-width: 520px;
}

.group {
  margin-bottom: 28px;
}

.group-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.group-header .icon {
  font-size: 15px;
}

.group-header h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}

.group-header .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.routes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.route:hover {
  background: var(--panel-hover);
  border-color: var(--amber-dim);
}

.route:active {
  transform: scale(0.997);
}

.route:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.route .port {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
  min-width: 32px;
}

.route .led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.led.up {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.led.warn {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}

.led.down {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

.route .info {
  min-width: 0;
}

.route .info .name {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.route .info .desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route .arrow {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

.route:hover .arrow {
  color: var(--amber);
}

.left-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

footer {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 480px) {
  .route {
    grid-template-columns: auto 1fr auto;
    padding: 14px;
    gap: 10px;
  }

  .route .info .desc {
    display: none;
  }

  .prompt-bar {
    font-size: 12px;
  }
}
