.tools-dashboard-page {
  padding: calc(var(--nav-height) + 24px) 20px 40px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(140, 183, 28, 0.2), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(36, 71, 131, 0.15), transparent 42%),
    #f5f8fb;
}

.tools-dashboard-api-switch {
  max-width: 1100px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #d6dce6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(26, 45, 81, 0.06);
}

.api-switch-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.api-switch-copy span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #60738f;
  text-transform: uppercase;
}

.api-switch-copy strong {
  font-size: 1rem;
  color: #15325f;
}

.api-switch-copy small {
  color: #4c6385;
}

.api-switch-segments {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #edf2f7;
}

.api-switch-segments button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #365277;
  font-weight: 700;
  cursor: pointer;
}

.api-switch-segments button.is-active {
  background: #1f6f4a;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(31, 111, 74, 0.24);
}

.tools-dashboard-head {
  max-width: 1100px;
  margin: 0 auto 20px;
}

.tools-dashboard-head h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #15325f;
}

.tools-dashboard-head p {
  margin: 0;
  color: #32517f;
}

.tools-dashboard-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.tool-card {
  display: grid;
  grid-template-rows: 140px 1fr;
  border: 1px solid #d6dce6;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(26, 45, 81, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(26, 45, 81, 0.14);
}

.tool-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eef3f9;
}

.tool-card-content {
  padding: 12px;
}

.tool-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.04rem;
  color: #1c365f;
}

.tool-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #4c6385;
}

@media (max-width: 1000px) {
  body.inside-page .tools-dashboard-page {
    padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px) + 14px);
  }

  .tools-dashboard-api-switch {
    align-items: stretch;
    flex-direction: column;
  }

  .api-switch-segments {
    width: 100%;
  }
}
