*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  background: #0a0e0c;
  color: #d4e0d8;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

:root {
  --ink: #d4e0d8;
  --muted: #6b7f72;
  --void: #0a0e0c;
  --panel: #111814;
  --phosphor: #3dff9a;
  --phosphor-dim: #1a8f55;
  --amber: #e8a838;
  --scope: #0d1511;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --line: rgba(61,255,154,0.12);
}

/* ——— OSCILLOSCOPE CHANNEL NAV (unique) ——— */
.scope-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #060906;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px 14px;
}
.scope-bar .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.scope-bar .brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor);
}
.scope-bar .brand small {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 600;
}
.scope-bar .loc {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.channels {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.channels a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid rgba(61,255,154,0.2);
  padding: 8px 14px 8px 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.15s;
  min-width: 100px;
}
.channels a .led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a2a20;
  box-shadow: inset 0 0 0 1px rgba(61,255,154,0.25);
  flex-shrink: 0;
}
.channels a .ch {
  font-size: 0.6rem;
  color: var(--phosphor-dim);
  margin-right: 2px;
}
.channels a:hover {
  color: var(--ink);
  border-color: var(--phosphor-dim);
}
.channels a.active {
  color: #fff;
  border-color: var(--phosphor);
  background: #0f1a14;
}
.channels a.active .led {
  background: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor), 0 0 4px var(--phosphor);
}
.channels a:nth-child(2).active .led { background: #5eb8ff; box-shadow: 0 0 10px #5eb8ff; }
.channels a:nth-child(3).active .led { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.channels a:nth-child(4).active .led { background: #ff6b8a; box-shadow: 0 0 10px #ff6b8a; }
.channels a:nth-child(2) .ch { color: #3a7aa0; }
.channels a:nth-child(3) .ch { color: #a07820; }
.channels a:nth-child(4) .ch { color: #a04055; }

.mob {
  display: none;
  background: var(--phosphor);
  color: #0a0e0c;
  border: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
}

/* ——— TRACE HERO ——— */
.trace {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 24px 32px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}
.trace .tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 12px;
}
.trace h1 {
  font-family: var(--sans);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 14px;
}
.trace h1 em {
  font-style: normal;
  color: var(--phosphor);
}
.trace p {
  font-family: var(--sans);
  color: var(--muted);
  max-width: 400px;
  margin-bottom: 26px;
  font-size: 1.02rem;
}
.trace .screen {
  background: var(--scope);
  border: 2px solid #1a2e24;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 40px rgba(61,255,154,0.05), 0 0 0 1px rgba(61,255,154,0.1);
}
.trace .screen img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  opacity: 0.85;
  mix-blend-mode: luminosity;
}
.trace .screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(61,255,154,0.03) 2px,
    rgba(61,255,154,0.03) 4px
  );
  pointer-events: none;
}
.trace .screen .hud {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor);
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-phos {
  background: var(--phosphor);
  color: #0a0e0c;
}
.btn-phos:hover { filter: brightness(1.1); box-shadow: 0 0 16px rgba(61,255,154,0.4); }
.btn-ghost {
  background: transparent;
  color: var(--phosphor);
  box-shadow: inset 0 0 0 1px var(--phosphor-dim);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--phosphor); }

/* ——— METRICS ——— */
.metrics {
  max-width: 1040px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px;
  border-left: 3px solid var(--phosphor);
}
.metric:nth-child(2) { border-left-color: #5eb8ff; }
.metric:nth-child(3) { border-left-color: var(--amber); }
.metric .k {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  margin-bottom: 6px;
}
.metric h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.metric p {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ——— SIGNAL ——— */
.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}
.section .tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 8px;
}
.section h2 {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
}

.signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cell {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s;
}
.cell:hover { border-color: var(--phosphor-dim); }
.cell img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05);
}
.cell .body { padding: 18px; }
.cell .id {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 6px;
}
.cell h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.cell p {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
}

/* ——— BENCH ——— */
.bench-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 65vh;
}
.bench-split img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  filter: grayscale(0.35);
}
.bench-split .txt {
  background: var(--panel);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bench-split .txt .tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 12px;
}
.bench-split .txt h1 {
  font-family: var(--sans);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}
.bench-split .txt p {
  font-family: var(--sans);
  color: var(--muted);
  margin-bottom: 10px;
}

/* ——— PROBE ——— */
.probe-wrap {
  max-width: 1040px;
  margin: 24px auto 56px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
}
.probe-side {
  background: #0d1511;
  border: 1px solid var(--line);
  padding: 32px;
}
.probe-side h2 {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--phosphor);
  margin-bottom: 20px;
}
.p-row { margin-bottom: 14px; }
.p-row .lbl {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 3px;
}
.p-row p, .p-row a {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
}
.p-row a:hover { color: var(--phosphor); }

.probe-form {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
}
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 12px;
  background: var(--void);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--phosphor-dim);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ft {
  border-top: 1px solid var(--line);
  padding: 24px;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.ft strong { color: var(--phosphor); }

@media (max-width: 860px) {
  .channels {
    display: none;
    width: 100%;
  }
  .channels.open { display: flex; }
  .channels a { flex: 1; min-width: 0; justify-content: center; }
  .mob { display: inline-block; }
  .trace { grid-template-columns: 1fr; }
  .trace .screen img { height: 220px; }
  .metrics { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: 1fr; }
  .bench-split { grid-template-columns: 1fr; }
  .bench-split img { min-height: 220px; }
  .probe-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
