/* The landing screen fits the viewport; conversation and history have their own scroll areas. */
html:has(body[data-page="search"]){height:100%;overflow:hidden}
body[data-page="search"]{--history-width:0px;height:100dvh;max-height:100dvh;overflow:hidden}
body[data-page="search"] #main{width:calc(100% - var(--history-width))!important;max-width:none;margin:0 0 0 var(--history-width)!important;min-height:0;overflow:hidden}
body[data-page="search"]:not(.has-results) #main{padding:clamp(10px,2vh,22px) 20px 64px!important;gap:clamp(8px,1.5vh,16px);justify-content:center!important}
body[data-page="search"]:not(.has-results) .search-results{flex:none;overflow:visible}
body[data-page="search"]:not(.has-results) .conversation{padding:0;width:100%;max-width:850px}
body[data-page="search"]:not(.has-results) .welcome-message h2{font-size:clamp(20px,2vw,26px);line-height:1.3;max-width:760px}
body[data-page="search"]:not(.has-results) .welcome-fina-mark{width:36px;height:36px;margin-bottom:10px;border-radius:10px}
body[data-page="search"]:not(.has-results) .search-stage{width:100%;max-width:850px;min-height:0;flex:none;padding:0;gap:16px;overflow:visible}
body[data-page="search"]:not(.has-results) .search-composer{width:min(760px,100%)}
body[data-page="search"]:not(.has-results) #search-form{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:12px;padding:15px 18px}
body[data-page="search"]:not(.has-results) #question{height:52px;min-height:52px;max-height:52px;padding-block:calc((52px - 1.35em)/2);font-size:19px;line-height:1.35}
body[data-page="search"]:not(.has-results) .composer-bottom{margin:0;align-self:center}
body[data-page="search"]:not(.has-results) .prompt-suggestions-title{margin:4px 0 0;font-size:14px;line-height:1.3}
body[data-page="search"]:not(.has-results) .example-prompts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;width:min(760px,100%);overflow:visible}
body[data-page="search"]:not(.has-results) .example-prompts button{min-height:64px;padding:10px;font-size:14px;line-height:1.35;border-radius:12px;white-space:normal;overflow:visible}
body[data-page="search"]:not(.has-results) .latest-reports{margin:6px 0 0}
body[data-page="search"]:not(.has-results) .latest-reports h2{margin-bottom:11px}
body[data-page="search"]:not(.has-results) .latest-report-links{gap:8px}
body[data-page="search"]:not(.has-results) .latest-report-links a{min-height:34px;padding:6px 11px;font-size:14px}
body[data-page="search"]:not(.has-results) .manager-preview-note{max-width:760px;line-height:1.45;padding-top:4px}
body[data-page="search"]:not(.has-results) .site-legal-footer{padding:6px 0;font-size:13px;line-height:1.4}
body[data-page="search"].has-results #main{padding:0!important}
@media(min-width:761px) and (max-width:1050px){body[data-page="search"].session-sidebar-open{--history-width:210px}}
@media(max-height:800px){body[data-page="search"] .search-header{min-height:60px;padding-block:8px}body[data-page="search"]:not(.has-results) .welcome-fina-mark{display:none}body[data-page="search"]:not(.has-results) #main{padding-top:10px!important;gap:10px}body[data-page="search"]:not(.has-results) .search-stage{gap:12px}}
@media(max-width:760px){body[data-page="search"]{--history-width:0px}body[data-page="search"]:not(.has-results) #main{padding-inline:14px!important}body[data-page="search"]:not(.has-results) .welcome-message h2{font-size:20px}body[data-page="search"]:not(.has-results) .example-prompts button{padding:8px;font-size:14px;line-height:1.3}body[data-page="search"]:not(.has-results) .example-prompts .prompt-icon{display:none}body[data-page="search"]:not(.has-results) .latest-report-links a{padding:5px 8px;font-size:13px}body[data-page="search"]:not(.has-results) #question{font-size:17px}}
/* In unusually short windows, scroll only the individual choices, never the landing page. */
@media(max-height:650px){body[data-page="search"]:not(.has-results) .welcome-message h2{font-size:18px}body[data-page="search"]:not(.has-results) #main{justify-content:flex-start!important;gap:6px}body[data-page="search"]:not(.has-results) .search-stage{flex:1;justify-content:flex-start;gap:6px}body[data-page="search"]:not(.has-results) .example-prompts{min-height:58px;overflow:auto;flex:1;max-height:90px}body[data-page="search"]:not(.has-results) .latest-report-links{max-height:82px;overflow:auto}body[data-page="search"]:not(.has-results) #question{height:36px;min-height:36px;max-height:36px;padding-block:calc((36px - 1.35em)/2)}body[data-page="search"]:not(.has-results) #search-form{padding:10px 14px}}

/* Keep the composer centred with supporting choices beneath it. */
body[data-page="search"] .search-stage{flex-direction:column;align-items:center}
body[data-page="search"] .search-composer{width:min(760px,100%);flex-shrink:0}
body[data-page="search"]:not(.has-results) .home-below-prompt{width:min(760px,100%);display:flex;flex-direction:column;align-items:center;gap:16px}
body[data-page="search"].has-results .home-below-prompt{display:none}
@media(max-height:800px){body[data-page="search"]:not(.has-results) .home-below-prompt{gap:12px}}
@media(max-height:650px){body[data-page="search"]:not(.has-results) .home-below-prompt{gap:6px;min-height:0}}
/* The source note and legal links belong to the bottom footer, outside the composer. */
body[data-page="search"] .site-legal-footer{position:fixed;bottom:0;left:var(--history-width);width:calc(100% - var(--history-width));z-index:20;background:#fff;display:flex;flex-direction:column;align-items:center;gap:9px;padding:12px 22px 18px!important;font-size:13px;line-height:1.4}
body[data-page="search"] .site-legal-footer .manager-preview-note{display:block!important;max-width:850px;padding:0;margin:0;text-align:center;font-size:12px;line-height:1.4;border:0}
body[data-page="search"] .site-legal-footer .site-legal-links{width:100%;padding:0;justify-content:center;gap:20px}
body[data-page="search"]:not(.has-results) #main{padding-bottom:100px!important}
body[data-page="search"].has-results .search-stage{padding-bottom:110px!important}
@media(max-width:760px){body[data-page="search"] .site-legal-footer{padding:9px 14px 14px!important;gap:9px}body[data-page="search"] .site-legal-footer .site-legal-links{justify-content:center;padding:0;gap:3px 12px;font-size:12px}body[data-page="search"]:not(.has-results) #main{padding-bottom:126px!important}body[data-page="search"].has-results .search-stage{padding-bottom:136px!important}}

/* Keep the callback clear of the centred footer on narrower screens. */
@media(max-width:1050px){body[data-page="search"] .floating-callback{bottom:100px}}
@media(max-width:760px){body[data-page="search"] .floating-callback{bottom:126px}}
@media(min-width:761px) and (max-width:1050px){
  body[data-page="search"].has-results .floating-callback{bottom:12px}
  body[data-page="search"].has-results .site-legal-footer{padding-right:200px!important}
}

/* Header links and buttons share the same vertical alignment. */
body[data-page="search"] .header-actions>.new-chat{display:inline-flex;align-items:center;justify-content:center;min-height:44px;line-height:1.4}
body[data-page="search"]:not(.has-results) #question::placeholder{color:#a99faf;opacity:1}

body[data-page="search"]:not(.has-results) .welcome-fina-mark{display:grid;width:52px;height:52px;margin-bottom:24px;border-radius:14px}
@media(max-height:800px){body[data-page="search"]:not(.has-results) .welcome-fina-mark{width:44px;height:44px;margin-bottom:18px}}
@media(max-height:650px){body[data-page="search"]:not(.has-results) .welcome-fina-mark{width:36px;height:36px;margin-bottom:12px}}

/* The composer and footer use the full width until the sidebar is opened. */
body[data-page="search"]>.search-header{margin-left:var(--history-width)}
@media(min-width:1051px){body[data-page="search"].session-sidebar-open{--history-width:245px}}

