a.bot-exchange-cta {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 2px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s;
}

.bot-exchange-cta:hover {
  transform: translateY(-1px) scale(1.06);
}

.bot-exchange-cta:active {
  transform: scale(0.96);
}

.bot-exchange-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bot-exchange-cta img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

@media (min-width: 601px) {
  a.bot-exchange-cta {
    width: 44px;
    height: 44px;
  }

  .bot-exchange-cta img {
    width: 40px;
    height: 40px;
  }
}

.toplinks a.bot-exchange-cta {
  display: inline-flex;
}

.bot-coachmark {
  position: absolute;
  z-index: 200;
  width: min(280px, calc(100vw - 24px));
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card, var(--panel, var(--bg)));
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.bot-coachmark.is-visible {
  opacity: 1;
  transform: none;
}

.bot-coachmark[hidden] {
  display: none;
}

.bot-coachmark-arrow {
  position: absolute;
  top: -7px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: inherit;
  transform: rotate(45deg);
}

.bot-coachmark-title {
  margin: 0 28px 4px 0;
  font-weight: 700;
}

.bot-coachmark-body {
  margin: 0 0 12px;
  color: var(--text-secondary, var(--muted, var(--text)));
}

.bot-coachmark-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, var(--muted, var(--text)));
  cursor: pointer;
}

.bot-coachmark-close:hover {
  color: var(--text);
}

.bot-coachmark-ok {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.bot-coachmark-close:focus-visible,
.bot-coachmark-ok:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  a.bot-exchange-cta,
  .bot-coachmark {
    transition: none;
  }

  .bot-exchange-cta:hover,
  .bot-exchange-cta:active {
    transform: none;
  }
}

.nav-bar,
.topbar {
  height: auto;
  min-height: 64px;
  gap: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .nav-links,
  .toplinks {
    gap: 12px;
    flex-wrap: wrap;
  }
}

@media (max-width: 1000px) {
  .nav-links,
  .toplinks {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .nav-bar,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px;
  }

  .nav-links,
  .toplinks {
    justify-content: center;
    gap: 10px;
  }

  .bot-exchange-cta {
    order: -1;
  }
}
