:root {
  --bg: #050b13;
  --bg-2: #09121d;
  --panel: rgba(8, 18, 31, 0.92);
  --panel-strong: rgba(12, 23, 40, 0.96);
  --line: rgba(94, 168, 237, 0.18);
  --line-bright: rgba(105, 198, 255, 0.4);
  --text: #e8f4ff;
  --muted: #8ca4c1;
  --active: #71f5c4;
  --building: #8bd7ff;
  --blocked: #ff9d7a;
  --idle: #93a6bf;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(65, 120, 190, 0.22), transparent 30%),
    linear-gradient(180deg, #09111c 0%, #050910 55%, #03060b 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 170, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 170, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 4vw, 4rem); line-height: 0.94; max-width: 10ch; }
.lede {
  margin-top: 12px;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}
.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.meta-chip, .badge {
  border: 1px solid var(--line);
  background: rgba(14, 24, 40, 0.84);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}
.meta-chip.live { color: var(--active); border-color: rgba(113, 245, 196, 0.28); }
.overview-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.overview-card,
.inspector-panel,
.deck-frame {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.025);
}
.overview-card {
  border-radius: 20px;
  padding: 16px 18px;
}
.overview-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}
.overview-card span { color: var(--muted); }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 420px);
  gap: 20px;
}
.deck-frame {
  border-radius: 30px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.deck-frame::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 24px;
  border: 1px solid rgba(104, 180, 255, 0.12);
  pointer-events: none;
}
.deck-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 18px;
  min-height: 780px;
  align-items: stretch;
}
.room {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  min-height: 160px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(14, 26, 43, 0.95), rgba(8, 15, 27, 0.98)),
    radial-gradient(circle at top, rgba(105, 198, 255, 0.12), transparent 45%);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025);
}
.room::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.03);
}
.room:hover,
.room:focus-visible,
.room.active {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  box-shadow: 0 0 0 1px rgba(105, 198, 255, 0.18), 0 24px 32px rgba(0, 0, 0, 0.28);
  outline: none;
}
.room[data-span="2"] { grid-column: span 2; }
.room[data-span="3"] { grid-column: span 3; }
.room[data-level="core"] {
  min-height: 270px;
  background:
    radial-gradient(circle at center, rgba(113, 245, 196, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(18, 35, 58, 0.96), rgba(8, 16, 28, 0.98));
}
.room[data-level="core"]::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 999px;
  border: 1px solid rgba(113, 245, 196, 0.22);
  box-shadow: 0 0 36px rgba(113, 245, 196, 0.24);
}
.room[data-state="active"] .room-state { color: var(--active); }
.room[data-state="building"] .room-state { color: var(--building); }
.room[data-state="blocked"] .room-state { color: var(--blocked); }
.room[data-state="idle"] .room-state { color: var(--idle); }
.room-label { position: relative; z-index: 1; font-size: 1.1rem; font-weight: 700; }
.room-role, .room-state { position: relative; z-index: 1; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.inspector {
  display: grid;
  gap: 16px;
  align-content: start;
}
.inspector-panel {
  border-radius: 24px;
  padding: 18px;
}
.inspector-panel.primary {
  background: var(--panel-strong);
}
.inspector-panel p,
.project-summary,
.lane-card p { color: var(--muted); line-height: 1.5; }
.status-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.badge.subtle { color: var(--muted); }
.mini-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.mini-stats li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 10px;
  color: var(--muted);
}
.mini-stats strong { color: var(--text); }
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.panel-heading span { color: var(--muted); font-size: 13px; }
.project-list,
.lane-list {
  display: grid;
  gap: 12px;
}
.project-card,
.lane-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  padding: 14px;
}
.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.project-state {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--building);
}
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.project-tags span {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .overview-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1440px); }
  .topbar { flex-direction: column; }
  .topbar-meta { justify-content: flex-start; }
  .overview-bar { grid-template-columns: 1fr; }
  .deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: auto; }
  .room[data-span="2"], .room[data-span="3"] { grid-column: span 2; }
}
