/* ===============================================================
   topbar.css — wordmark, agent tape, and the collapsible control
   drawer.
   =============================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Opaque rather than blurred: a backdrop-filter sitting over the
     animated field re-blurs the whole bar every frame, which was the
     single most expensive thing on the page. */
  background: linear-gradient(180deg, #05070A 62%, rgba(5, 7, 10, 0.94));
  border-bottom: 1px solid var(--line-soft);
}

.topbar__row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px var(--gutter);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
  margin: 0;
  white-space: nowrap;
  color: var(--text);
}

.wordmark span {
  color: var(--holo);
  margin: 0 1px;
}

.wordmark::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 8px;
  vertical-align: 3px;
  border-radius: 1px;
  background: var(--holo);
  box-shadow: 0 0 8px var(--holo-glow);
}

/* ---------------------------------------------------------------
   Agent tape — a single line of machine narration. It is the only
   place the interface talks, and it decrypts each new line in.
   --------------------------------------------------------------- */
.tape {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 260px;
  padding: 4px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, rgba(86, 224, 214, 0.05), transparent 70%);
  overflow: hidden;
}

.lamp {
  font-style: normal;
  color: var(--muted);
  width: 10px;
  flex: none;
  text-align: center;
}

.lamp.is-busy { color: var(--holo); }
.lamp.is-live { color: var(--ember); }

.tape__line {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tape__line b {
  font-weight: 500;
  color: var(--holo);
}

.tape__tally {
  color: var(--muted-dim);
  font-size: 11px;
  white-space: nowrap;
  flex: none;
}

/* ---------------------------------------------------------------
   Control drawer
   --------------------------------------------------------------- */
.controls {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px var(--gutter);
  border-top: 1px solid var(--line-soft);
}

.controls.is-open { display: flex; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-btn .chev {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-mid) var(--ease);
}

.menu-btn[aria-expanded="true"] .chev { transform: translateY(1px) rotate(-135deg); }

.menu-btn[aria-expanded="true"] {
  color: var(--holo);
  border-color: var(--holo-line);
  background: var(--holo-soft);
}
