/* AI API Hub */

.aihub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 32px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(600px 240px at 10% 0%, var(--theme-dim), transparent 60%),
    #fff;
}

.aihub-badge {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--theme-dim);
  color: var(--theme-deep);
  font-size: 0.75rem;
  font-weight: 700;
}

.aihub-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.03em;
  color: var(--text);
}

.aihub-hero h1 span {
  color: var(--theme);
}

.aihub-hero__lead {
  margin: 0 0 18px;
  max-width: 52ch;
  color: var(--text-soft);
  line-height: 1.65;
}

.aihub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.aihub-keybox {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}

.aihub-keybox__label {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #166534;
}

.aihub-keybox__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.aihub-keybox__row code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #86efac;
  font-size: 0.82rem;
  word-break: break-all;
}

.aihub-keybox__hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.45;
}

.aihub-keybox__status {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #14532d;
}

.aihub-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.aihub-stats strong {
  color: var(--theme-deep);
}

.aihub-hero__visual {
  position: relative;
  min-height: 220px;
}

.aihub-orb {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
  font-weight: 700;
  color: var(--theme);
}

.aihub-orb--key { width: 88px; height: 88px; left: 18%; top: 20%; font-size: 1.8rem; }
.aihub-orb--code { width: 72px; height: 72px; right: 18%; top: 12%; }
.aihub-orb--a { width: 64px; height: 64px; left: 42%; bottom: 18%; }
.aihub-orb--b { width: 58px; height: 58px; right: 28%; bottom: 28%; }

.aihub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.aihub-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  margin-bottom: 22px;
}

.aihub-filters input,
.aihub-filters select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.aihub-step h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.aihub-step h2 span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--theme);
  color: #fff;
  font-size: 0.85rem;
}

.aihub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.aihub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.aihub-card:hover {
  border-color: var(--theme);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.aihub-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aihub-card__logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--theme-dim);
  color: var(--theme-deep);
  font-weight: 800;
}

.aihub-card__name {
  margin: 0;
  font-size: 1rem;
}

.aihub-card__provider {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.aihub-pill {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.7rem;
  font-weight: 700;
}

.aihub-pill--paid {
  background: #fee2e2;
  color: #991b1b;
}

.aihub-card__desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
  flex: 1;
}

.aihub-card__features {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.aihub-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn--sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.aihub-card__more {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--theme);
}

.aihub-side-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 14px;
}

.aihub-side-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.aihub-side-card ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.aihub-popular {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aihub-popular a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.aihub-popular span {
  color: var(--muted);
  font-size: 0.8rem;
}

.aihub-side-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--theme);
}

.aihub-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aihub-cats a,
.aihub-cats span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--theme-dim);
  color: var(--theme-deep);
  font-size: 0.78rem;
  font-weight: 600;
}

.aihub-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

.aihub-detail-hero {
  margin-bottom: 22px;
}

.aihub-detail-block {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.aihub-detail-block h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.aihub-feature-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.aihub-code {
  position: relative;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
}

.aihub-code pre {
  margin: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
}

.aihub-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.aihub-endpoint {
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.aihub-endpoint code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.link-btn {
  margin-left: 8px;
  color: var(--theme);
  font-weight: 600;
  font-size: 0.84rem;
}

.aihub-specs {
  margin: 0 0 14px;
}

.aihub-specs div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.aihub-specs dt {
  color: var(--muted);
}

.aihub-specs dd {
  margin: 0;
  font-weight: 600;
}

.aihub-status {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #166534;
}

.aihub-status .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #22c55e;
}

@media (max-width: 960px) {
  .aihub-hero,
  .aihub-layout {
    grid-template-columns: 1fr;
  }

  .aihub-hero__visual {
    min-height: 160px;
  }

  .aihub-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .aihub-filters {
    grid-template-columns: 1fr;
  }
}
