.ami-site-header {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.ami-primary-tools {
  display: flex;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
  backdrop-filter: blur(16px);
}

.ami-primary-tool {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #334155;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.ami-primary-tool:hover {
  border-color: #d1fae5;
  background: #f0fdf4;
  color: #065f46;
}

.ami-primary-tool.is-active {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .06);
}

.ami-tool-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e2e8f0;
  color: #475569;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.ami-primary-tool.is-active .ami-tool-icon {
  background: #059669;
  color: #fff;
}

.ami-tool-copy {
  min-width: 0;
}

.ami-tool-copy strong,
.ami-tool-copy small {
  display: block;
}

.ami-tool-copy strong {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.ami-tool-copy small {
  margin-top: 2px;
  color: #7b8da1;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

.ami-primary-tool.is-active .ami-tool-copy small,
.ami-primary-tool:hover .ami-tool-copy small {
  color: #047857;
}

.ami-tool-arrow {
  display: none;
}

.dark .ami-primary-tools {
  border-color: rgba(148, 163, 184, .16);
  background: rgba(15, 23, 42, .88);
}

.dark .ami-primary-tool {
  color: #e2e8f0;
}

.dark .ami-primary-tool:hover,
.dark .ami-primary-tool.is-active {
  border-color: rgba(52, 211, 153, .38);
  background: rgba(6, 78, 59, .32);
  color: #ecfdf5;
}

.dark .ami-tool-icon {
  background: #1e293b;
  color: #cbd5e1;
}

.dark .ami-primary-tool.is-active .ami-tool-icon {
  background: #10b981;
  color: #052e26;
}

@media (max-width: 900px) {
  .ami-primary-tools {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .ami-primary-tool {
    flex: 0 0 154px;
  }
}

@media (max-width: 460px) {
  .ami-primary-tools {
    gap: 4px;
    padding: 5px;
    border-radius: 14px;
  }

  .ami-primary-tool {
    flex-basis: 142px;
    min-height: 48px;
    padding: 7px 8px;
  }

  .ami-tool-icon {
    width: 28px;
    height: 28px;
  }

  .ami-tool-copy strong {
    font-size: 10px;
  }

  .ami-tool-copy small {
    font-size: 8px;
  }
}