.tool-header {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 16px 20px;
}

.tool-brand {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  grid-column: 1;
  justify-self: start;
  min-width: 0;
  text-decoration: none;
}

.tool-brand img {
  height: 32px;
  object-fit: contain;
  width: 32px;
}

.tool-brand span,
.tool-brand strong {
  color: var(--text, #f3ead7);
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-header nav {
  align-items: center;
  background: color-mix(in srgb, var(--card-dark, #15121a) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--line-bright, #b8985e) 32%, transparent);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 2;
  justify-content: center;
  justify-self: center;
  padding: 4px;
}

.tool-header nav a,
.tool-header nav .nav-disabled {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  min-height: 38px;
  padding: 10px 12px;
}

.tool-header nav a {
  color: var(--muted, #c8bdd1);
  text-decoration: none;
}

.tool-header nav .nav-disabled {
  color: color-mix(in srgb, var(--muted, #c8bdd1) 58%, transparent);
  cursor: not-allowed;
  text-decoration: none;
}

.tool-header nav a:hover {
  background: color-mix(in srgb, var(--card, #211b27) 78%, var(--line-bright, #b8985e) 22%);
  color: var(--text, #f3ead7);
  text-decoration: none;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-column: 3;
  justify-self: end;
}

.header-actions .site-account {
  margin-left: 0;
}

.theme-toggle {
  background: color-mix(in srgb, var(--card-dark, #15121a) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--line-bright, #b8985e) 34%, transparent);
  border-radius: 8px;
  color: var(--muted, #c8bdd1);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  margin: 0;
  min-height: 40px;
  padding: 0 12px;
}

.theme-toggle:hover {
  border-color: var(--line-bright, #b8985e);
  color: var(--text, #f3ead7);
}

.discord-mark {
  display: inline-flex;
  height: 18px;
  width: 18px;
}

.discord-mark svg {
  display: block;
  height: 100%;
  width: 100%;
}

.cloud-account {
  margin-left: 0;
  position: relative;
}

.cloud-login {
  align-items: center;
  background: #5865f2;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
  min-height: 40px;
  padding: 0 11px;
  text-decoration: none;
}

.cloud-profile {
  align-items: center;
  background: rgba(24, 21, 30, 0.88);
  border: 1px solid rgba(226, 191, 114, 0.28);
  border-radius: 8px;
  color: #faf2de;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  margin: 0;
  min-height: 40px;
  padding: 4px 9px 4px 5px;
}

.cloud-profile img {
  border-radius: 50%;
  height: 28px;
  object-fit: cover;
  width: 28px;
}

.tool-banner {
  background: var(--card-dark, #15121a);
  border: 1px solid color-mix(in srgb, var(--line-bright, #b8985e) 34%, transparent);
  border-radius: 8px;
  display: block;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.tool-banner img {
  display: block;
  filter: brightness(0.78) saturate(0.88) contrast(0.98);
  height: clamp(96px, 18vw, 180px);
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.tool-banner-badge {
  background: color-mix(in srgb, var(--purple, #8c6ed1) 54%, var(--card-dark, #15121a));
  border: 1px solid color-mix(in srgb, var(--line-bright, #b8985e) 42%, transparent);
  border-radius: 999px;
  bottom: 10px;
  color: var(--text, #f3ead7);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  padding: 7px 10px;
  position: absolute;
  right: 10px;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .tool-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 14px;
  }

  .tool-header nav {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .tool-header nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .tool-header nav .nav-disabled {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .header-actions {
    grid-column: 2;
  }

  .theme-toggle {
    min-width: 0;
  }

  .tool-banner img {
    height: 76px;
  }
}
