/* Beta First: authenticated conversation-first presentation, without changing data or tool handlers. */
#solPanel{max-width:100vw;overflow-x:hidden}
#solPanel .sol-head,#solPanel .sol-messages,#solPanel .sol-form{min-width:0}
#solPanel .sol-quick{max-width:100%;scrollbar-width:thin}
.beta-first-controls{display:flex;align-items:center;gap:9px;margin-left:auto}
.beta-first-button,.beta-first-return{border:1px solid #544632;background:#201e1b;color:#f2e8d7;border-radius:12px;padding:10px 14px;font-weight:700;font-size:13px;white-space:nowrap;cursor:pointer}
.beta-first-button:hover,.beta-first-return:hover{border-color:#c7a76d}
.beta-first-workspace-button{background:#c7a76d;color:#0a0a0b;border-color:#c7a76d}
.beta-first-return{background:#c7a76d;color:#0a0a0b;border-color:#c7a76d}
.beta-first-return[hidden]{display:none!important}
body.beta-first-mode{overflow:hidden}
body.beta-first-mode .topbar,body.beta-first-mode .shell,body.beta-first-mode [data-iagenda-company-footer="true"]{display:none!important}
body.beta-first-mode #solOverlay{display:none!important}
body.beta-first-mode #solPanel{inset:0;width:100vw;max-width:none;height:100dvh;box-shadow:none;transform:none;transition:none;background:#0a0a0b;z-index:105}
body.beta-first-mode #solPanel .sol-head{flex:0 0 auto;align-items:center;gap:16px;padding:16px max(20px,calc((100vw - 960px)/2));border-color:#292724;background:#0b0b0c}
body.beta-first-mode #solPanel .sol-head h2{font-size:25px;line-height:1.15;margin:0}
body.beta-first-mode #solPanel .sol-head .eyebrow{font-size:10px;letter-spacing:.11em;margin-bottom:4px}
body.beta-first-mode #solContextLabel{display:none}
body.beta-first-mode #solCloseBtn{display:none}
body.beta-first-mode #solPanel .sol-status{display:none}
body.beta-first-mode #solPanel .sol-status.warn{display:block;flex:0 0 auto;margin:8px auto 0;padding:8px 12px;width:min(810px,calc(100% - 32px))}
body.beta-first-mode #solPanel .sol-quick{display:none;flex:0 0 auto;box-sizing:border-box}

/* Only the authenticated conversation uses the supplied portrait as ambient art.
   Pseudo-elements do not take layout space, receive clicks, or overlap the composer. */
body.beta-first-mode #solPanel .sol-messages{
  position:relative;
  isolation:isolate;
}
body.beta-first-mode #solPanel .sol-messages::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:linear-gradient(90deg,#0a0a0b 10%,rgba(10,10,11,.72) 46%,rgba(10,10,11,.24) 100%),url('/beta-first-portrait.svg');
  background-repeat:no-repeat;
  background-position:center,right 8% center;
  background-size:cover,auto min(88%,640px);
  opacity:.24;
  filter:saturate(.72);
  transition:opacity .22s ease;
}
body.beta-first-mode #solPanel .sol-messages > *{position:relative;z-index:1}
body.beta-first-mode.beta-first-chat-started #solPanel .sol-messages::before{opacity:0}
body.beta-first-mode.beta-first-tools-open #solPanel .sol-quick{display:flex;flex-wrap:wrap;gap:8px;width:min(850px,calc(100% - 32px));max-height:28dvh;margin:10px auto 0;padding:10px;overflow-y:auto;overflow-x:hidden;border:1px solid #302b24;border-radius:14px;background:#151416}
body.beta-first-mode #solPanel .sol-quick button{max-width:100%;white-space:normal;text-align:left}
body.beta-first-mode #solPanel .sol-messages{min-height:0;width:100%;padding:24px max(22px,calc((100vw - 850px)/2));gap:16px;background:#0a0a0b;overscroll-behavior:contain}
body.beta-first-mode #solPanel .sol-msg{max-width:min(88%,680px);border-radius:18px;padding:13px 16px;line-height:1.55}
body.beta-first-mode #solPanel .sol-msg.assistant{background:#1a1918;border:1px solid #373129}
body.beta-first-mode #solPanel .sol-msg.user{background:#c7a76d}
body.beta-first-mode #solPanel .beta-file-tools{flex:0 0 auto;align-self:center;box-sizing:border-box;width:min(850px,calc(100% - 32px));background:transparent!important;border:0!important;padding:8px 0 0!important}
body.beta-first-mode #solPanel .sol-form{flex:0 0 auto;box-sizing:border-box;align-self:center;width:min(850px,calc(100% - 32px));display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px;margin:10px 0 9px;border:1px solid #4e4230;border-radius:18px;background:#171616}
body.beta-first-mode #solPanel .sol-form textarea{min-width:0;max-width:100%;min-height:46px;max-height:128px;resize:vertical;line-height:1.45;border:0!important;box-shadow:none!important;background:transparent!important;padding:11px}
body.beta-first-mode #solPanel .sol-form #solSendBtn{width:auto;height:45px;min-width:78px;border-radius:12px}
body.beta-first-mode #solPanel .sol-note{flex:0 0 auto;align-self:center;box-sizing:border-box;width:min(850px,calc(100% - 32px));padding:0 4px max(13px,env(safe-area-inset-bottom));font-size:10px;line-height:1.4;background:transparent!important}
@media(max-width:760px){
  body.beta-first-mode #solPanel .sol-head{padding:calc(12px + env(safe-area-inset-top)) 14px 12px;gap:9px}
  body.beta-first-mode #solPanel .sol-head h2{font-size:22px}
  body.beta-first-mode #solPanel .sol-head .eyebrow{display:none}
  .beta-first-controls{gap:6px}
  .beta-first-button{padding:9px 11px;font-size:12px}
  body.beta-first-mode #solPanel .sol-messages::before{
    background-image:linear-gradient(180deg,rgba(10,10,11,.16),rgba(10,10,11,.58)),url('/beta-first-portrait.svg');
    background-position:center,center 18%;
    background-size:cover,auto min(72%,420px);
    opacity:.12;
  }
  body.beta-first-mode #solPanel .sol-messages{padding:18px 14px;gap:12px}
  body.beta-first-mode #solPanel .sol-msg{max-width:94%;padding:11px 13px}
  body.beta-first-mode #solPanel .sol-form{grid-template-columns:minmax(0,1fr) auto!important;width:calc(100% - 24px);gap:4px;margin:8px 0 7px;padding:6px}
  body.beta-first-mode #solPanel .sol-form textarea{min-height:44px;max-height:112px;padding:9px}
  body.beta-first-mode #solPanel .sol-form #solSendBtn{width:auto!important;min-width:65px;height:42px;padding:9px}
  body.beta-first-mode #solPanel .beta-file-tools,body.beta-first-mode #solPanel .sol-note{width:calc(100% - 24px)}
  body.beta-first-mode #solPanel .beta-file-tools{padding:4px 0 0!important;gap:6px}
  body.beta-first-mode #solPanel .beta-file-tool{font-size:12px;padding:7px 9px}
  body.beta-first-mode #solPanel .sol-note{font-size:9px;padding:0 3px max(9px,env(safe-area-inset-bottom))}
  body.beta-first-mode.beta-first-tools-open #solPanel .sol-quick{width:calc(100% - 24px)}
}
@media(max-width:360px){
  .beta-first-button{padding:8px 9px;font-size:11px}
  body.beta-first-mode #solPanel .sol-head{padding-inline:11px}
}
@media(prefers-reduced-motion:reduce){
  body.beta-first-mode #solPanel{transition:none!important}
  body.beta-first-mode #solPanel .sol-messages::before{transition:none!important}
}


/* Beta Welcome Screen: the user-approved light, centered entrance (private /app).
   Conversation elements keep their original IDs, listeners and permissions. */
body.beta-first-mode #solPanel{background:#fbfaf8!important;color:#21211f!important}
body.beta-first-mode #solPanel .sol-head{
  background:#fff!important;border-bottom:1px solid #eceae6!important;color:#22231f!important;
  padding-block:17px!important
}
body.beta-first-mode #solPanel .sol-head h2{font:650 21px/1.2 Inter,system-ui,sans-serif;color:#22231f!important}
body.beta-first-mode #solPanel .sol-head .eyebrow{color:#a0804f!important}
body.beta-first-mode #solPanel .beta-first-button{
  color:#353535!important;background:#fff!important;border:1px solid #e5e2db!important;
  border-radius:12px;font-weight:600
}
body.beta-first-mode #solPanel .beta-first-workspace-button{background:#f3efe9!important;border-color:#dfd6c9!important}
body.beta-first-mode #solPanel .sol-status.warn{background:#fff5e7!important;color:#795d37!important}
body.beta-first-mode #solPanel .sol-quick{background:#fff!important;border-color:#ece7dc!important}
body.beta-first-mode #solPanel .sol-quick button{background:#fff!important;color:#3b3832!important;border-color:#e2dbd0!important}
body.beta-first-mode #solPanel .sol-messages{
  background:#fbfaf8!important;color:#22231f!important;
  padding:15px max(20px,calc((100vw - 750px)/2));
}
body.beta-first-mode #solPanel .sol-messages::before{display:none!important}
body.beta-first-mode #solPanel #betaGreeting{display:none!important}
body.beta-first-mode:not(.beta-first-chat-started) #solPanel .sol-messages{
  justify-content:center;align-items:center
}
body.beta-first-mode #solPanel .beta-first-welcome{
  flex:0 0 auto;align-self:center;display:flex;flex-direction:column;
  align-items:center;gap:0;max-width:440px;width:100%;
  margin:auto 0;text-align:center;color:#242420;
}
body.beta-first-mode #solPanel .beta-first-welcome[hidden],
body:not(.beta-first-mode) #solPanel .beta-first-welcome,
body.beta-first-mode.beta-first-chat-started #solPanel .beta-first-welcome{display:none!important}
body.beta-first-mode #solPanel .beta-first-avatar{
  display:block;width:120px;height:120px;border-radius:50%;
  object-fit:cover;object-position:center 19%;filter:grayscale(1);
  border:1px solid #dedbd6;box-shadow:0 2px 12px rgba(0,0,0,.055);
}
body.beta-first-mode #solPanel .beta-first-welcome h3{
  margin:20px 0 12px;font:650 24px/1.3 Inter,system-ui,sans-serif;
  letter-spacing:-.035em;color:#20211e!important
}
body.beta-first-mode #solPanel .beta-first-welcome p{
  margin:0;font:400 17px/1.6 Inter,system-ui,sans-serif;color:#3c3d39!important;
  max-width:380px;text-wrap:pretty
}
body.beta-first-mode #solPanel .sol-msg{
  max-width:min(85%,650px);border-radius:16px;line-height:1.55
}
body.beta-first-mode #solPanel .sol-msg.assistant{
  background:#fff!important;border:1px solid #e8e5df!important;color:#272924!important
}
body.beta-first-mode #solPanel .sol-msg.user{background:#ead9b9!important;color:#27231c!important}
body.beta-first-mode #solPanel .beta-file-tools{background:#fbfaf8!important}
body.beta-first-mode #solPanel .beta-file-tools .beta-file-tool{
  background:#fff!important;border:1px solid #e5e2dd!important;color:#4e4d49!important;
  font-weight:550;border-radius:11px
}
body.beta-first-mode #solPanel .sol-form{
  display:flex!important;flex-direction:column;align-items:stretch;
  gap:4px;width:min(760px,calc(100% - 32px));margin:6px 0 10px;padding:12px;
  background:#fff!important;border:1px solid #e2dfda!important;border-radius:18px;
  box-shadow:0 5px 25px rgba(40,37,32,.045)
}
body.beta-first-mode #solPanel .sol-form textarea{
  align-self:stretch;width:100%;max-width:100%;min-height:48px;max-height:130px;
  resize:vertical;color:#262626!important;background:transparent!important;
  border:0!important;outline-offset:1px;font-size:15px;line-height:1.5;
  padding:4px 5px;box-shadow:none!important
}
body.beta-first-mode #solPanel .sol-form textarea::placeholder{color:#868580!important;opacity:1}
body.beta-first-mode #solPanel .sol-form .sol-voice-actions{
  width:100%;display:flex;justify-content:flex-start;align-items:center;
  flex-wrap:nowrap;gap:7px;min-width:0
}
body.beta-first-mode #solPanel .sol-form .sol-voice-actions .btn{
  padding:8px 11px;height:40px;flex:0 1 auto;font-size:12px;
  border-radius:10px;white-space:nowrap
}
body.beta-first-mode #solPanel .sol-form .sol-voice-actions #solSendBtn{
  margin-left:auto;width:auto!important;min-width:70px;
  background:#bb9965!important;color:#181511!important;border:0!important
}
body.beta-first-mode #solPanel .sol-note{
  color:#87817b!important;background:#fbfaf8!important;text-align:center
}
@media(max-width:760px){
  body.beta-first-mode #solPanel .sol-head{padding:calc(12px + env(safe-area-inset-top)) 14px 12px!important}
  body.beta-first-mode #solPanel .sol-messages{padding:12px 16px}
  body.beta-first-mode #solPanel .beta-first-avatar{width:104px;height:104px}
  body.beta-first-mode #solPanel .beta-first-welcome h3{font-size:22px;margin:18px 0 9px}
  body.beta-first-mode #solPanel .beta-first-welcome p{font-size:15px;line-height:1.55}
  body.beta-first-mode #solPanel .sol-form{width:calc(100% - 24px);padding:10px;margin:4px 0 8px}
  body.beta-first-mode #solPanel .sol-form textarea{font-size:16px;min-height:42px}
  body.beta-first-mode #solPanel .sol-form .sol-voice-actions .btn{flex:0 1 auto;padding:8px 9px}
  body.beta-first-mode #solPanel .sol-form .sol-voice-actions #solSendBtn{margin-left:auto}
  body.beta-first-mode #solPanel .beta-file-tools{width:calc(100% - 24px)}
}
@media(max-width:390px){
  body.beta-first-mode #solPanel .sol-form .sol-voice-actions{gap:4px}
  body.beta-first-mode #solPanel .sol-form .sol-voice-actions .btn{font-size:11px;padding:8px 6px}
  body.beta-first-mode #solPanel .beta-first-avatar{width:96px;height:96px}
}

/* Readable citations inside Beta First chat. */
body.beta-first-mode #solPanel .sol-msg.assistant a{color:#715027;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
body.beta-first-mode #solPanel .sol-msg.assistant a:hover{color:#9a6c37}

/* Teacher-specific prompts appear only when Beta Teacher is the active specialty. */
body.beta-first-mode.beta-first-tools-open #solPanel .sol-quick:has(.beta-teacher-tool){
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  max-height:min(42dvh,420px);
}
/* The general controls remain visible; only the specialty subgrid is rebuilt. */
body.beta-first-mode #solPanel .sol-quick .beta-specialty-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  flex:1 0 100%;
  gap:9px;
  min-width:0;
}
body.beta-first-mode #solPanel .sol-quick .beta-specialty-actions:empty{display:none}
body.beta-first-mode #solPanel .sol-quick .beta-teacher-tool{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  border:1px solid #5b4b34;
  border-radius:11px;
  padding:12px 14px;
  background:#211e19;
  color:#f3e5d0;
  text-align:left;
  cursor:pointer;
}
body.beta-first-mode #solPanel .sol-quick .beta-teacher-tool:focus-visible{
  outline:2px solid #d8bb83;
  outline-offset:2px;
}
body.beta-first-mode #solPanel .sol-quick .beta-teacher-tool:hover{border-color:#c7a76d}
body.beta-first-mode #solPanel .beta-teacher-tool-title{font-size:13px;font-weight:800;line-height:1.25}
body.beta-first-mode #solPanel .beta-teacher-tool-detail{font-size:11px;font-weight:400;line-height:1.35;color:#c5b8a4}
/* Financial Analyst drill-down: two areas, each containing guided tasks. */
body.beta-first-mode #solPanel .sol-quick .beta-finance-nav-tool{border-color:#bfaa88!important;background:#faf6ef!important;color:#3f3324!important}
body.beta-first-mode #solPanel .sol-quick .beta-finance-nav-tool .beta-teacher-tool-detail{color:#6b6155!important}
body.beta-first-mode.beta-first-tools-open #solPanel .sol-quick .beta-finance-back{grid-column:1/-1;border-style:dashed!important}
@media(max-width:560px){
  body.beta-first-mode.beta-first-tools-open #solPanel .sol-quick:has(.beta-teacher-tool){
    max-height:38dvh;
  }
  body.beta-first-mode #solPanel .sol-quick .beta-specialty-actions{
    grid-template-columns:1fr;
  }
  body.beta-first-mode #solPanel .sol-quick .beta-teacher-tool{padding:10px 12px}
}
