:root {
  color-scheme: dark;
  --bg: #111316;
  --panel: #1d2026;
  --panel-strong: #252932;
  --line: #363c47;
  --text: #f5f1e8;
  --muted: #aeb6c3;
  --green: #58d68d;
  --cyan: #57c7ff;
  --amber: #f5ba4b;
  --rose: #ff6f91;
  --ink: #111316;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(17, 19, 22, 0.95), rgba(17, 19, 22, 0.65)),
    radial-gradient(circle at 76% 22%, rgba(87, 199, 255, 0.35), transparent 26%),
    radial-gradient(circle at 70% 76%, rgba(88, 214, 141, 0.24), transparent 30%),
    #181b20;
}

.hero-copy {
  z-index: 2;
  align-self: center;
  padding: clamp(28px, 5vw, 72px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.hero p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.node-map {
  position: relative;
  min-height: 360px;
}

.node-map::before,
.node-map::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(245, 241, 232, 0.15);
  transform: rotate(-8deg);
}

.node-map::after {
  inset: 30% 12%;
  transform: rotate(15deg);
}

.node {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 34px rgba(88, 214, 141, 0.65);
}

.node-a {
  top: 18%;
  left: 24%;
}

.node-b {
  top: 32%;
  right: 18%;
  background: var(--cyan);
}

.node-c {
  right: 32%;
  bottom: 17%;
  background: var(--amber);
}

.node-d {
  bottom: 22%;
  left: 18%;
  background: var(--rose);
}

.node-e {
  top: 52%;
  left: 48%;
}

.pulse {
  position: absolute;
  border: 1px solid rgba(87, 199, 255, 0.8);
  border-radius: 999px;
  animation: travel 6s linear infinite;
}

.pulse-one {
  top: 21%;
  left: 25%;
  width: 34%;
}

.pulse-two {
  right: 20%;
  bottom: 21%;
  width: 28%;
  animation-delay: -2s;
}

.pulse-three {
  bottom: 27%;
  left: 20%;
  width: 38%;
  animation-delay: -4s;
}

@keyframes travel {
  0% {
    opacity: 0;
    transform: scaleX(0.1);
  }
  35%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

.status-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.status-band article,
.control-panel,
.data-surface,
.stream-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-band article {
  padding: 18px;
}

.status-band span {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 1.65rem;
  font-weight: 800;
}

.status-band p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.control-panel,
.data-surface,
.stream-panel {
  padding: 20px;
}

.panel-heading,
.surface-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading {
  display: block;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15171b;
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.button-row,
.segmented {
  display: flex;
  gap: 8px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.button-row button {
  flex: 1;
}

button.secondary,
.segmented button {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

.segmented {
  align-self: start;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.segmented button {
  min-height: 34px;
  padding: 0 12px;
}

.segmented button.active {
  background: var(--cyan);
  color: var(--ink);
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.object-card {
  min-height: 270px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(87, 199, 255, 0.14);
  color: var(--cyan);
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 800;
}

.read-button {
  min-height: 30px;
  padding: 0 12px;
  background: var(--amber);
}

.payload-preview {
  min-height: 48px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
}

dl {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(245, 241, 232, 0.08);
  padding-top: 8px;
}

dt {
  color: var(--muted);
  font-size: 0.75rem;
}

dd {
  margin: 0;
  max-width: 150px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insights {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #15171b;
}

pre {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15171b;
  padding: 16px;
}

code {
  color: #d8f7ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .insights {
    grid-template-columns: 1fr;
  }

  .node-map {
    min-height: 260px;
  }

  .status-band {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px;
  }

  .hero-copy {
    padding: 28px;
  }

  .surface-header,
  .panel-heading {
    display: block;
  }

  .segmented {
    margin-top: 14px;
    overflow-x: auto;
  }

  .status-band {
    grid-template-columns: 1fr;
  }
}
