.ai-hero {
  align-items: center;
  display: grid;
  justify-items: center;
  margin-inline: auto;
  min-height: 520px;
  padding: 72px 0 44px;
  width: 100%;
}

.hero-side,
.ask-panel,
.hero-intro {
  display: grid;
  justify-items: center;
  min-width: 0;
  width: 100%;
}

.hero-side {
  gap: 18px;
  max-width: 860px;
}

.ask-panel {
  gap: 18px;
}

.hero-intro {
  gap: 12px;
  text-align: center;
}

.hero-intro h1 {
  font-size: 56px;
  font-weight: 620;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.hero-copy {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  max-width: 620px;
}

.home-hero-chat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: none;
  box-sizing: border-box;
  margin-top: 10px;
  max-width: 760px;
  min-height: 88px;
  padding: 18px 68px 18px 22px;
  position: relative;
  width: min(100%, 760px);
}

.home-chat-input.home-hero-chat-input {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--fg);
  font-size: 17px;
  height: 50px;
  line-height: 1.45;
  min-height: 50px;
  outline: 0;
  padding: 0;
  resize: none;
  width: 100%;
}

.home-chat-input::placeholder {
  color: var(--muted);
}

.send-button.home-chat-send {
  bottom: 16px;
  height: 38px;
  right: 16px;
  top: auto;
  transform: none;
  width: 38px;
}

.home-chat-output {
  display: block;
  font-size: 14px;
  margin-top: 8px;
}

.hero-links,
.command-actions,
.command-actions > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-link,
.chat-suggestions {
  box-shadow: none;
}

.chat-suggestions.inline-flex,
.chat-suggestions {
  border-radius: 999px;
  min-height: 34px;
}

.home-project-groups {
  display: grid;
  gap: 54px;
  margin: 0 auto;
  max-width: 1120px;
  padding-bottom: 72px;
  width: 100%;
}

.featured {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 22px;
  padding-top: 34px;
}

.group-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.group-head > div {
  display: grid;
  gap: 4px;
}

.group-head h2,
.directory-group h3 {
  margin: 0;
}

.group-head p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  max-width: 410px;
}

.featured-grid,
.directory-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-groups {
  display: grid;
  gap: 34px;
}

.directory-group {
  display: grid;
  gap: 14px;
}

.directory-group h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
}

.feature-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  color: inherit;
  display: grid;
  gap: 10px;
  min-height: 130px;
  padding: 18px;
  text-decoration: none;
}

.feature-card:hover {
  border-color: var(--line-strong);
  color: var(--fg);
}

.feature-card strong {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
}

.feature-card span:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.feature-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  padding: 6px 12px;
}

.feature-toggle:hover,
.feature-toggle[aria-pressed="true"] {
  border-color: var(--line-strong);
  color: var(--fg);
}

.chat-suggestions.profile-action {
  background: #fff4b8;
  border-color: #e2b400;
  color: #3d3100;
}

.chat-suggestions.profile-action:hover {
  background: #ffe66d;
  border-color: #c79a00;
  color: #241c00;
}

@media (max-width: 900px) {
  .ai-hero {
    min-height: 480px;
    padding-top: 56px;
  }

  .hero-intro h1 {
    font-size: 46px;
  }

  .featured-grid,
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-head {
    align-items: start;
    display: grid;
  }
}

@media (max-width: 640px) {
  .ai-hero {
    min-height: 430px;
    padding: 42px 0 34px;
  }

  .hero-side,
  .ask-panel {
    gap: 14px;
  }

  .hero-intro h1 {
    font-size: 38px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .home-hero-chat {
    border-radius: 22px;
    min-height: 82px;
    padding: 16px 62px 16px 18px;
  }

  .send-button.home-chat-send {
    bottom: 14px;
    right: 14px;
  }

  .hero-link {
    font-size: 14px;
    min-height: 36px;
    padding: 8px 13px;
  }

  .featured-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }
}
