:root {
  --brand: #0077FF;
  --ink: #0B1220;
  --muted: #6B7488;
  --paper: #F4F5F8;
  --line: #E2E8F0;
  --ok: #2EE36A;
  --dev: #FFB020;
  --chip-bg: #111418;
  --chip-bg-2: #1A1D22;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #0F1115; color: #e5e7eb;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
}
.topbar-logo {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: #fff; min-width: 0;
}
.topbar-logo-mark { display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.topbar-logo-mark svg { width: auto; height: 46px; display: block; }
.topbar-brand {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 40px; padding: 2px 0;
  margin-left: -8px; transform: translateY(4px);
  min-width: 0;
}
.topbar-brand-title {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 14px; color: #fff; line-height: 1; white-space: nowrap;
}
.topbar-brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(50, 214, 255, 0.6); line-height: 1; white-space: nowrap;
  margin-top: auto;
}
@media (min-width: 1280px) {
  .topbar-logo-mark svg { height: 56px; }
  .topbar-brand { height: 46px; margin-left: -14px; }
  .topbar-brand-title { font-size: 18px; }
  .topbar-brand-sub { font-size: 10px; }
}
.topbar .spacer { flex: 1; }
.legend { display: flex; gap: 14px; font-size: 12px; color: #9ca3af; flex-wrap: wrap; }
.legend .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; vertical-align: -1px;
  background: transparent;
  box-sizing: border-box;
}
.legend .ok  { border: 1.5px solid #16D85E; }
.legend .dev { border: 1.5px solid rgba(255,255,255,.52); }

.topbar-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); white-space: nowrap;
}
.topbar-phone {
  font-size: 13px; font-weight: 600; color: #cbd5e1;
  text-decoration: none; letter-spacing: 0.04em; white-space: nowrap;
  transition: color .2s;
}
.topbar-phone:hover { color: #fff; }
.topbar-account {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: transparent; border: 1px solid rgba(255,255,255,.1);
  color: #fff; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.topbar-account:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); }
.topbar-account svg { width: 20px; height: 20px; }
@media (max-width: 720px) {
  .topbar-phone { display: none; }
  .topbar-tagline { display: none; }
}

/* ---------- scene ---------- */
.scene-wrap {
  display: flex; justify-content: center;
  padding: 24px 16px 64px;
}
.office {
  position: relative;
  margin: 0;
  width: 100%;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(11,18,32,.18);
  background: #1a1a1a;
  line-height: 0;
}
.office-bg { display: block; width: 100%; height: auto; }

.office-desktop { max-width: 1400px; }
.office-mobile  { max-width: 520px; display: none; }

/* ---------- hotspots ---------- */
.hotspots {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hotspot {
  position: absolute;
  transform: translate(-50%, calc(-100% - 7px));
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  background: #101012;
  color: #fff;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 6px;
  font-family: "SF Pro Text", "SF Pro", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 4px 0 rgba(0,0,0,.16),
    0 8px 16px rgba(0,0,0,.28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.hotspot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 8px;
  background: #101012;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform: translateX(-50%);
}
.hotspot .dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
}
.hotspot.is-online .dot {
  background: transparent;
  border: 1.5px solid #16D85E;
  box-shadow: none;
}
.hotspot.is-dev .dot {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.52);
  box-shadow: none;
}
.hotspot[data-agent-id="core"] .dot {
  position: relative;
  width: 14px;
  height: 14px;
  border: 0;
}
.hotspot[data-agent-id="core"] .dot::before,
.hotspot[data-agent-id="core"] .dot::after {
  content: "";
  position: absolute;
}
.hotspot[data-agent-id="core"] .dot::before {
  left: 0;
  top: 2px;
  width: 14px;
  height: 10px;
  background: #f59e0b;
  clip-path: polygon(0 100%, 0 38%, 25% 65%, 50% 12%, 75% 65%, 100% 38%, 100% 100%);
}
.hotspot[data-agent-id="core"] .dot::after {
  left: 1px;
  bottom: 1px;
  width: 12px;
  height: 2px;
  background: #f59e0b;
  border-radius: 2px;
}
.hotspot .label {
  font-family: "Montserrat", "Montserrat Light", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  transform: translateY(-1px);
}

.hotspot:hover {
  transform: translate(-50%, calc(-100% - 9px));
  box-shadow:
    0 1px 0 rgba(255,255,255,.1) inset,
    0 4px 0 rgba(0,0,0,.16),
    0 10px 18px rgba(0,0,0,.32);
  filter: brightness(1.08);
}
.hotspot:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: transparent;
  display: none;
  z-index: 100;
}
.modal-backdrop.show { display: block; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: fixed;
  width: calc(100% - 16px); max-width: 300px;
  background: var(--chip-bg); color: #fff;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  line-height: 1.4;
  border: 1px solid rgba(255,255,255,.06);
}
.modal-head {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.modal-head .team-stripe {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}
.modal-head h2 {
  margin: 0; font-size: 15px; font-weight: 700;
  font-family: -apple-system, "Inter", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dev-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #FFB020; background: rgba(255,176,32,.12);
  border: 1px solid rgba(255,176,32,.35);
  padding: 2px 6px; border-radius: 4px; line-height: 1;
}
.modal-head .sub {
  font-size: 11px; color: rgba(255,255,255,.55);
  margin-top: 2px; letter-spacing: .02em;
}
.modal-head .m-status {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.modal-head .m-status { background: transparent; box-sizing: border-box; }
.modal-head .m-status.is-online { border: 1.5px solid #16D85E; }
.modal-head .m-status.is-dev    { border: 1.5px solid rgba(255,255,255,.52); }
.close {
  margin-left: auto;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
  border: 0;
  width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.close:hover { background: rgba(255,255,255,.15); color: #fff; }
.modal-body { padding: 10px 14px 14px; display: grid; gap: 8px; }
.row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.row .k { color: rgba(255,255,255,.5); }
.row .v { font-weight: 600; color: #fff; }
.metric {
  background: var(--chip-bg-2);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 10px; padding: 10px 12px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.metric .n {
  font-size: 22px; font-weight: 700;
  font-feature-settings: "tnum";
  color: #fff;
}
.metric .l { font-size: 11px; color: rgba(255,255,255,.55); }
.btn {
  display: block; text-align: center;
  padding: 10px 14px; border-radius: 10px;
  background: var(--brand); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 13px;
  margin-top: 2px;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost {
  background: var(--chip-bg-2);
  color: rgba(255,255,255,.5);
  cursor: default;
  border: 1px solid rgba(255,255,255,.08);
}

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  .office-desktop { display: none; }
  .office-mobile  { display: block; }
  .scene-wrap { padding: 12px 12px 40px; }
  .hotspot { height: 29px; font-size: 12px; padding: 0 8px; border-radius: 6px; }
  .hotspot .dot { width: 11px; height: 11px; }
}
