@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #14141b;
  --ink: #f3efe3;
  --muted: #b7b2c3;
  --line: #454154;
  --paper: #e8e3d8;
  --acid: #d7fa58;
  --violet: #c1aeff;
  --amber: #ffbf91;
  --mono: "IBM Plex Mono", monospace;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-family: "Instrument Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .48; }
[hidden] { display: none !important; }


.brand {
  font: 800 28px/.9 var(--display);
  letter-spacing: .085em;
}

.brand-icon {
  width: 23px;
  height: 23px;
  background: var(--acid);
  clip-path: polygon(0 42%, 42% 42%, 42% 0, 62% 0, 62% 23%, 100% 23%, 100% 62%, 62% 62%, 62% 100%, 23% 100%, 23% 62%, 0 62%);
  transform: rotate(-12deg);
}

.top-label, .top-status, .eyebrow, dt, .tag, .legend, .event-time, .event-kind, .inspect-node small {
  font: 500 .69rem/1.35 var(--mono);
  letter-spacing: .08em;
}

.top-label, .top-status { color: var(--muted); }
.top-label span { color: #777188; padding: 0 4px; }
#top-credit { color: var(--acid); }

.sidebar {
  background: #1c1b25;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 47px;
  padding: 5px 8px;
  color: var(--muted);
  font: 500 clamp(.62rem, 1vw, .75rem)/1.2 var(--mono);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.sidebar nav b { font-size: 15px; color: var(--violet); }
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: var(--ink); background: #292637; }
.sidebar nav a[aria-current] { color: var(--acid); border-bottom-color: var(--acid); }
.sidebar nav a[aria-current] b { color: inherit; }



.eyebrow { color: var(--violet); }
h1 {
  font: 800 clamp(3.2rem, 7.3vw, 7.1rem)/.87 var(--display);
  text-transform: uppercase;
  letter-spacing: -.025em;
  margin: 4px 0 9px;
}

h1 span { color: var(--acid); }
p { line-height: 1.5; }
.mission p, .heading p { color: var(--muted); font-size: .92rem; }
dt { color: var(--muted); }
.mission dd { margin-top: 5px; font-size: .93rem; font-weight: 700; white-space: nowrap; }
.amber { color: var(--amber); }

.primary, .secondary {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: 600 .72rem/1.25 var(--mono);
}

.primary {
  background: var(--acid);
  border-color: var(--acid);
  color: #202510;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.primary:hover:not(:disabled) { background: #ecffa2; }
.secondary:hover:not(:disabled) { border-color: currentColor; }

.map-panel { border: 1px solid #625a78; background: #201d2d; }

.panel-head h2 { font: 600 .72rem/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.map-panel .panel-head { color: var(--violet); border-color: #514969; }
.tag { color: #ded4ff; text-align: right; }

.graph {
  height: clamp(315px, 43vh, 550px);
  background: radial-gradient(ellipse at 60% 48%, #382a58, #211c31 64%, #1a1924);
}

.map-grid {
  background-image:
    linear-gradient(#a990ff24 1px, transparent 1px),
    linear-gradient(90deg, #a990ff24 1px, transparent 1px),
    linear-gradient(#a990ff13 1px, transparent 1px),
    linear-gradient(90deg, #a990ff13 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: center;
}

.map-rings {
  background: repeating-radial-gradient(circle at 64% 50%, transparent 0 54px, #bba8ff30 55px 56px, transparent 57px 66px);
  mask-image: linear-gradient(90deg, transparent 7%, #000 48%, #000 85%, transparent);
}

.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -24px);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  color: #e0d5ff;
  font: 500 .69rem/1 var(--mono);
  white-space: nowrap;
}

.node b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: #211b32;
  color: var(--violet);
  border: 1px solid #a491dc;
  box-shadow: inset 0 0 0 4px #352a50;
  font: 500 23px var(--mono);
}

.node span { padding: 4px 5px; background: #201b31; }
.node.local b { border-radius: 50%; }
.node.gateway b { transform: rotate(45deg) scale(.8); }
.node.restricted b { color: var(--amber); border-color: var(--amber); }
.node[aria-pressed=true] b, .node:hover b {
  color: #242811;
  border-color: var(--acid);
  background: var(--acid);
  box-shadow: 0 0 24px #d7fa5870;
}
.node[aria-pressed=true] span { background: var(--acid); color: #242811; }
.node:focus-visible { outline-offset: 6px; }

.graph-tools button {
  width: 36px;
  height: 36px;
  border: 1px solid #8475aa;
  background: #241d34;
  color: var(--ink);
  font: 16px var(--mono);
}
.graph-tools button + button { border-left: 0; }
.graph-tools button:hover:not(:disabled) { color: var(--acid); }

.legend {
  border-top: 1px solid #514969;
  color: #d7cde9;
}
.legend span:last-child { margin-left: auto; }
.legend i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; background: var(--violet); }
.legend span:nth-child(2) i { background: var(--acid); }
.legend span:nth-child(3) i { background: var(--amber); }

.inspector {
  --line: #b9b1a7;
  background: var(--paper);
  color: #272231;
  color-scheme: light;
}
.inspector .panel-head { border-color: var(--line); }
.inspect-node > div:last-child { grid-column: 1; grid-row: 1; }
.inspect-node h3 { font: 800 clamp(2.2rem, 3vw, 3.2rem)/.95 var(--display); text-transform: uppercase; }
.inspect-node small { display: block; margin-top: 5px; color: #575063; }
.mission-icon {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid #726883;
  font: 24px var(--mono);
  background: #d5c9f3;
}
.inspect-body > p { font-size: .84rem; margin-top: 14px; }
.inspect-body dl { padding: 11px 0 16px; }
.inspect-body dl div { display: flex; justify-content: space-between; gap: 7px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.inspect-body dt { color: #575063; text-transform: uppercase; }
.inspect-body dd { font: 500 .72rem var(--mono); text-align: right; }
.inspector .primary { background: #292236; border-color: #292236; color: #fffaf0; }
.inspector .primary:hover:not(:disabled) { background: #4a3c61; }
.inspector button:focus-visible { outline-color: #623e9d; }
.inspect-body .hint { margin-top: 9px; color: #575063; font-size: .75rem; min-height: 2.25em; }

.log .panel-head { flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; padding: 8px 10px 8px 0; border: 0; }
.log .panel-head h2 { color: var(--violet); }
.log li { flex: 0 0 33.333%; min-width: 200px; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 4px 10px; padding: 9px 13px; border-left: 1px solid var(--line); font-size: .76rem; }
.log li span:last-child { grid-column: 1 / -1; color: #e0dce8; line-height: 1.35; }
.event-time { color: var(--muted); }
.event-kind { color: var(--acid); }

.card { grid-template-columns: minmax(170px, .75fr) minmax(0, 1.3fr) minmax(0, 1fr); }
.card h2 { font: 700 1.85rem/.95 var(--display); text-transform: uppercase; }
.card p { color: var(--muted); font-size: .88rem; }
.card a, .card button { justify-self: start; }

@media (max-width: 760px) {
  .brand { font-size: 19px; }
  .brand-icon { width: 16px; height: 16px; }
  .top-label, .top-status { font-size: .6rem; letter-spacing: 0; white-space: nowrap; }
  .sidebar nav a { min-width: 76px; min-height: 50px; flex-direction: column; gap: 3px; }
  .graph { height: clamp(285px, 43vh, 390px); }
  .log li { flex-basis: 50%; }
  .card { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .node { transform: translate(-50%, -20px); font-size: .59rem; }
  .node b { width: 40px; height: 40px; }
  .legend { font-size: .6rem; }
  .heading h1 { font-size: clamp(1.95rem, 9.4vw, 3.5rem); overflow-wrap: anywhere; }
}

.primary:focus-visible { outline-offset: -5px; outline-color: #292236; }
.inspector .primary:focus-visible { outline-color: var(--paper); }

.top-label #operator-handle { padding: 0; color: var(--violet); }
.breadcrumbs ol {
  font: 500 .7rem/1.5 var(--mono);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 9px; color: #9389a5; }
.breadcrumbs a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs [aria-current] { color: var(--ink); }
.card-actions a { font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.detail-card { grid-template-columns: minmax(0, 1fr); }
.detail-card > h2 { display: none; }
.heading p:empty { display: none; }

