@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-100.ttf") format("truetype");font-weight:100;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-200.ttf") format("truetype");font-weight:200;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-300.ttf") format("truetype");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-400.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-500.ttf") format("truetype");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-700.ttf") format("truetype");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-900.ttf") format("truetype");font-weight:900;font-style:normal;font-display:swap}
@font-face{font-family:"Yekan Bakh";src:url("../fonts/yekan-bakh-1000.ttf") format("truetype");font-weight:1000;font-style:normal;font-display:swap}

:root{
  --navy:#110b63;--ink:#18152d;--text:#5f5b70;--muted:#8b8798;--line:#e7e4ef;
  --violet:#7055e8;--red:#ef3737;--blue:#2878db;--success:#22a26a;
  --surface:#fff;--canvas:#f7f6fb;--tone:var(--violet)
}
*{box-sizing:border-box}
html{min-width:320px;overflow-x:hidden;background:var(--canvas);scroll-behavior:smooth}
body{margin:0;min-width:320px;color:var(--ink);background:var(--canvas);font-family:"Yekan Bakh",Tahoma,Arial,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}
button,input,textarea{font:inherit}
button{border:0}
button,a{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
[hidden]{display:none!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.tone-violet{--tone:var(--violet)}.tone-red{--tone:var(--red)}.tone-blue{--tone:var(--blue)}

/* Hub */
.advisor-hub{position:relative;min-height:100vh;overflow:hidden;background:radial-gradient(circle at 85% 5%,rgba(112,85,232,.13),transparent 28rem),radial-gradient(circle at 8% 75%,rgba(254,9,8,.06),transparent 26rem),linear-gradient(180deg,#fbfaff 0%,#f7f6fb 60%,#fff 100%)}
.hub-grid{position:absolute;inset:0;opacity:.3;pointer-events:none;background-image:linear-gradient(rgba(17,11,99,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(17,11,99,.035) 1px,transparent 1px);background-size:46px 46px;mask-image:linear-gradient(to bottom,#000,transparent 72%)}
.hub-header,.hub-main,.hub-footer{position:relative;z-index:1;width:min(1180px,calc(100% - 48px));margin-inline:auto}
.hub-header{min-height:92px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(17,11,99,.08)}
.hub-brand{display:flex;align-items:center;gap:12px}
.hub-brand img{width:52px;height:52px;object-fit:contain;border:1px solid rgba(17,11,99,.08);border-radius:17px;background:#fff}
.hub-brand>span{display:flex;flex-direction:column;gap:2px}
.hub-brand strong{color:var(--navy);font-size:.96rem;font-weight:900}
.hub-brand small{color:var(--muted);font-size:.72rem}
.hub-status{min-height:38px;padding:0 14px;display:flex;align-items:center;gap:8px;border:1px solid rgba(17,11,99,.09);border-radius:12px;color:#625e74;background:rgba(255,255,255,.8);font-size:.77rem;font-weight:750}
.hub-status i,.workspace-identity i{width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px rgba(34,162,106,.12)}
.hub-main{padding:clamp(58px,8vw,96px) 0 64px}
.hub-copy{max-width:760px;margin:0 auto 46px;text-align:center}
.hub-kicker{display:inline-flex;margin-bottom:13px;color:var(--navy);font-size:.8rem;font-weight:800}
.hub-copy h1{margin:0;color:var(--ink);font-size:clamp(2rem,5vw,3.7rem);font-weight:1000;letter-spacing:-.055em}
.hub-copy p{max-width:700px;margin:16px auto 0;color:var(--text);font-size:1.02rem;line-height:2}
.assistant-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.assistant-card{--tone:var(--violet);min-height:390px;padding:25px;display:flex;flex-direction:column;border:1px solid rgba(17,11,99,.1);border-radius:29px;background:rgba(255,255,255,.86);box-shadow:0 18px 50px rgba(30,22,89,.07);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.assistant-card:hover{transform:translateY(-6px);border-color:color-mix(in srgb,var(--tone) 35%,var(--line));box-shadow:0 28px 70px color-mix(in srgb,var(--tone) 12%,transparent)}
.assistant-card__top{display:flex;align-items:center;justify-content:space-between}
.assistant-icon{width:58px;height:58px;display:inline-flex;align-items:center;justify-content:center;border-radius:19px;color:var(--tone);background:color-mix(in srgb,var(--tone) 10%,#fff);font-size:1.65rem;font-weight:900}
.assistant-index{color:#bbb7c8;font-size:.82rem;font-weight:800}
.assistant-card__body{padding-top:32px}
.assistant-card h2{margin:0;min-height:62px;color:var(--ink);font-size:1.24rem;font-weight:900;line-height:1.55}
.assistant-card p{margin:13px 0 0;color:var(--text);font-size:.88rem;line-height:1.9}
.topic-list{margin-top:19px;display:flex;flex-wrap:wrap;gap:7px}
.topic-list span{min-height:29px;padding:0 9px;display:inline-flex;align-items:center;border:1px solid color-mix(in srgb,var(--tone) 12%,var(--line));border-radius:9px;color:#706c7f;background:#faf9fd;font-size:.68rem;font-weight:650}
.assistant-card__action{margin-top:auto;padding-top:24px;display:flex;align-items:center;justify-content:space-between;color:var(--tone);font-size:.82rem;font-weight:850}
.assistant-card__action b{width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;color:#fff;background:var(--tone);font-size:1.1rem}
.hub-note{max-width:820px;margin:32px auto 0;padding:15px 18px;display:flex;align-items:center;gap:11px;border:1px solid rgba(17,11,99,.08);border-radius:15px;background:rgba(255,255,255,.72)}
.hub-note>span{width:31px;height:31px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;color:#fff;background:var(--navy);font-size:1.1rem}
.hub-note p{margin:0;color:var(--text);font-size:.81rem;line-height:1.8}.hub-note strong{color:var(--navy)}
.hub-footer{min-height:84px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgba(17,11,99,.08);color:var(--muted);font-size:.76rem}

/* Chat */
.chat-workspace{height:100dvh;min-height:620px;overflow:hidden;display:flex;flex-direction:column;background:radial-gradient(circle at 80% 0,color-mix(in srgb,var(--tone) 10%,transparent),transparent 28rem),var(--canvas)}
.workspace-header{min-height:76px;padding:0 clamp(16px,4vw,54px);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.91);backdrop-filter:blur(14px)}
.back-link{width:fit-content;min-height:40px;padding:0 13px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:12px;color:#625f73;background:#fff;font-size:.8rem;font-weight:750}
.back-link span{color:var(--navy);font-size:1.05rem}.back-link b{font-weight:750}
.workspace-identity{display:flex;align-items:center;justify-content:center;gap:11px}
.assistant-icon--small{width:44px;height:44px;border-radius:14px;font-size:1.25rem}
.workspace-identity>div{display:flex;flex-direction:column;gap:4px}
.workspace-identity strong{max-width:430px;overflow:hidden;color:var(--ink);font-size:.9rem;font-weight:900;text-overflow:ellipsis;white-space:nowrap}
.workspace-identity span{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.7rem}
.workspace-identity i{width:6px;height:6px}
.workspace-actions{justify-self:end;display:flex;align-items:center;gap:9px}
.history-button{min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:12px;color:#625f73;background:#fff;cursor:pointer;font-size:.76rem;font-weight:750}
.workspace-brand img{width:40px;height:40px;object-fit:contain;border-radius:12px}
.workspace-body{width:min(960px,calc(100% - 32px));min-height:0;flex:1;margin:0 auto;display:flex;flex-direction:column}
.conversation{min-height:0;flex:1;overflow-y:auto;padding:clamp(28px,5vh,54px) 10px 26px;scrollbar-width:thin;scrollbar-color:#d9d6e6 transparent}
.conversation-intro{max-width:720px;margin:0 auto 32px;text-align:center}
.assistant-icon--hero{width:72px;height:72px;margin-bottom:17px;border-radius:23px;font-size:2rem;box-shadow:0 15px 35px color-mix(in srgb,var(--tone) 16%,transparent)}
.conversation-intro h1{margin:0;font-size:clamp(1.5rem,3vw,2.1rem);font-weight:1000;letter-spacing:-.04em}
.conversation-intro p{max-width:660px;margin:10px auto 0;color:var(--text);font-size:.94rem;line-height:1.9}
.capability-row{margin-top:17px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}
.capability-row span{min-height:32px;padding:0 10px;display:inline-flex;align-items:center;border:1px solid color-mix(in srgb,var(--tone) 14%,var(--line));border-radius:10px;color:#716d80;background:rgba(255,255,255,.78);font-size:.72rem;font-weight:650}
.message-list{display:flex;flex-direction:column;gap:14px}
.chat-line{display:flex;align-items:flex-end;gap:9px;direction:ltr}.chat-line--assistant{justify-content:flex-start}.chat-line--user{justify-content:flex-end}
.message-logo{width:32px;height:32px;flex:0 0 auto;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(17,11,99,.1);border-radius:10px;background:#fff}
.message-logo img{width:88%;height:88%;object-fit:contain}
.chat-bubble{max-width:min(76%,650px);padding:13px 16px;border:1px solid var(--line);border-radius:18px 18px 5px 18px;color:#464252;background:#fff;box-shadow:0 8px 24px rgba(22,16,70,.055);font-size:.9rem;font-weight:520;line-height:1.9;white-space:pre-wrap;word-break:break-word;direction:rtl;text-align:right}
.chat-line--user .chat-bubble{border-color:transparent;border-radius:18px 18px 18px 5px;color:#fff;background:linear-gradient(135deg,var(--navy),#302492)}
.chat-line--error .chat-bubble{border-color:rgba(208,46,46,.2);color:#9d2e2e;background:#fff7f7}
.message-text{display:block}.attached-file{width:fit-content;margin-bottom:7px;padding:5px 8px;display:block;border-radius:7px;color:var(--navy);background:#f1eff9;font-size:.72rem}.chat-line--user .attached-file{color:#fff;background:rgba(255,255,255,.13)}
.message-sources{margin-top:13px;padding-top:11px;display:flex;flex-direction:column;gap:7px;border-top:1px solid rgba(17,11,99,.09)}
.message-sources>strong{color:var(--navy);font-size:.73rem}.message-sources a{display:flex;align-items:flex-start;gap:7px;color:#4f4a69;font-size:.72rem;font-weight:650;line-height:1.6}.message-sources a:hover{color:var(--tone);text-decoration:underline}
.message-sources a span{width:20px;height:20px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;color:var(--tone);background:color-mix(in srgb,var(--tone) 9%,#fff);font-size:.62rem}
.loading-bubble{display:flex;align-items:center;gap:5px}.loading-bubble i{width:6px;height:6px;border-radius:50%;background:var(--tone);animation:typing-dot 1.1s infinite ease-in-out}.loading-bubble i:nth-child(2){animation-delay:120ms}.loading-bubble i:nth-child(3){animation-delay:240ms}.loading-bubble span{margin-right:5px;color:var(--muted);font-size:.74rem}
@keyframes typing-dot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.prompt-suggestions{max-width:720px;margin:18px auto 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.prompt-suggestions button{min-height:56px;padding:9px 12px;border:1px solid var(--line);border-radius:13px;color:#625e72;background:rgba(255,255,255,.83);cursor:pointer;font-size:.76rem;font-weight:650;line-height:1.65;transition:transform .18s ease,border-color .18s ease}.prompt-suggestions button:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--tone) 34%,var(--line))}
.workspace-composer{padding:12px 0 15px;background:linear-gradient(to top,var(--canvas) 80%,rgba(247,246,251,0))}
.composer-notice{margin-bottom:8px;padding:9px 12px;border:1px solid rgba(208,46,46,.17);border-radius:10px;color:#9d2e2e;background:#fff7f7;font-size:.75rem}
.selected-file{width:fit-content;max-width:100%;margin:0 0 8px auto;padding:7px 9px;display:flex;align-items:center;gap:7px;border:1px solid color-mix(in srgb,var(--tone) 18%,var(--line));border-radius:10px;color:#5e596c;background:#fff;font-size:.76rem}
.selected-file b{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}.selected-file button{width:24px;height:24px;padding:0;border-radius:7px;color:#7c7888;background:#f2f1f6;cursor:pointer;font-size:1rem}
.composer-shell{min-height:68px;padding:9px;display:flex;align-items:flex-end;gap:8px;border:1px solid rgba(17,11,99,.12);border-radius:22px;background:#fff;box-shadow:0 18px 45px rgba(23,16,78,.11)}
.composer-shell:focus-within{border-color:color-mix(in srgb,var(--tone) 48%,transparent);box-shadow:0 18px 45px rgba(23,16,78,.12),0 0 0 3px color-mix(in srgb,var(--tone) 9%,transparent)}
.composer-shell textarea{min-width:0;min-height:46px;max-height:130px;flex:1;padding:11px 6px;resize:none;border:0;outline:0;color:var(--ink);background:transparent;font-size:1rem;line-height:1.65}.composer-shell textarea::placeholder{color:#aaa7b6}
.attach-button,.send-button{width:46px;height:46px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;cursor:pointer}.attach-button{color:#6f6b7e;background:#f1f0f6}.send-button{color:#fff;background:var(--tone);box-shadow:0 9px 20px color-mix(in srgb,var(--tone) 24%,transparent)}.attach-button:disabled,.send-button:disabled{cursor:not-allowed;opacity:.42;box-shadow:none}
.composer-footer{min-height:27px;padding:7px 7px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:.69rem}.composer-footer b{font-weight:750;white-space:nowrap}.composer-footer b.is-low{color:#bd3434}
.upload-policy{margin:3px 7px 0;color:#8a8695;font-size:.64rem;line-height:1.6;text-align:center}

/* History */
.history-backdrop{position:fixed;inset:76px 0 0;z-index:40;background:rgba(17,11,55,.28);backdrop-filter:blur(3px);cursor:pointer}
.history-panel{position:fixed;z-index:41;top:76px;right:0;bottom:0;width:min(390px,92vw);padding:24px 20px;display:flex;flex-direction:column;border-left:1px solid var(--line);background:#fff;box-shadow:-24px 0 60px rgba(17,11,55,.16)}
.history-panel__header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.history-panel__header>div{display:flex;flex-direction:column;gap:5px}.history-panel__header strong{font-size:1rem}.history-panel__header span{color:var(--muted);font-size:.7rem}.history-panel__header>button{width:34px;height:34px;border-radius:10px;color:#6b6777;background:#f2f1f6;cursor:pointer;font-size:1.25rem}
.new-chat-button{min-height:46px;margin-top:22px;border-radius:13px;color:#fff;background:var(--tone);cursor:pointer;font-size:.84rem;font-weight:850}
.history-list{min-height:0;margin-top:16px;flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:8px}.history-empty{margin:30px 0;color:var(--muted);font-size:.8rem;text-align:center}
.history-item{display:flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:13px;background:#fff}.history-item.is-active{border-color:color-mix(in srgb,var(--tone) 36%,var(--line));background:color-mix(in srgb,var(--tone) 5%,#fff)}
.history-item>button:first-child{min-width:0;flex:1;padding:11px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;background:transparent;cursor:pointer;text-align:right}.history-item strong{max-width:100%;overflow:hidden;font-size:.77rem;text-overflow:ellipsis;white-space:nowrap}.history-item span{color:var(--muted);font-size:.66rem}
.history-delete{width:36px;height:36px;margin-left:6px;border-radius:10px;color:#a09cab;background:transparent;cursor:pointer;font-size:1rem}.history-delete:hover{color:#e34242;background:#fff1f1}.clear-history-button{min-height:40px;margin-top:12px;border-radius:11px;color:#a83b3b;background:#fff1f1;cursor:pointer;font-size:.74rem;font-weight:750}

@media(max-width:980px){.assistant-grid{grid-template-columns:1fr;max-width:720px;margin-inline:auto}.assistant-card{min-height:0}.workspace-header{grid-template-columns:auto 1fr auto}}
@media(max-width:680px){
  .hub-header,.hub-main,.hub-footer{width:min(100% - 28px,1180px)}.hub-header{min-height:76px}.hub-brand img{width:42px;height:42px;border-radius:13px}.hub-brand small{display:none}.hub-status{padding:0 10px;font-size:.7rem}.hub-main{padding-top:46px}.hub-copy{margin-bottom:29px}.hub-copy h1{font-size:2.2rem}.hub-copy p{font-size:.92rem}.assistant-grid{gap:13px}.assistant-card{padding:20px;border-radius:23px}.assistant-card__body{padding-top:22px}.assistant-card h2{min-height:0;font-size:1.1rem}.hub-note{align-items:flex-start}.hub-footer{min-height:94px;flex-direction:column;justify-content:center;gap:4px}
  .chat-workspace{min-height:560px}.workspace-header{min-height:68px;padding:0 11px;gap:8px}.back-link{width:42px;height:42px;min-height:42px;padding:0;justify-content:center}.back-link b{display:none}.workspace-identity{justify-content:flex-start;gap:7px;min-width:0}.assistant-icon--small{width:40px;height:40px;flex:0 0 auto}.workspace-identity>div{min-width:0}.workspace-identity strong{max-width:43vw;font-size:.75rem}.workspace-identity span{font-size:.62rem}.workspace-brand img{width:38px;height:38px}.workspace-actions{gap:5px}.history-button{width:42px;height:42px;min-height:42px;padding:0}.history-button span{display:none}
  .workspace-body{width:min(100% - 20px,960px)}.conversation{padding:24px 2px 18px}.assistant-icon--hero{width:62px;height:62px;border-radius:20px}.conversation-intro{margin-bottom:25px}.conversation-intro h1{font-size:1.38rem}.conversation-intro p{font-size:.86rem}.capability-row{gap:6px}.capability-row span{min-height:30px;padding:0 8px;font-size:.65rem}.prompt-suggestions{grid-template-columns:1fr}.prompt-suggestions button{min-height:47px}.chat-bubble{max-width:88%;font-size:.85rem}.workspace-composer{padding-bottom:max(10px,env(safe-area-inset-bottom))}.composer-shell{min-height:62px;border-radius:19px}.composer-shell textarea{font-size:.92rem}.attach-button,.send-button{width:43px;height:43px;border-radius:13px}.composer-footer{align-items:flex-start;font-size:.61rem}.composer-footer span{max-width:66%}.composer-footer b{white-space:normal;text-align:left}.upload-policy{font-size:.59rem}
  .history-backdrop{inset-block-start:68px}.history-panel{top:68px;width:min(360px,94vw)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}
