/* hySocial Hypatia compact V16 Blackhole Chroma — shared account UI,
   safe rich-text output and mobile-first tools. */
#hy-escort-panel .hy-escort-capabilities{
  display:flex;gap:6px;align-items:center;flex-wrap:wrap;
  padding:9px 12px;border-bottom:1px solid rgba(91,162,226,.17);
  background:linear-gradient(92deg,rgba(17,39,57,.65),rgba(46,22,74,.4));
}
#hy-escort-panel .hy-escort-capabilities span{
  display:inline-flex;align-items:center;gap:5px;border-radius:999px;
  border:1px solid rgba(102,178,234,.3);padding:5px 8px;
  background:rgba(6,17,37,.56);color:#c6e3f5;font-size:10px;font-weight:700;line-height:1.2;
  white-space:nowrap;
}
#hy-escort-panel #hy-escort-router-status{
  border-color:rgba(52,215,240,.5);color:#72eaf7;
  background:rgba(29,179,220,.11)
}
#hy-escort-panel #hy-escort-persona-status{
  border-color:rgba(180,109,255,.4);color:#e0c5ff
}
#hy-escort-panel .hy-escort-message.bot{
  padding:12px 14px;border-radius:17px 17px 17px 6px;
  background:linear-gradient(137deg,rgba(15,32,56,.97),rgba(34,25,58,.94));
  border-color:rgba(101,170,230,.3)
}
#hy-escort-panel .hy-escort-message.user{
  border-radius:17px 17px 6px 17px;
  background:linear-gradient(117deg,rgba(35,169,203,.26),rgba(122,84,231,.21));
}
#hy-escort-panel .hy-escort-message[data-loading=true]{
  background:linear-gradient(100deg,rgba(23,52,77,.9),rgba(62,30,89,.7),rgba(23,52,77,.9));
  background-size:250% 100%;animation:hy-escort-think 2s ease infinite;
}
@keyframes hy-escort-think{50%{background-position:100% 0}}
#hy-escort-panel .hy-escort-message[data-rich=true]{
  white-space:normal;line-height:1.6
}
#hy-escort-panel .hy-escort-message .hy-prose{font-size:12.5px;line-height:1.65;overflow-wrap:anywhere}
#hy-escort-panel .hy-escort-message .hy-prose :is(h1,h2,h3,h4){
  margin:12px 0 7px;font-weight:850;letter-spacing:-.02em;color:#f5fbff;line-height:1.3
}
#hy-escort-panel .hy-escort-message .hy-prose h1{font-size:17px}
#hy-escort-panel .hy-escort-message .hy-prose h2{font-size:15px}
#hy-escort-panel .hy-escort-message .hy-prose h3{font-size:14px}
#hy-escort-panel .hy-escort-message .hy-prose p{margin:0 0 9px}
#hy-escort-panel .hy-escort-message .hy-prose :is(ul,ol){padding-left:19px;margin:7px 0 11px}
#hy-escort-panel .hy-escort-message .hy-prose li{margin:4px 0}
#hy-escort-panel .hy-escort-message .hy-prose a{color:#66e5fc;text-decoration:underline;text-underline-offset:3px}
#hy-escort-panel .hy-escort-message .hy-prose code:not(pre code){
  padding:2px 5px;border-radius:6px;background:rgba(76,144,233,.16);color:#b8f9ff;
  font-size:11px
}
#hy-escort-panel .hy-escort-message .hy-prose :is(pre,.hy-code-block){
  max-width:100%;overflow-x:auto;white-space:pre;border-radius:12px;
  background:rgba(3,10,24,.94);padding:11px;border:1px solid rgba(101,171,231,.19);
  font-size:11px
}
#hy-escort-panel .hy-escort-message .hy-prose .hy-code-block pre{
  padding:0;margin:4px 0;border:0;background:transparent
}
#hy-escort-panel .hy-escort-message .hy-prose blockquote{
  margin:10px 0;padding:8px 11px;border-left:3px solid #7a9cf8;
  background:rgba(85,100,187,.1);border-radius:0 9px 9px 0
}
#hy-escort-panel .hy-escort-message .hy-prose .hy-table-scroll{
  overflow:auto;max-width:100%;margin:9px 0
}
#hy-escort-panel .hy-escort-message .hy-prose table{border-collapse:collapse;font-size:11px}
#hy-escort-panel .hy-escort-message .hy-prose :is(td,th){
  border:1px solid rgba(102,160,222,.27);padding:6px 8px
}
#hy-escort-panel .hy-escort-quick{
  gap:6px;scrollbar-width:none;flex:0 0 auto;
  padding:9px 11px;background:rgba(9,19,38,.8);
  border-top:1px solid rgba(94,173,226,.15)
}
#hy-escort-panel .hy-escort-quick::-webkit-scrollbar{display:none}
#hy-escort-panel .hy-escort-quick button{
  min-height:37px;flex:0 0 auto;white-space:nowrap;
  padding:6px 11px;border-radius:12px;
  font-size:11px;font-weight:800;
  border:1px solid rgba(100,172,233,.33);
  background:linear-gradient(130deg,rgba(21,47,72,.94),rgba(40,26,74,.76));
  box-shadow:inset 0 1px rgba(255,255,255,.05);
  transition:transform .17s,box-shadow .2s
}
#hy-escort-panel .hy-escort-quick button:active{transform:scale(.96)}
#hy-escort-panel .hy-escort-quick button:hover{
  border-color:rgba(52,221,240,.62);box-shadow:0 0 15px rgba(48,207,239,.15)
}
#hy-escort-panel #hy-escort-options[hidden]{display:none!important}
#hy-escort-panel #hy-escort-options{
  display:flex;flex-direction:column;gap:9px;
  padding:14px;min-height:0;overflow:auto;flex:0 1 340px;
  border-bottom:1px solid rgba(105,166,235,.2);
  background:linear-gradient(145deg,rgba(11,27,48,.99),rgba(25,19,51,.97));
}
#hy-escort-panel .hy-escort-settings-title{font-weight:850;font-size:15px;color:#eaf6ff}
#hy-escort-panel #hy-escort-options p,#hy-escort-panel #hy-escort-options small{
  margin:0;font-size:11px;color:#a4bdd9;line-height:1.5
}
#hy-escort-panel #hy-escort-options label{
  display:flex;align-items:center;gap:9px;min-height:40px;
  font-size:12px;color:#e1edff;line-height:1.35
}
#hy-escort-panel #hy-escort-options label.hy-escort-mode-label{justify-content:space-between;gap:12px}
#hy-escort-panel #hy-escort-options :is(select,button){
  min-height:39px;max-width:100%;border-radius:11px;
  border:1px solid rgba(97,173,235,.33);
  background:rgba(7,16,32,.9);color:#e8f8ff;padding:7px 10px
}
#hy-escort-panel #hy-escort-options select{max-width:170px}
#hy-escort-panel #hy-escort-options input[type=checkbox]{
  width:18px;height:18px;accent-color:#48d9f4;flex:0 0 auto
}
#hy-escort-panel #hy-escort-persona-apply{
  background:linear-gradient(110deg,#29dbe9,#8291ff)!important;
  color:#07162c!important;font-weight:850;border:0
}
#hy-escort-panel #hy-escort-persona-apply:disabled{opacity:.5;cursor:not-allowed}
#hy-escort-panel .hy-escort-preference-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
html[data-mode=light] #hy-escort-panel .hy-escort-message.bot{color:#e7f6ff}
@media(max-width:420px){
 #hy-escort-panel .hy-escort-capabilities{gap:4px;padding:6px 8px}
 #hy-escort-panel .hy-escort-capabilities span{font-size:9px;padding:4px 6px}
 #hy-escort-panel .hy-escort-quick{padding:8px;gap:5px}
 #hy-escort-panel .hy-escort-quick button{padding:5px 9px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){
 #hy-escort-panel .hy-escort-message[data-loading=true]{animation:none}
 #hy-escort-panel .hy-escort-quick button{transition:none}
}

/* Options are a dedicated view, not a second panel appended under chat. */
#hy-escort-panel.hy-escort-settings-open #hy-escort-log,
#hy-escort-panel.hy-escort-settings-open .hy-escort-quick,
#hy-escort-panel.hy-escort-settings-open #hy-escort-form,
#hy-escort-panel.hy-escort-settings-open #hy-escort-rich-wrap{display:none!important}
#hy-escort-panel.hy-escort-settings-open #hy-escort-options{
  flex:1 1 auto!important;min-height:0!important;max-height:none;
  padding:17px 16px;
  gap:12px;
}
#hy-escort-panel #hy-escort-options input[type=checkbox]{
  appearance:none!important;-webkit-appearance:none!important;
  box-sizing:border-box!important;display:inline-block!important;
  position:relative!important;flex:0 0 18px!important;
  width:18px!important;height:18px!important;min-width:18px!important;
  min-height:18px!important;max-width:18px!important;max-height:18px!important;
  padding:0!important;margin:0!important;border-radius:6px!important;
  border:1px solid rgba(119,177,232,.54)!important;
  background:rgba(6,17,33,.92)!important;
  box-shadow:none!important;vertical-align:middle;
}
#hy-escort-panel #hy-escort-options input[type=checkbox]:checked{
  border-color:#4be6f3!important;background:linear-gradient(120deg,#31d9ea,#8f81f7)!important;
}
#hy-escort-panel #hy-escort-options input[type=checkbox]:checked::after{
  content:"";position:absolute;top:2px;left:5px;width:5px;height:9px;
  transform:rotate(45deg);border-right:2px solid #07152b;border-bottom:2px solid #07152b;
}
#hy-escort-panel #hy-escort-options label:has(input[type=checkbox]){
  border:1px solid rgba(103,172,229,.18);border-radius:12px;
  background:rgba(17,33,56,.49);padding:9px 12px;
}
#hy-escort-panel #hy-escort-options input[type=checkbox]:focus-visible{
  outline:2px solid #4ce7f5!important;outline-offset:3px!important
}
#hy-escort-panel.hy-escort-settings-open #hy-escort-global-settings{
  border-color:rgba(63,224,240,.7);
  background:linear-gradient(120deg,rgba(31,208,228,.23),rgba(165,82,238,.2))
}

/* Real Beautiful UI pixel-grid loader for an active chat request.
   The loader's duration/active status is controlled by server activity;
   it never fabricates steps or successful tool use. */
#hy-escort-panel .hy-escort-thinking{
 display:flex;flex-direction:column;gap:4px;
 min-width:0;padding:3px 0 5px;
}
#hy-escort-panel .hy-escort-thinking-active{min-height:40px;display:flex;align-items:center;gap:11px}
#hy-escort-panel .hy-escort-thinking small{
 color:#9bbada;font-size:10px;line-height:1.5;margin-left:2px;letter-spacing:.02em
}
#hy-escort-panel .hy-escort-pixel-grid,
#hy-escort-panel .hy-ui-pixel-grid{
 display:grid;grid-template-columns:repeat(3,8px);grid-template-rows:repeat(3,8px);
 gap:3px;width:30px;height:30px;place-content:center;flex:0 0 30px
}
#hy-escort-panel .hy-escort-pixel-grid i,
#hy-escort-panel .hy-ui-pixel-grid i{
 display:block;width:8px;height:8px;border-radius:2px;
 background:#a96bff;opacity:.45;
 animation:hy-escort-churn 1.05s ease-in-out infinite;
 animation-delay:calc(var(--hy-pixel-delay,0ms));
}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(3n+1),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(3n+1){background:#37dff3}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(3n+2),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(3n+2){background:#6598ff}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(1),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(1){--hy-pixel-delay:0ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(2),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(2){--hy-pixel-delay:120ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(3),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(3){--hy-pixel-delay:240ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(6),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(6){--hy-pixel-delay:360ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(9),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(9){--hy-pixel-delay:480ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(8),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(8){--hy-pixel-delay:600ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(7),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(7){--hy-pixel-delay:720ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(4),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(4){--hy-pixel-delay:840ms}
#hy-escort-panel .hy-escort-pixel-grid i:nth-child(5),
#hy-escort-panel .hy-ui-pixel-grid i:nth-child(5){visibility:hidden}
#hy-escort-panel .hy-escort-thinking .hy-ui-loader.compact{
 display:flex;align-items:center;gap:12px;
 min-height:40px;padding:0;border:0;border-radius:0;background:transparent;
 box-shadow:none;
}
#hy-escort-panel .hy-escort-thinking .hy-ui-loader[data-active=true] .hy-ui-pixel-grid i{
 animation:hy-escort-churn 1.05s ease-in-out var(--hy-pixel-delay,0ms) infinite;
}
#hy-escort-panel .hy-escort-thinking-label,
#hy-escort-panel .hy-escort-thinking .hy-ui-shimmer{
 background:linear-gradient(100deg,#91aed2,#fff 35%,#39e9f2 50%,#fff 63%,#91aed2);
 background-size:240% 100%;-webkit-background-clip:text;background-clip:text;
 color:transparent;font-weight:790;font-size:13px;
 animation:hy-escort-shimmer 2.4s linear infinite;
}
#hy-escort-panel .hy-escort-thinking .hy-ui-elapsed{
 font-size:10px;font-variant-numeric:tabular-nums;color:#afc4df
}
@keyframes hy-escort-churn{
 0%,70%,100%{opacity:.26;transform:scale(.68)}
 25%,43%{opacity:1;transform:scale(1.15);box-shadow:0 0 8px currentColor}
}
@keyframes hy-escort-shimmer{
 from{background-position:160% 0}to{background-position:-95% 0}
}
/* The answer is the artifact, not a stack of tiny text in one bubble.
   Restore clear document hierarchy from the sanitized hyChat renderer. */
#hy-escort-panel .hy-escort-message.bot[data-rich=true]{
 max-width:100%;min-width:0;width:100%;
 padding:15px 16px;
 background:linear-gradient(145deg,rgba(13,29,52,.97),rgba(24,20,48,.95));
 border:1px solid rgba(88,162,230,.3);
 border-radius:17px;
 box-shadow:0 10px 28px #0003,0 0 15px rgba(76,141,246,.035);
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose{
 font-size:13px;line-height:1.78;font-weight:430;letter-spacing:.002em
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose h1{
 font-size:21px;line-height:1.2;font-weight:900;letter-spacing:-.035em;
 margin:17px 0 11px;color:#f5fbff;
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose h2{
 font-size:17px;line-height:1.35;font-weight:850;letter-spacing:-.024em;
 margin:17px 0 9px;padding-bottom:7px;
 color:#d8efff;border-bottom:1px solid rgba(104,173,233,.22)
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose h3{
 font-size:14px;line-height:1.45;font-weight:790;
 margin:14px 0 7px;color:#a9eefa
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose :is(p,ul,ol,blockquote,pre,table){
 margin:0 0 12px;
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose :is(ul,ol){
 padding-left:22px;
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose li{
 padding-left:3px;line-height:1.7;margin:5px 0;
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose :is(p,li,blockquote){
 overflow-wrap:anywhere;
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose :first-child{
 margin-top:0;
}
#hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose :last-child{
 margin-bottom:0;
}
@media(max-width:430px){
 #hy-escort-panel .hy-escort-message.bot[data-rich=true]{padding:12px 13px}
 #hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose h1{font-size:19px}
 #hy-escort-panel .hy-escort-message.bot[data-rich=true] .hy-prose h2{font-size:16px}
}
@media(prefers-reduced-motion:reduce){
 #hy-escort-panel .hy-escort-pixel-grid i,
 #hy-escort-panel .hy-ui-pixel-grid i,
 #hy-escort-panel .hy-escort-thinking-label,
 #hy-escort-panel .hy-escort-thinking .hy-ui-shimmer{
 animation:none!important;
 }
}
