/* Welcome-page guidance. Existing controllers own uploads, modes and submission. */
body.yf-ui-prototype[data-yf-soft-route="home"]:not(.is-conversation-mode) main > #home.hero {
  justify-content: flex-start;
  padding-top: clamp(124px, 20dvh, 180px);
  padding-bottom: 80px;
}
body.yf-ui-prototype:not(.is-conversation-mode) #home > .hero-copy {
  position: static;
  margin: 0 auto 56px;
}
body.yf-ui-prototype:not(.is-conversation-mode) #home .hero-brand-eyebrow {
  margin-bottom: 14px;
  transform: none;
}
body.yf-ui-prototype:not(.is-conversation-mode) #home .hero-brand-sub { display: none; }
body.yf-ui-prototype:not(.is-conversation-mode) #home .hero-copy h1 { position: static; }
body.yf-ui-prototype:not(.is-conversation-mode) #home .hero-sub {
  display: block;
  max-width: 100%;
  margin: 12px 0 0;
  color: var(--yf-muted);
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0;
}
body.yf-ui-prototype:not(.is-conversation-mode) #home #searchForm.composer { transform: none; }
body.yf-ui-prototype[data-companion-visual="line"]:not(.is-conversation-mode) #home .hero-stage > .companion { top: -48px !important; }
body.yf-ui-prototype #home #searchForm:has(:is(#chatModelMenu,#uploadMenu):not([hidden])) { z-index: 5; }

/* Keep the original upload control, including its menu, file inputs and handlers. */
body.yf-ui-prototype[data-yf-style] #home #searchForm #uploadMoreBtn {
  --yf-upload-width: 96px;
  width: var(--yf-upload-width);
  min-width: var(--yf-upload-width);
  flex-basis: auto;
  padding-inline: 9px;
  gap: 5px;
  white-space: nowrap;
}
#uploadMoreBtn .home-upload-label { font-size: 13px; line-height: 20px; font-weight: 500; }
body.yf-ui-prototype #home #searchForm #uploadMoreBtn > .home-upload-long { display: inline; }
body.yf-ui-prototype #home #searchForm #uploadMoreBtn > .home-upload-short { display: none; }

/* Explain the decision inside the existing mode menu, where it is needed. */
body.yf-ui-prototype #home #chatModelMenu.mode-menu { width: 264px; max-width: calc(100vw - 52px); }
body.yf-ui-prototype #home #chatModelMenu.mode-menu .mode-menu-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  text-align: left;
}
body.yf-ui-prototype #home #chatModelMenu .mode-menu-ico { grid-row: 1 / 3; }
body.yf-ui-prototype #home #chatModelMenu small {
  grid-column: 2;
  color: var(--yf-muted);
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
  white-space: normal;
}

/* These are optional starts, never submitted prompts or new business routes. */
body.yf-ui-prototype #home .home-starters { margin-top: 22px; }
body.yf-ui-prototype #home .home-starters > p {
  margin: 0 0 10px;
  color: var(--yf-muted);
  font-size: 12px;
  line-height: 20px;
}
body.yf-ui-prototype #home .home-starter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.yf-ui-prototype #home .home-starter-actions button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-control-radius);
  background: transparent;
  color: var(--yf-text);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}
body.yf-ui-prototype #home .home-starter-actions button:hover { border-color: var(--yf-border-strong); background: var(--yf-surface); }
body.yf-ui-prototype #home .home-starter-actions button:focus-visible { outline: 2px solid var(--yf-primary); outline-offset: 3px; }
body.yf-ui-prototype #home .home-starters[hidden],
body.yf-ui-prototype #home .hero-stage:has(#chatInput:not(:placeholder-shown),#chatInput:disabled,#chatInput[readonly],#chatAttachmentChips > *) .home-starters,
body.yf-ui-prototype.is-conversation-mode #home .home-starters,
body.yf-ui-prototype[data-yf-soft-busy="true"] #home .home-starters { display: none; }
body.yf-ui-prototype[data-yf-style="handdrawn"] #home .home-starter-actions button { border-style: dashed; background: var(--yf-surface); }
body.yf-ui-prototype[data-yf-style="minimal"] #home .home-starter-actions button,
body.yf-ui-prototype[data-yf-style="book"] #home .home-starter-actions button { border-radius: 2px; }
/* The page rule follows the content as the welcome section grows. */
body.yf-ui-prototype[data-yf-style="book"]:not(.is-conversation-mode) #home::after {
  position: relative;
  z-index: auto;
  inset: auto;
  width: min(740px, calc(100% - 56px));
  margin: 32px auto 0;
}

@media (max-width: 720px) {
  body.yf-ui-prototype[data-yf-soft-route="home"]:not(.is-conversation-mode) main > #home.hero {
    padding-top: clamp(128px, 19dvh, 168px);
    padding-bottom: max(64px, env(safe-area-inset-bottom));
  }
  body.yf-ui-prototype:not(.is-conversation-mode) #home > .hero-copy { margin-bottom: 48px; }
  body.yf-ui-prototype:not(.is-conversation-mode) #home .hero-brand-eyebrow { margin-bottom: 14px; }
  body.yf-ui-prototype:not(.is-conversation-mode) #home .hero-sub { max-width: 25em; margin: 10px auto 0; padding-inline: 6px; font-size: 13px; line-height: 22px; text-wrap: balance; }
  body.yf-ui-prototype[data-yf-style] #home #searchForm #uploadMoreBtn { --yf-upload-width: 74px; padding-inline: 8px; }
  body.yf-ui-prototype #home #searchForm #uploadMoreBtn > .home-upload-long { display: none; }
  body.yf-ui-prototype #home #searchForm #uploadMoreBtn > .home-upload-short { display: inline; }
  body.yf-ui-prototype #home #chatModelMenu.mode-menu { left: -82px; right: auto; }
  body.yf-ui-prototype #home .home-starters { margin-top: 20px; }
  body.yf-ui-prototype #home .home-starter-actions { gap: 8px; }
  body.yf-ui-prototype #home .home-starter-actions button { min-height: 44px; padding-inline: 11px; }
}
@media (max-height: 650px) and (max-width: 720px) {
  body.yf-ui-prototype[data-yf-soft-route="home"]:not(.is-conversation-mode) main > #home.hero { padding-top: 112px; }
}
