/* atlas - dark, factory-floor theme. Sibling vibe to galaxy-gen. */
:root {
  --bg: #0b0e14;
  --panel: #11151f;
  --ink: #e6e9ef;
  --muted: #8b94a7;
  --line: #1f2633;
  --fd: #7aa2f7;
  --bridge: #bb9af7;
  --eco: #2ac3de;
  --none: #565f73;
  --accent: #9ece6a;
  --deploy: #9ece6a;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
}

/* HTML card nodes - clickable (link to the live repo), language icons + name. */
.repo-card {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 162px;
  height: 36px;
  padding: 0 10px;
  background: linear-gradient(180deg, #161b28, #0e121b);
  border: 1px solid #242c3d;
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 10px #0006;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.repo-card:hover {
  transform: translateY(-1px) scale(1.06);
  border-color: var(--accent);
  box-shadow: 0 12px 30px #000a, 0 0 0 1px var(--accent);
}
/* dependency-chain focus: off-chain cards fade (app.js toggles the class) */
.repo-card.dimmed {
  opacity: 0.12;
}
.rc-icons {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
}
.rc-icons .lang {
  width: 15px;
  height: 15px;
  display: block;
}
.rc-icons .lang.txt {
  font: 600 9px/15px var(--display);
  color: var(--muted);
}
.rc-name {
  flex: 1;
  min-width: 0;
  font: 500 12.5px/1.2 var(--display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-lock {
  font-size: 10px;
  opacity: 0.85;
  flex: 0 0 auto;
}
.rc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--deploy);
  box-shadow: 0 0 6px var(--deploy);
  flex: 0 0 auto;
}

/* hover detail card (G6 tooltip layer - always on top, never underlapped) */
.atlas-tip .langs {
  color: var(--accent);
}
.atlas-tip .desc {
  margin-top: 4px;
  color: #aab3c5;
  line-height: 1.4;
  max-height: 84px;
  overflow: hidden;
}
.atlas-tip .redact {
  color: var(--bridge);
  font-style: italic;
}
.atlas-tip .open {
  margin-top: 5px;
  color: var(--fd);
  font-size: 10.5px;
}
.atlas-tip .dep {
  color: var(--accent);
}

/* org avatar icons in the legend */
.org-ic {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  vertical-align: -3px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  padding: 18px 22px 10px;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.06em;
}

.sub {
  margin: 4px 0 12px;
  color: var(--muted);
  max-width: 70ch;
}

code {
  color: var(--accent);
  background: #0008;
  padding: 0 4px;
  border-radius: 4px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.swatch.fd {
  background: var(--fd);
}
.swatch.bridge {
  background: var(--bridge);
}
.swatch.eco {
  background: var(--eco);
}
.swatch.none {
  background: var(--none);
}
.mark.deployed {
  color: var(--accent);
}
.legend .hint {
  color: var(--muted);
  opacity: 0.7;
  font-style: normal;
}
/* legend items double as filter toggles (app.js wires them, atlas#4) */
.legend li.lg {
  cursor: pointer;
  user-select: none;
  padding: 1px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
}
.legend li.lg:hover {
  border-color: var(--line);
}
.legend li.lg.off {
  opacity: 0.35;
  filter: grayscale(1);
}
.legend li.lg.on {
  border-color: var(--accent);
  color: var(--ink);
}
#graph .empty {
  color: var(--muted);
  padding: 28px;
  font-size: 14px;
}

main#graph {
  flex: 1;
  min-height: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer a {
  color: var(--fd);
  text-decoration: none;
}

.tip {
  position: fixed;
  z-index: 10;
  max-width: 320px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px #0009;
  pointer-events: none;
  font-size: 12.5px;
}

.tip h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
}

.tip .row {
  color: var(--muted);
}

.tip .private {
  color: var(--bridge);
  font-style: italic;
}

/* G6 built-in tooltip plugin host + our content. */
.g6-tooltip {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 30px #0009 !important;
  color: var(--ink) !important;
  padding: 0 !important;
}

.atlas-tip {
  max-width: 320px;
  padding: 10px 12px;
  font-size: 12.5px;
}

.atlas-tip h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
}

.atlas-tip .row {
  color: var(--muted);
}

.atlas-tip .langs {
  color: var(--accent);
}

.atlas-tip .private {
  color: var(--bridge);
  font-style: italic;
}
