.sg-welcome { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; overflow: hidden; background: #090909; }
.sg-portrait, .sg-amber { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: right center; pointer-events: none; }
.sg-amber { z-index: -1; opacity: .68; }
.sg-welcome-copy { position: relative; width: min(550px, 49%); padding-top: clamp(100px, 20vh, 224px); margin-inline-start: 56px; }
.sg-welcome-copy h1 { margin: 0; line-height: 0; }
.sg-welcome-copy h1 img { display: block; width: 480px; max-width: 100%; height: auto; }
.sg-welcome-tagline { margin: 22px 0 16px; color: #faf7f0; font-size: clamp(28px, 3.1vw, 42px); line-height: 1.15; letter-spacing: -.025em; font-weight: 500; }
.sg-welcome-intro { margin: 0; color: #f1ede5; font-size: 22px; line-height: 1.38; letter-spacing: -.015em; }
.sg-welcome-actions { position: absolute; inset-inline: 56px; bottom: 32px; }
.sg-community-invitation { width: max-content; max-width: 70%; margin-bottom: 24px; }
.sg-community-invitation > a { display: inline-flex; align-items: center; gap: 14px; min-height: 32px; color: #faf7f0; font-size: 22px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.sg-community-invitation > a:hover { color: #e7b65f; }
.sg-community-invitation svg { color: #e7b65f; }
.sg-community-invitation p { margin: 2px 0 0; color: #e8e2d7; font-size: 17px; line-height: 1.35; }
.sg-welcome-form { padding: 17px; border: 1px solid #48443c; border-radius: 20px; background: rgb(22 22 22 / 97%); }
.sg-search-modes { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.sg-search-modes button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 7px 18px; border: 1px solid #48443c; border-radius: 24px; background: transparent; color: #c9c3b8; font: inherit; font-size: 15px; line-height: 1.3; cursor: pointer; }
.sg-search-modes button[aria-pressed="true"] { border-color: #e7b65f; color: #f0c76e; background: #19170f; }
.sg-search-modes button:hover { color: #faf7f0; border-color: #a7936f; }
.sg-search-modes svg { width: 20px; height: 20px; }
.sg-question-field { display: flex; align-items: flex-end; gap: 14px; min-height: 93px; padding: 16px; border: 1px solid #48443c; border-radius: 14px; background: #1d1d1d; }
.sg-question-field:focus-within { border-color: #e7b65f; }
.sg-question-field textarea, .sg-question-field input { display: block; flex: 1; width: 100%; min-width: 0; margin: 0; padding: 4px; border: 0; border-radius: 0; outline: none; background: transparent; color: #faf7f0; caret-color: #e7b65f; font: inherit; font-size: 18px; line-height: 1.4; resize: vertical; }
.sg-question-field textarea { min-height: 60px; max-height: 180px; }
.sg-question-field input { align-self: center; }
.sg-question-field textarea::placeholder, .sg-question-field input::placeholder { color: #bcb5a9; opacity: 1; }
.sg-ask-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 10px; min-width: 106px; min-height: 52px; padding: 12px 18px; border: 1px solid #edc879; border-radius: 10px; background: #e7b65f; color: #17120a; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.sg-ask-button:hover { background: #f2ce88; }
.sg-ask-button:disabled { background: #5d4e36; color: #d6c6aa; cursor: wait; }
.sg-ask-button svg { width: 20px; height: 20px; }
.sg-question-terms { margin: 14px 8px 0; color: #c2baad; font-size: 13px; line-height: 1.45; }
.sg-question-terms a { color: #f0c76e; }
.sg-preview-notice { margin: 9px 8px 0; color: #c2baad; font-size: 12px; line-height: 1.4; }
.sg-draft-warning { margin: 10px 8px; color: #f2ce88; font-size: 14px; line-height: 1.45; }
.sg-catalog-search { max-width: 1000px; margin: 0 auto 28px; }
.sg-catalog-search > label { display: block; margin-bottom: 10px; color: #eee9df; font-size: 16px; font-weight: 500; }
.sg-catalog-search .sg-question-field { min-height: 74px; padding: 10px; }
@media (max-height: 870px) and (min-width: 901px) {
  .sg-welcome-copy { padding-top: 11vh; width: min(490px, 49%); }
  .sg-welcome-copy h1 img { width: 390px; }
  .sg-welcome-tagline { margin-top: 18px; font-size: 34px; }
  .sg-welcome-intro { font-size: 19px; }
  .sg-welcome-actions { bottom: 22px; }
  .sg-community-invitation { margin-bottom: 18px; }
  .sg-community-invitation > a { font-size: 20px; }
  .sg-community-invitation p { font-size: 15px; }
  .sg-welcome-form { padding: 13px; }
  .sg-search-modes { margin-bottom: 12px; }
  .sg-question-field { min-height: 86px; padding: 12px; }
}
@media (max-width: 1150px) and (min-width: 901px) {
  .sg-welcome-copy { margin-inline-start: 36px; width: 53%; }
  .sg-welcome-tagline { font-size: 32px; }
  .sg-welcome-intro { font-size: 18px; }
  .sg-welcome-actions { inset-inline: 36px; }
}
@media (max-width: 900px) {
  .sg-welcome { min-height: calc(100svh - 64px); padding-bottom: 28px; overflow: hidden; }
  .sg-portrait { opacity: .6; object-position: 72% top; }
  .sg-amber { opacity: .45; }
  .sg-welcome-copy { width: min(550px, 82%); padding-top: 66px; margin-inline-start: 30px; }
  .sg-welcome-copy h1 img { width: 390px; }
  .sg-welcome-tagline { font-size: 32px; }
  .sg-welcome-intro { font-size: 19px; }
  .sg-welcome-actions { position: relative; inset: auto; margin: 72px 30px 0; }
  .sg-community-invitation { max-width: 100%; margin-bottom: 22px; }
  .sg-community-invitation > a { font-size: 20px; }
  .sg-community-invitation p { font-size: 15px; }
}
@media (max-width: 560px) {
  .sg-welcome-copy { width: calc(100% - 44px); padding-top: 56px; margin-inline-start: 22px; }
  .sg-welcome-copy h1 img { width: 300px; }
  .sg-welcome-tagline { margin: 20px 0 14px; font-size: 28px; }
  .sg-welcome-intro { max-width: 28ch; font-size: 17px; }
  .sg-welcome-actions { margin: 58px 18px 0; }
  .sg-community-invitation > a { font-size: 18px; }
  .sg-community-invitation p { max-width: 34ch; font-size: 14px; }
  .sg-welcome-form { padding: 12px; border-radius: 16px; }
  .sg-search-modes { gap: 8px; }
  .sg-search-modes button { flex: 1; gap: 6px; padding: 8px 10px; font-size: 12px; }
  .sg-search-modes svg { width: 17px; height: 17px; }
  .sg-question-field { flex-wrap: wrap; padding: 10px; }
  .sg-question-field textarea { flex-basis: 100%; min-height: 66px; font-size: 16px; }
  .sg-ask-button { margin-inline-start: auto; min-width: 90px; min-height: 44px; font-size: 15px; }
  .sg-question-terms { margin-inline: 2px; font-size: 12px; }
  .sg-preview-notice { margin-inline: 2px; }
}

.sg-research-app .sg-welcome { width: 100%; height: 100%; min-height: 680px; overflow-y: auto; }
.sg-native-composer { padding: 0 !important; background: transparent; }
.sg-native-composer > form > div:first-child { border-radius: 14px; background: #1d1d1d; box-shadow: none; }
/* Keep the typing focus indicator on the rounded composer boundary. */
.sg-research-app [class~="group/form-container"] > form > div:has(> textarea:focus-visible) { outline: 2px solid var(--sg-gold); outline-offset: -2px; }
.sg-research-app [class~="group/form-container"] textarea:focus-visible { outline: none; outline-offset: 0; }
.sg-native-composer textarea { min-height: 70px; padding: 16px 18px; color: #faf7f0; font-size: 17px; line-height: 1.4; }
.sg-native-submit { display: inline-flex; align-items: center; gap: 8px; min-width: 96px; min-height: 44px; padding: 10px 16px; border-radius: 9px; background: #e7b65f; color: #17120a; font-size: 15px; font-weight: 600; }
.sg-native-submit:hover { background: #f2ce88; }
.sg-native-submit:disabled { background: #665536; color: #e5d6bb; }
.sg-preview-composer { width: 100%; }
.sg-preview-composer > div { max-width: none; }
.sg-preview-composer [role="status"], .sg-preview-composer [role="alert"] { margin: 0 4px 12px; color: #f2ce88; font-size: 14px; }
.sg-composer-body { min-width: 0; }
.sg-welcome .sg-composer-body [data-testid="full-chat"] { height: auto; }
.sg-conversation, .sg-conversation-body { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; height: 100%; width: 100%; }
.sg-conversation .sg-composer-body { display: flex; flex: 1; min-height: 0; }
@media (min-width: 901px) and (max-height: 870px) {
 .sg-research-app .sg-welcome-copy { padding-top: 8vh; }
 .sg-research-app .sg-welcome-copy h1 img { width: 330px; }
 .sg-research-app .sg-welcome-tagline { font-size: 30px; margin-block: 14px 12px; }
 .sg-research-app .sg-welcome-intro { font-size: 18px; }
 .sg-research-app .sg-community-invitation { margin-bottom: 16px; }
}
@media (max-width: 900px) {
 .sg-research-app .sg-welcome { min-height: 0; height: 100%; }
 .sg-research-app .sg-welcome-actions { margin-top: 72px; }
}
@media (max-width: 560px) {
 .sg-native-composer textarea { min-height: 76px; font-size: 16px; padding: 14px; }
 .sg-native-submit { min-width: 82px; min-height: 44px; }
}

.sg-welcome .sg-native-composer > form { max-width: none; margin: 0; }
.sg-welcome .sg-native-composer textarea { min-height: 112px; padding: 14px 18px 60px; }
.sg-welcome .sg-native-composer textarea + div { position: absolute; inset-inline: 8px; bottom: 6px; padding: 0; }
.sg-welcome .sg-question-terms { margin-top: 12px; }
.sg-welcome .sg-preview-notice { margin-top: 5px; }

@media (max-width: 900px) { .sg-welcome::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 20%, rgb(9 9 9 / 45%) 45%, rgb(9 9 9 / 92%) 80%); } }

.sg-welcome::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgb(9 9 9 / .68) 0%, rgb(9 9 9 / .56) 38%, transparent 72%); }
.sg-welcome .sg-question-terms, .sg-welcome .sg-preview-notice { width: fit-content; max-width: 100%; padding: 4px 8px; background: #090909; color: #d7d0c3; font-size: 14px; line-height: 1.5; border-radius: 4px; }
.sg-research-app .sg-welcome { min-height: 760px; }
@media (max-width: 900px) { .sg-welcome::after { background: linear-gradient(180deg, rgb(9 9 9 / .28), rgb(9 9 9 / .6)); } .sg-research-app .sg-welcome { min-height: 0; } }

@media (min-width: 901px) and (min-height: 871px) { .sg-research-app .sg-welcome-copy { padding-top: clamp(80px, 14vh, 180px); } }
