/* A living research companion. Motion communicates an action or a state. */
body.research-ui .sc-fab {
  --sc-compact-width:64px; --sc-expanded-width:248px; --sc-label-width:144px;
  right: 25px; bottom: 24px; width:var(--sc-compact-width); height:60px; padding:4px; gap:0; box-sizing:border-box; justify-content:flex-start;
  border-radius: 23px; background: linear-gradient(120deg,#f8fcfff0,#e6f1fff0 60%,#e9e6fff0); border: 1px solid #fff; color: #214777; backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 10px 35px #4464a72b, 0 0 0 1px #aec9eb88, inset 0 1px #fff;
  animation: none; opacity: 1; visibility: visible;
  isolation: isolate; overflow: visible;
  transition:width .34s cubic-bezier(.22,1,.36,1),transform .24s ease,box-shadow .24s ease,opacity .18s ease;
}
body.research-ui .sc-fab.is-expanded { width:var(--sc-expanded-width); }
body.research-ui .sc-fab:hover { background: linear-gradient(120deg,#fff,#e1eeff,#e7e3ff); transform: translateY(-2px); box-shadow: 0 18px 40px #5373b735,0 0 0 1px #a7bee7; }
body.research-ui .sc-fab-icon { width:54px; height:50px; margin-top:0; }
/* Keep the mascot inside its fixed icon slot even at the motion extremes.
   This scope also wins over the shared, larger companion motion below. */
body.research-ui .sc-fab .sc-fab-icon img { width:42px; height:42px; object-fit:contain; transform:none; transform-origin:50% 60%; animation:otter-fab-bob 5s ease-in-out infinite; filter:drop-shadow(0 1px 1px #0002); }
body.research-ui .sc-fab:is(:hover,:focus-visible) .sc-fab-icon img { animation:otter-fab-wave .8s ease-in-out 2; }
body.research-ui .sc-fab-label { display:flex; flex:none; flex-direction:column; gap:1px; align-items:flex-start; width:0; max-width:0; margin-left:0; opacity:0; transform:translateX(7px); overflow:hidden; white-space:nowrap; text-align:left; transition:width .34s cubic-bezier(.22,1,.36,1),max-width .34s cubic-bezier(.22,1,.36,1),margin-left .34s cubic-bezier(.22,1,.36,1),opacity .2s ease,transform .28s ease; }
body.research-ui .sc-fab.is-expanded .sc-fab-label { width:var(--sc-label-width); max-width:var(--sc-label-width); margin-left:9px; opacity:1; transform:none; }
body.research-ui .sc-fab-label strong { font-size: 13px; font-weight: 650; letter-spacing: .1px; }
body.research-ui .sc-fab-label small { color: #536e91; font-size: 9px; font-weight: 400; }
.sc-fab-spark { display:block; flex:none; width:0; margin-left:0; overflow:hidden; opacity:0; color:#7a7bd0; font-size:20px; transition:width .34s ease,margin-left .34s ease,opacity .2s ease; }
body.research-ui .sc-fab.is-expanded .sc-fab-spark { width:16px; margin-left:9px; opacity:1; }
.sc-fab-orbit { position: absolute; z-index: -1; inset: -5px; border: 1px solid #2563eb22; border-radius: 26px; animation: otter-halo 5s ease-in-out infinite; pointer-events: none; }
body.research-ui .sc-bubble { bottom:101px; right:27px; z-index:114; max-width:min(265px,calc(100vw - 34px)); padding:0; border-radius:14px 14px 3px 14px; transform:translateY(8px) scale(.97); transition:opacity .2s ease,transform .22s ease; }
body.research-ui .sc-bubble.is-show { opacity:1; transform:none; transition:opacity .22s ease,transform .28s cubic-bezier(.22,1,.36,1); }
body.research-ui .sc-bubble[hidden] { display:none; }
body.research-ui .sc-bubble::after { right: 32px; }
.sc-bubble-invite { background: none; border: 0; color: #284265; padding: 14px 33px 14px 16px; font: 12px/1.5 var(--sans); cursor: pointer; text-align: left; }
body.research-ui .sc-bubble-close { width: 24px; height: 24px; top: 6px; right: 5px; }
body.research-ui .sc-panel {
  z-index: 220; right: 24px; bottom: 24px; width: min(465px, calc(100vw - 48px));
  height: min(744px, calc(100dvh - 48px)); max-height: none;
  border: 1px solid #c7d5e8; border-radius: 23px; background: #fff;
  box-shadow: 0 30px 90px #14274430, 0 6px 22px #14274415;
  transform: translateY(24px) scale(.88); transform-origin: bottom right;
  visibility: hidden; opacity: 0;
  transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .25s ease, visibility .45s, width .35s cubic-bezier(.22,1,.36,1);
}
body.research-ui.sc-open .sc-panel { visibility: visible; transform: none; opacity: 1; }
body.research-ui .sc-panel.is-expanded { width: min(730px, calc(100vw - 48px)); }
body.research-ui .sc-panel-head { background: #142744; color: #fff; padding: 17px 18px; border-bottom: 1px solid #ffffff14; flex: none; gap: 4px; }
body.research-ui .sc-panel-title { gap: 10px; }
body.research-ui .sc-panel-mark { width: 36px; height: 38px; }
body.research-ui .sc-panel-mark img { object-fit: contain; }
body.research-ui .sc-panel-name strong { font: 650 17px var(--sans); letter-spacing: -.5px; }
body.research-ui .sc-panel-name strong span { color: #a0b9ff; }
body.research-ui .sc-panel-sub { color: #b3c6e3; font: 7px/1.6 var(--mono); letter-spacing: 1.2px; margin-top: 3px; }
.sc-panel-actions { display: flex; gap: 2px; }
body.research-ui .sc-icon-button { display: inline-grid; place-items: center; padding: 8px; width: 35px; height: 35px; flex: none; border: 0; border-radius: 9px; background: transparent; color: inherit; cursor: pointer; transition: background .2s, transform .2s; }
body.research-ui .sc-icon-button:hover { background: #ffffff15; transform: translateY(-1px); }
.sc-icon-button svg, .sc-send svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sc-icon-button:focus-visible, .sc-prompts button:focus-visible, .sc-bubble-invite:focus-visible { outline: 2px solid #82a6ff; outline-offset: 2px; }
.sc-context { flex: none; display: flex; align-items: center; gap: 8px; padding: 11px 20px; border-bottom: 1px solid #e0e8f4; background: #edf3ff; color: #536b90; font: 8px var(--mono); letter-spacing: 1px; }
.sc-context > span:first-child { font-size: 16px; color: #2563eb; }
.sc-context strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #254466; font: 500 11px var(--sans); letter-spacing: 0; }
body.research-ui .sc-thread { background: #f8faff; padding: 0; gap: 0; overscroll-behavior: contain; scroll-behavior: auto; }
.sc-welcome { padding: 9px 28px 19px; text-align: center; }
.sc-otter-scene { position: relative; width: 180px; height: 112px; margin: 2px auto 0; display: grid; place-items: center; }
.sc-welcome-otter { width: 99px; height: 109px; object-fit: contain; z-index: 1; position: relative; transform-origin: 50% 80%; filter: drop-shadow(0 8px 5px #0c457818); animation: otter-bob 4.7s ease-in-out infinite; }
.sc-otter-scene:hover .sc-welcome-otter { animation: otter-wave .85s ease-in-out 2; }
.sc-orbit { position: absolute; width: 145px; height: 72px; border: 1px solid #b9cbf3; border-radius: 50%; transform: rotate(-25deg); }
.sc-orbit-one::after { content: ''; position: absolute; right: 16px; top: 3px; width: 6px; height: 6px; background: #6366f1; border: 3px solid #eef2ff; box-sizing: content-box; border-radius: 50%; }
.sc-orbit-two { width: 165px; height: 102px; transform: rotate(32deg); border-style: dashed; opacity: .6; }
.sc-math { position: absolute; font: italic 19px Georgia, serif; color: #6380b0; animation: otter-symbol 5s ease-in-out infinite; }
.sc-math-one { left: 2px; top: 18px; }
.sc-math-two { right: 4px; top: 45px; animation-delay: -2s; }
.sc-math-three { left: 14px; bottom: 12px; animation-delay: -3s; }
body.research-ui .sc-welcome-eyebrow { margin: 5px 0 10px; font: 8px var(--mono); color: #5573a3; letter-spacing: 1.8px; }
body.research-ui .sc-welcome h2 { margin: 0 0 12px; font: 500 30px/1.16 var(--sans); letter-spacing: -1.2px; color: #142744; }
body.research-ui #sc-welcome-copy { max-width: 310px; margin: 0 auto 22px; font: 12px/1.65 var(--sans); color: #6a7a92; }
.sc-prompts { display: grid; gap: 8px; text-align: left; }
.sc-prompts button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid #dce5f3; border-radius: 12px; background: #fff; color: #263f64; font-family: var(--sans); cursor: pointer; transition: transform .25s, box-shadow .25s, border-color .25s; }
.sc-prompts button:hover { transform: translateX(4px); border-color: #96b6ed; box-shadow: 0 4px 12px #2563eb0a; }
.sc-prompts button > span:first-child { display: grid; place-items: center; width: 28px; height: 29px; border-radius: 8px; background: #eef3ff; color: #3766b1; font: 22px Georgia,serif; }
.sc-prompts button > span:nth-child(2) { display: grid; gap: 4px; flex: 1; text-align: left; }
.sc-prompts strong { font-size: 11px; font-weight: 600; }
.sc-prompts small { font-size: 10px; color: #6a7a92; }
.sc-prompts b { font-size: 14px; color: #6888bb; font-weight: 400; }
.sc-messages { display: flex; flex-direction: column; gap: 18px; padding: 24px 20px; }
.sc-messages:empty { display: none; }
body.research-ui .sc-msg { max-width: 94%; border-radius: 15px; padding: 13px 15px; border: 1px solid #e0e8f3; font-size: 13px; line-height: 1.7; animation: otter-message .35s cubic-bezier(.2,.8,.3,1) both; }
body.research-ui .sc-msg::before { content: 'STATSOTTER'; display: block; margin: 0 0 7px; color: #6083b2; font: 7px/1.4 var(--mono); letter-spacing: 1.4px; }
body.research-ui .sc-msg-user { background: #18375b; color: #fff; border: none; border-radius: 15px 15px 3px 15px; }
body.research-ui .sc-msg-user::before { content: 'YOU'; color: #b2c8e9; }
body.research-ui .sc-msg-user p { white-space: pre-wrap; }
body.research-ui .sc-msg-bot { border-radius: 3px 15px 15px 15px; }
body.research-ui .sc-msg-error { background: #fff5f4; border-color: #eed8d7; color: #943c38; }
body.research-ui .sc-msg-error::before { content: 'CONNECTION'; color: #a46664; }
body.research-ui .sc-msg-info::before { content: 'NOTE'; }
.sc-msg pre { padding: 12px; overflow-x: auto; max-width: 100%; border-radius: 8px; background: #edf2fa; }
.sc-msg pre code { padding: 0; background: none; white-space: pre; }
.sc-msg h3 { font-size: 14px; margin: 12px 0 8px; }
.sc-msg .sc-retry { margin-top: 12px; padding: 7px 12px; font: 600 11px var(--sans); border: 1px solid #d7b5b3; background: #fff; border-radius: 7px; color: inherit; cursor: pointer; }
.sc-typing { display: inline-flex; gap: 4px; align-items: center; height: 22px; }
.sc-typing i { width: 5px; height: 5px; background: #769add; border-radius: 50%; animation: otter-thinking 1s ease-in-out infinite; }
.sc-typing i:nth-child(2) { animation-delay: .14s; }
.sc-typing i:nth-child(3) { animation-delay: .28s; }
body.research-ui .sc-msg.is-streaming::after { display: none; }
body.research-ui .sc-msg.has-content.is-streaming::after { display: inline-block; background: #729bf5; }
body.research-ui .sc-card-link { display: flex; align-items: center; gap: 9px; text-decoration: none; padding: 11px 12px; margin: 8px 0; border: 1px solid #d0ddf2; border-radius: 10px; background: #f1f5ff; color: #214e89; }
.sc-card-link-label { flex: 1; font-size: 12px; font-weight: 600; }
.sc-card-link small { display: block; font-size: 9px; font-weight: 400; color: #6e82a1; margin-top: 3px; }
.sc-access { flex: none; display: flex; gap: 13px; justify-content: space-between; align-items: center; padding: 10px 19px 0; background: #fff; border-top: 1px solid #e0e8f4; font: 10px/1.5 var(--sans); color: #6d7e96; }
.sc-access a { flex: none; font-weight: 650; color: #27578f; padding: 9px 11px; background: #ecf2fc; border-radius: 8px; text-decoration: none; }
body.research-ui .sc-input { padding: 12px 14px 14px; display: block; border: 0; flex: none; }
.sc-composer { border: 1px solid #cbd8ec; border-radius: 14px; background: #f8faff; transition: box-shadow .2s, border-color .2s; }
.sc-composer:focus-within { border-color: #8aa9da; box-shadow: 0 0 0 3px #2563eb0d; }
body.research-ui .sc-input textarea { display: block; width: 100%; border: 0; box-shadow: none; background: transparent; border-radius: 14px; padding: 13px 14px 6px; min-height: 57px; font: 13px/1.5 var(--sans); color: #203b61; }
body.research-ui .sc-input textarea:focus { border: 0; background: transparent; box-shadow: none; outline: 0; }
.sc-composer-tools { display: flex; gap: 4px; align-items: center; padding: 4px 8px 8px 13px; color: #5777a8; }
.sc-composer-hint { flex: 1; font: 9px/1.5 var(--sans); color: #6e819e; }
body.research-ui .sc-composer .sc-icon-button:hover { background: #e6eefc; }
body.research-ui .sc-send { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; padding: 7px; border: 0; border-radius: 10px; color: #fff; background: #2258a2; cursor: pointer; transition: transform .2s, background .2s; }
body.research-ui .sc-send:hover:not(:disabled) { transform: translateY(-2px); background: #164477; }
body.research-ui .sc-send:disabled { background: #dfe7f4; color: #8ea5c8; cursor: default; opacity: 1; }
body.research-ui .sc-mic[aria-pressed=true] { color: #2563eb; background: #ddeaff; animation: otter-halo 1.2s ease-in-out infinite; }
.sc-backdrop { display: none; }
.research-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.research-ui.sc-open .sc-fab { animation: none; visibility: hidden; }
body.research-ui.sc-open .sc-welcome { animation: otter-message .6s .08s both; }
body.research-ui.sc-open .sc-prompts button { animation: otter-message .5s .16s both; }
body.research-ui.sc-open .sc-prompts button:nth-child(2) { animation-delay: .23s; }
body.research-ui.sc-open .sc-prompts button:nth-child(3) { animation-delay: .3s; }
/* The homepage's model draws itself; its values remain conceptual and static. */
/* Keep the opening copy stationary until the reader scrolls. */
body.research-ui .research-model { animation: otter-arrive .95s .12s cubic-bezier(.16,1,.3,1) both; }
.research-plot > path[stroke-width="2.2"] { stroke-dasharray: 620; stroke-dashoffset: 0; animation: model-draw 2.3s .25s cubic-bezier(.2,.6,.3,1) both; }
.research-plot > circle { transform-box: fill-box; transform-origin: center; animation: model-point 3.5s ease-in-out infinite; }
.research-plot > circle:last-child { animation-delay: -1.5s; }
.research-model-head i, .research-status-dot { animation: otter-status 3s ease-in-out infinite; }
body.research-ui .brand:hover .brand-logo-img { animation: otter-wave .75s ease-in-out; }
.research-pocket-model svg > path:first-child { stroke-dasharray: 300; animation: model-draw 2s ease both; }
@keyframes otter-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes otter-message { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes otter-bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 45% { transform: translateY(-5px) rotate(2deg); } 65% { transform: translateY(-3px) rotate(0); } }
@keyframes otter-wave { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-9deg) translateY(-3px); } 50% { transform: rotate(7deg) translateY(-4px); } 75% { transform: rotate(-5deg); } }
@keyframes otter-fab-bob { 0%,100% { transform:translateY(0) rotate(-1.5deg); } 45% { transform:translateY(-1.5px) rotate(2deg); } 65% { transform:translateY(-.5px) rotate(0); } }
@keyframes otter-fab-wave { 0%,100% { transform:translateY(0) rotate(0); } 25% { transform:translateY(-1px) rotate(-5deg); } 50% { transform:translateY(-1px) rotate(5deg); } 75% { transform:translateY(0) rotate(-3deg); } }
@keyframes otter-symbol { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-7px); opacity: 1; } }
@keyframes otter-halo { 0%,100% { opacity: .4; transform: scale(1); } 50% { opacity: .85; transform: scale(1.025); } }
@keyframes otter-spark { 0%,100% { opacity: .65; transform: rotate(0) scale(.85); } 50% { opacity: 1; transform: rotate(20deg) scale(1.05); } }
@keyframes otter-thinking { 0%,80%,100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes otter-status { 0%,100% { box-shadow: 0 0 0 0 #739fff22; } 50% { box-shadow: 0 0 0 5px #739fff11; } }
@keyframes model-draw { from { stroke-dashoffset: 620; } to { stroke-dashoffset: 0; } }
@keyframes model-point { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: .7; } }
@media (max-width: 640px) {
  body.research-ui .sc-fab { --sc-compact-width:56px; --sc-expanded-width:146px; --sc-label-width:78px; right:16px; bottom:max(18px,env(safe-area-inset-bottom)); height:56px; border-radius:18px; }
  body.research-ui .sc-fab-icon { width:46px; height:46px; }
  body.research-ui .sc-fab .sc-fab-icon img { width:36px; height:36px; }
  body.research-ui .sc-fab.is-expanded .sc-fab-label { margin-left:6px; }
  body.research-ui .sc-fab-label strong { font-size:12px; }
  body.research-ui .sc-fab-label small,body.research-ui .sc-fab-spark { display:none; }
  body.research-ui .sc-bubble { right: 17px; bottom: 94px; max-width: 245px; }
  body.research-ui .sc-bubble::after { right: 25px; }
  body.research-ui .sc-panel, body.research-ui .sc-panel.is-expanded { inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; transform: translateY(40px); transform-origin: bottom; }
  body.research-ui.sc-open .sc-panel { transform: none; }
  body.research-ui.sc-open { overflow: hidden; }
  body.research-ui .sc-panel-head { padding: max(12px,env(safe-area-inset-top)) 13px 12px; }
  body.research-ui .sc-icon-button { width: 40px; height: 40px; }
  body.research-ui .sc-expand { display: none; }
  body.research-ui .sc-welcome { padding: 14px 22px 26px; }
  body.research-ui .sc-welcome h2 { font-size: 31px; }
  body.research-ui #sc-welcome-copy { font-size: 13px; }
  .sc-prompts strong { font-size: 12px; }
  .sc-prompts small { font-size: 11px; }
  .sc-prompts button { padding: 13px 14px; }
  .sc-access { font-size: 11px; }
  body.research-ui .sc-input { padding: 11px 12px max(12px, env(safe-area-inset-bottom)); }
  body.research-ui .sc-input textarea { font-size: 16px; }
  body.research-ui .sc-send { width: 40px; height: 40px; }
  body.research-ui .sc-msg { font-size: 14px; }
  .sc-composer-hint { font-size: 10px; }
  .sc-backdrop { position: fixed; inset: 0; z-index: 219; display: block; background: #14274433; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .25s, visibility .3s; }
  body.sc-open .sc-backdrop { visibility: visible; opacity: 1; pointer-events: auto; }
}
@media (max-height: 730px) and (min-width: 641px) {
  .sc-otter-scene { height: 103px; }
  .sc-welcome-otter { height: 97px; }
  body.research-ui .sc-welcome h2 { font-size: 26px; }
  .sc-prompts button { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body.research-ui .sc-panel,body.research-ui .sc-fab,body.research-ui .sc-fab-label,body.research-ui .sc-bubble,body.research-ui .sc-bubble.is-show { transition:none; }
  body.research-ui .sc-bubble,body.research-ui .sc-bubble.is-show { transform:none; }
  body.research-ui .sc-fab-icon img, .sc-welcome-otter, .sc-math, .sc-fab-spark, .sc-orbit, .sc-typing i, .research-plot > circle { animation: none !important; }
  body.research-ui .sc-prompts button:hover { transform: none; }
}
/* The entrance is instant; only the otter moves. */
body.research-ui .sc-fab:focus-visible, body.research-ui .sc-fab:hover { animation:none; }
body.research-ui .sc-panel-head { background:#edf3ff; color:#173c6b; border-color:#d4e0f1; }
body.research-ui .sc-panel-name strong span { color:#365fa6; }
body.research-ui .sc-panel-sub { color:#47658e; font-size:8px; letter-spacing:1px; }
body.research-ui .sc-panel-head .sc-icon-button:hover { background:#dae5f7; }
body.research-ui .sc-context { color:#39577e; background:#f7f9fe; }
body.research-ui #sc-welcome-copy, body.research-ui .sc-prompts small { color:#4c607e; }
body.research-ui .sc-welcome-eyebrow { color:#385f99; font-size:9px; }
body.research-ui .sc-access { color:#465f83; font-size:11px; }
body.research-ui .sc-composer-hint { color:#4b6488; font-size:10px; }
body.research-ui .sc-prompts strong { font-size:12px; }
body.research-ui .sc-prompts small { font-size:11px; }
body.research-ui .sc-msg::before { color:#45679c; font-size:8px; }
body.research-ui .sc-msg-user::before { color:#d4e2fc; }
body.research-ui .sc-fab-label small { color:#536e91; font-size:10px; }
@media(max-width:1100px) { body.research-ui .nav-right { gap:16px; } }
@media(max-width:560px) { body.research-ui .nav-right { gap:9px; } }
@media(max-width:359px) { body.research-ui .brand-name { font-size:18px; } body.research-ui .brand-mark,body.research-ui .brand-mark:has(.brand-logo-img) { width:26px; } body.research-ui .nav-right { gap:7px; } body.research-ui .topbar-inner { gap:7px; } }
body.research-ui .sc-panel { transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .14s ease,visibility .22s,width .25s ease; }
body.research-ui.sc-open .sc-welcome, body.research-ui.sc-open .sc-prompts button { animation:otter-slide .25s ease both; }
@keyframes otter-slide { from { transform:translateY(7px); } to { transform:none; } }
