.home-ai-area {
  position: relative;
  width: min(820px, 100%);
  margin: 24px auto 0;
  animation-delay: .18s;
}
.home-ai-area::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -45px -35px -25px;
  pointer-events: none;
  background: radial-gradient(ellipse, #dce7ff70, #e6f6ff35 50%, transparent 75%);
}
.home-ai-panel {
  padding: 14px 18px 12px;
  border: 1px solid #d2dbe9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 40px #405b8010;
  text-align: left;
  font-size: 14px;
  line-height: 1.8;
  scroll-margin-top: 24px;
}
.home-ai-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.home-ai-heading h2 { font-size: 18px; font-weight: 600; }
.home-ai-heading > span { color: var(--muted); font-size: 12px; }
.home-ai-panel .home-ai-thread {
  min-height: 0;
  max-height: 240px;
  padding: 12px 14px;
  margin-top: 10px;
  border: 0;
  background: #f5f8fd;
  overscroll-behavior-y: contain;
}
.home-ai-panel .home-ai-thread[hidden] { display: none; }
.home-ai-panel .home-ai-msg strong { font-size: 13px; }
.home-ai-panel .home-ai-msg p { margin-top: 4px; }
.home-ai-panel .home-ai-form { margin-top: 10px; }
.home-ai-panel .home-ai-form textarea {
  min-height: 64px;
  padding: 10px 12px;
  font-size: 16px;
  border-color: #d9e0eb;
}
.home-ai-panel .home-ai-form textarea::placeholder { color: #8b97aa; }
.home-ai-panel .home-ai-bar { gap: 10px 16px; flex-wrap: wrap; }
.home-ai-panel .home-ai-bar > label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b778c;
  font-size: 12px;
}
.home-ai-panel .home-ai-bar select { min-height: 44px; color: var(--ink); }
.home-ai-panel .home-ai-actions { margin-left: auto; }
.home-ai-panel .home-ai-actions button { min-height: 44px; }
.home-ai-panel #home-ai-clear { background: #f1f4f8; color: #657186; }
.home-ai-panel #home-ai-submit { min-width: 88px; }
.home-ai-help {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.home-ai-panel a { color: var(--blue); }
.home-ai-panel a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .home-ai-area { margin-top: 24px; }
  .home-ai-panel { padding: 16px 14px 12px; border-radius: 14px; }
  .home-ai-heading h2 { font-size: 17px; }
  .home-ai-heading > span { font-size: 10px; }
  .home-ai-panel .home-ai-thread { padding: 12px; font-size: 13px; }
  .home-ai-panel .home-ai-form textarea { padding: 12px; }
  .home-ai-panel .home-ai-bar > label { gap: 6px; font-size: 11px; }
  .home-ai-panel .home-ai-actions { gap: 8px; }
  .home-ai-panel .home-ai-actions button { padding-inline: 14px; }
  .home-ai-panel #home-ai-submit { min-width: 80px; }
  .home-ai-help { font-size: 10px; line-height: 1.9; }
}
@media (max-width: 360px) {
  .home-ai-panel .home-ai-bar { gap: 8px; }
  .home-ai-panel .home-ai-bar > label { font-size: 0; gap: 0; }
  .home-ai-panel .home-ai-bar select { font-size: 12px; max-width: 96px; }
}

/* A single composer surface, scoped to the homepage's reference layout. */
.page-home .hero h1 {
  max-width: none;
  font-size: clamp(32px, 3.4vw, 60px);
  line-height: 1.42;
  letter-spacing: -1.8px;
  white-space: normal;
  text-wrap: balance;
}
.page-home .hero h1 .hero-title-line { display: inline-block; color: var(--ink); }
.page-home .hero h1 .hero-title-period { color: var(--blue); }
.page-home .home-ai-area { width: min(760px, 100%); margin-top: 32px; }
.page-home .home-ai-area::before {
  inset: -38px -55px -25px;
  background: radial-gradient(ellipse at 30% 45%, #daf2fb85, transparent 65%),
              radial-gradient(ellipse at 75% 50%, #e2eaff85, transparent 65%);
  filter: blur(18px);
}
.home-ai-panel.home-ai-composer {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-ai-composer .home-ai-form {
  margin: 0;
  overflow: hidden;
  border: 1px solid #cfd7e3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px #243e6710;
  transition: border-color .2s, box-shadow .2s;
}
.home-ai-composer .home-ai-form:focus-within {
  border-color: #7daaf4;
  box-shadow: 0 0 0 3px #1768fa0b, 0 10px 32px #243e6714;
}
.home-ai-composer .home-ai-form textarea {
  height: 78px;
  min-height: 78px;
  max-height: 200px;
  padding: 17px 22px 8px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  line-height: 1.6;
  resize: vertical;
}
.home-ai-composer .home-ai-form textarea:focus { outline: 0; }
.home-ai-composer .home-ai-form textarea::placeholder { color: #949fb1; }
.home-ai-composer .home-ai-bar {
  margin: 0;
  padding: 0 16px 12px 22px;
  flex-wrap: nowrap;
  gap: 8px;
}
.home-ai-composer #home-ai-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #67768b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.home-ai-composer #home-ai-title .icon { width: 15px; height: 15px; color: var(--blue); }
.home-ai-composer .home-ai-actions { gap: 6px; }
.home-ai-composer #home-ai-clear {
  min-height: 44px;
  padding: 10px;
  background: transparent;
  color: #8490a2;
  font-size: 11px;
}
.home-ai-composer #home-ai-clear:hover { color: var(--blue); }
.home-ai-composer .home-ai-form:has(textarea:placeholder-shown) #home-ai-clear {
  visibility: hidden;
  pointer-events: none;
}
.home-ai-composer #home-ai-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 118px;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 24px;
  background: #1c202b;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s;
}
.home-ai-composer #home-ai-submit:hover { background: var(--blue); }
.home-ai-composer #home-ai-submit .icon { width: 15px; height: 15px; }
.home-ai-composer #home-ai-launch-status { padding: 10px 4px 0; font-size: 12px; }
.page-home .home-ai-area .suggestions { margin-top: 16px; }
@media (max-width: 600px) {
  .page-home .hero h1 { font-size: clamp(27px, 7vw, 36px); letter-spacing: -.9px; }
  .page-home .hero h1 .hero-title-line { white-space: nowrap; }
  .page-home .home-ai-area { margin-top: 27px; }
  .page-home .home-ai-area::before { inset-inline: -12px; }
  .home-ai-composer .home-ai-form { border-radius: 17px; }
  .home-ai-composer .home-ai-form textarea { padding-inline: 16px; font-size: 16px; }
  .home-ai-composer .home-ai-bar { padding: 0 10px 10px 16px; }
  .home-ai-composer #home-ai-title { gap: 5px; font-size: 11px; }
  .home-ai-composer #home-ai-title .icon { width: 13px; height: 13px; }
  .home-ai-composer .home-ai-actions { gap: 0; }
  .home-ai-composer #home-ai-clear { padding-inline: 7px; font-size: 10px; }
  .home-ai-composer #home-ai-submit { min-width: 96px; padding-inline: 13px; gap: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-ai-composer .home-ai-form, .home-ai-composer #home-ai-submit { transition: none; }
}
