@charset "UTF-8";
:root{color-scheme:light;--bg:#f8f9fc;--surface:#fff;--text:#223149;--muted:#788396;--border:#e5e9f1;--blue:#4267d5;--pale:#edf2ff;--gold:#b28e54;--shadow:0 12px 45px #24385909;--nav:#142640;--field:#f8f9fc}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;font-family:"Segoe UI",Tahoma,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.75}
button,input,textarea{font:inherit}
button,a,input,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button{border:0}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:inherit;text-decoration:none}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
button:focus-visible,a:focus-visible{outline:3px solid #9bb2ff;outline-offset:4px}
input:focus-visible,textarea:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.svg-library{position:absolute;width:0;height:0;overflow:hidden}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.sidebar{position:fixed;inset:0 0 0 auto;width:274px;display:flex;flex-direction:column;background:var(--nav);color:#e6edfa;padding:29px 20px 15px;z-index:30;background-image:radial-gradient(ellipse at 100% 0,#2944674d,transparent 55%)}
.brand{display:flex;align-items:center;gap:10px;padding:0 6px;margin-bottom:37px}
.brand-type{font-family:"Segoe UI",Arial,sans-serif;letter-spacing:4px;font-size:27px;font-weight:600;line-height:1.15;direction:ltr}
.brand-type small{display:block;font-size:9px;letter-spacing:1px;color:#94a4bb;margin-top:7px;font-weight:400}
.brand-fa{margin-inline-start:auto;font-size:22px;color:#c5a267;padding-inline-start:11px;border-inline-start:1px solid #ffffff1a;line-height:1.1}
.new-chat{display:flex;align-items:center;gap:11px;width:100%;padding:13px 16px;background:#4267d5;color:white;border-radius:11px;font-size:14px;box-shadow:0 5px 20px #0b152a26;transition:background .2s}
.new-chat:hover{background:#537ae9}
.new-chat>span{margin-inline-start:auto;border:1px solid #ffffff26;border-radius:5px;width:21px;height:21px;line-height:19px;font-size:13px;color:#ffffffa8}
.nav-section-label{font-size:11px;color:#8192ad;margin:28px 12px 9px}
.main-nav{display:grid;gap:5px}
.nav-item{display:flex;align-items:center;gap:12px;padding:11px 13px;color:#aabbcf;background:transparent;text-align:start;border-radius:9px;width:100%}
.nav-item:hover{background:#ffffff07;color:white}
.nav-item.active{color:#eef3ff;background:#2e42605c}
.nav-item.active>svg{color:#91aaf9}
.nav-dot{margin-inline-start:auto;width:5px;height:5px;background:#a3b9ff;border-radius:50%}
.history-heading{display:flex;justify-content:space-between;align-items:center;color:#8495af;font-size:11px;margin:30px 12px 12px}
.history-heading>span:last-child{border:1px solid #ffffff13;border-radius:5px;min-width:21px;text-align:center;font-size:10px}
.history-list{min-height:80px;flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:#3d506c transparent}
.empty-history{text-align:center;padding:25px 10px;color:#7c8ea9}
.empty-history>svg{width:27px;height:27px;stroke-width:1.1;color:#657d9e}
.empty-history p{margin:7px 0 4px;font-size:12px}
.empty-history small{font-size:10px;line-height:1.9}
.history-row{display:flex;align-items:center;gap:2px;border-radius:8px;margin-bottom:4px}
.history-row.selected{background:#ffffff0d}
.history-row:hover{background:#ffffff09}
.history-open{display:flex;align-items:center;gap:9px;background:transparent;color:#b7c5d9;min-width:0;flex:1;padding:10px 9px;text-align:start;font-size:12px}
.history-open svg{width:15px;height:15px;color:#8199b8}
.history-open span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-delete{background:transparent;color:#8193ae;flex-shrink:0;padding:8px;border-radius:6px}
.history-delete:hover{color:#f0a2a2;background:#ffffff09}
.history-delete svg{width:15px;height:15px}
.history-more{color:#9fb8f8;background:transparent;font-size:11px;padding:8px}
.sidebar-bottom{padding-top:20px}
.plan-card{border:1px solid #c5a26730;border-radius:12px;padding:14px;background:linear-gradient(120deg,#c5a2670a,#ffffff03)}
.plan-card>div{display:flex;align-items:center;gap:8px}
.gold-star{color:#d0ad72;font-size:21px;line-height:1}
.plan-card strong{font-size:11px;font-weight:500;color:#e0d3bc}
.plan-card p{font-size:10px;color:#94a4bb;margin:7px 0 11px}
.plan-card button{display:flex;justify-content:space-between;align-items:center;width:100%;border-top:1px solid #ffffff0c;background:transparent;color:#d5b37e;font-size:11px;padding:9px 0 0}
.plan-card button svg{width:14px;height:14px}
.account-button{display:flex;align-items:center;gap:11px;width:100%;background:transparent;color:#e9eef6;padding:22px 2px 15px;text-align:start}
.avatar{height:35px;width:35px;border-radius:11px;background:#344663;color:#d0dcf2;display:grid;place-items:center;font-size:18px}
.account-button>span:nth-child(2){flex:1;min-width:0}
.account-button strong{display:block;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis}
.account-button small{display:block;font-size:10px;color:#94a4bb;margin-top:2px}
.account-button svg{width:15px;height:15px;color:#91a0b7}
.sidebar-signature{border-top:1px solid #ffffff0a;padding:14px 5px 0;color:#70839e;font-size:9px;display:flex;justify-content:space-between}
.sidebar-signature>span:last-child{color:#b49560}
.main-shell{margin-inline-start:274px;min-height:100dvh;display:flex;flex-direction:column}
.topbar{height:82px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 38px;border-bottom:1px solid var(--border);gap:20px;background:var(--surface)}
.topbar-title,.topbar-actions{display:flex;align-items:center;gap:17px;min-width:0}
.page-name{font-size:13px;font-weight:600;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-divider{height:14px;width:1px;background:var(--border)}
.workspace-label{font-size:11px;color:var(--muted);white-space:nowrap}
.demo-badge{font-size:10px;color:var(--gold);display:flex;align-items:center;gap:6px;white-space:nowrap}
.demo-badge i{width:5px;height:5px;border-radius:50%;background:#c7a263}
.icon-button{display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;background:transparent;color:var(--muted);border-radius:9px}
.icon-button:hover{background:var(--pale);color:var(--blue)}
.login-button{border:1px solid var(--border);background:var(--surface);color:var(--text);display:flex;gap:15px;align-items:center;padding:7px 12px;border-radius:8px;font-size:11px;white-space:nowrap}
.login-button svg{width:14px;height:14px}
.mobile-toggle,.mobile-only{display:none}
.workspace{width:100%;max-width:1050px;margin:auto;flex:1;display:flex;flex-direction:column;padding:28px 58px 14px;min-height:0}
.welcome{text-align:center;padding-top:18px;animation:reveal .5s ease-out}
.welcome-eyebrow{font-size:11px;color:#8c96a7;display:flex;align-items:center;justify-content:center;gap:12px;letter-spacing:.3px}
.welcome-eyebrow>span{height:1px;width:24px;background:#c5a26766}
.hero-emblem{position:relative;display:grid;place-items:center;width:114px;height:114px;margin:24px auto 17px;background:radial-gradient(circle,#e7edffb0 0,transparent 69%)}
.emblem-ring{position:absolute;inset:0;border:1px solid #dce3f1;border-radius:50%;transform:rotate(-25deg)}
.emblem-ring:after{content:"";position:absolute;top:18px;left:7px;width:6px;height:6px;border-radius:50%;background:#c5a267;box-shadow:0 0 0 5px var(--bg)}
.hero-emblem:after{content:"";position:absolute;inset:9px;border:1px solid #e4e9f3;border-radius:50%}
.hero-emblem img{z-index:1;filter:drop-shadow(0 6px 10px #4567ba15)}
h1{font-size:clamp(35px,3.1vw,48px);line-height:1.65;margin:0;font-weight:650;letter-spacing:-1.5px}
h1 span{color:var(--blue)}
.welcome-description{font-size:13px;color:var(--muted);margin:15px 0 31px}
.suggestions{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;max-width:780px;margin:0 auto}
.suggestions button{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:13px;text-align:start;color:var(--text);padding:18px 18px 17px;transition:transform .2s,border-color .2s,box-shadow .2s}
.suggestions button:hover{transform:translateY(-3px);border-color:#acbdeb;box-shadow:var(--shadow)}
.suggestion-icon{display:flex;align-items:center;justify-content:center;width:33px;height:33px;border-radius:9px;margin-bottom:12px}
.suggestion-icon svg{width:18px;height:18px}
.blue{background:#eef3ff;color:#4f73d1}
.gold{background:#f7f1e6;color:#ac8a51}
.violet{background:#f1edfb;color:#8e77c7}
.suggestions strong{display:block;font-size:12px;font-weight:600}
.suggestions button>span:not(.suggestion-icon){font-size:10px;color:var(--muted);display:block;margin-top:4px}
.card-arrow{position:absolute;left:14px;top:25px;width:14px;height:14px;color:#a5adbb}
.welcome-caption{font-size:10px;color:#919baa;margin-top:22px;display:flex;align-items:center;justify-content:center;gap:7px}
.welcome-caption span{color:#bca06d}
.composer-area{width:100%;max-width:820px;margin:18px auto 0;padding-top:0}
.composer{border:1px solid #dce3ef;border-radius:17px;background:var(--surface);padding:19px 21px 14px;box-shadow:0 4px 24px #1a355509;transition:border-color .2s,box-shadow .2s}
.composer:focus-within{border-color:#a7b8ed;box-shadow:0 4px 25px #315ac710}
.composer textarea{display:block;resize:none;width:100%;background:transparent;border:0;color:var(--text);outline:none;min-height:55px;max-height:170px;padding:0 0 8px;line-height:1.9;font-size:13px}
.composer textarea::placeholder{color:#949cab;direction:rtl}
.composer textarea:focus-visible{outline:none}
.composer-footer{display:flex;align-items:center;justify-content:space-between;gap:14px}
.model-chip{display:flex;align-items:center;gap:6px;font-size:12px}
.model-separator{color:#c5ccd8;margin:0 3px}
.model-label{font-size:10px;color:var(--muted)}
.send-controls{display:flex;gap:15px;align-items:center}
.keyboard-hint{font-size:9px;color:#a0a8b6}
.send-button{width:36px;height:36px;border-radius:10px;background:var(--blue);color:white;display:grid;place-items:center;transition:background .2s}
.send-button:hover:not(:disabled){background:#2e50b6}
.send-button:disabled{opacity:1;background:#e9edf6;color:#a4b1cd}
.send-button svg{width:20px;height:20px}
.composer-note{display:flex;align-items:center;justify-content:center;gap:5px;font-size:9px;color:#929baa;margin:12px 0 0;text-align:center;line-height:1.8}
.composer-note svg{width:12px;height:12px;flex-shrink:0}
.main-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;padding:18px 38px;font-size:9px;color:#9ba4b2}
.main-footer>span:first-child{font-family:Arial,sans-serif;font-size:9px;letter-spacing:1px}
.footer-dot{color:#ba9c69;margin:0 8px}
.status-line{font-size:12px;color:var(--blue);min-height:5px;padding:0 8px}
.status-line:not(:empty){padding-bottom:10px}
.status-line.error{color:#bb5252}
.workspace.has-messages{max-width:1100px;padding-top:25px}
.message-list{width:100%;max-width:820px;margin:0 auto;flex:1;display:flex;flex-direction:column;gap:28px;padding-bottom:32px}
.message{display:flex;gap:13px;align-items:flex-start;animation:reveal .25s ease-out}
.message-avatar{height:34px;width:34px;flex-shrink:0;border:1px solid var(--border);border-radius:10px;background:var(--surface);display:grid;place-items:center;color:var(--blue)}
.message-avatar img{width:27px;height:27px}
.message.user .message-avatar{background:var(--pale);border-color:transparent}
.message-body{min-width:0;flex:1}
.message-label{display:flex;align-items:center;gap:10px;margin:3px 0 9px;font-size:12px;font-weight:600}
.message-label small{font-size:9px;color:var(--muted);font-weight:400}
.message-text{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:2;padding:17px 19px;background:var(--surface);border:1px solid var(--border);border-radius:2px 13px 13px 13px}
.message.user .message-text{background:var(--pale);border-color:transparent}
.message-actions{margin-top:6px}
.message-actions button{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:5px;background:transparent;padding:5px}
.message-actions svg{height:13px;width:13px}
.has-messages .composer-area{position:sticky;bottom:0;background:var(--bg);padding:12px 0 9px;margin-top:auto;z-index:2}
.dialog{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:22px;padding:36px;width:min(440px,calc(100% - 32px));max-height:90dvh;overflow:auto;box-shadow:0 25px 100px #07162933}
.dialog::backdrop{background:#0a1a3869;backdrop-filter:blur(5px)}
.dialog-close{position:absolute;top:14px;left:14px}
.dialog-logo{display:block;margin:0 auto 10px}
.dialog-eyebrow{display:block;font-size:11px;color:var(--gold);text-align:center;margin-top:9px}
.dialog h2{font-size:22px;line-height:1.8;margin:5px 0 7px;font-weight:650}
.dialog>p{font-size:12px;color:var(--muted);margin:0 0 20px}
.auth-dialog h2,.auth-dialog>p{text-align:center}
.auth-tabs{display:flex;background:var(--field);border:1px solid var(--border);padding:4px;border-radius:10px;margin:25px 0}
.auth-tabs button{width:50%;background:transparent;color:var(--muted);padding:9px;border-radius:7px;font-size:12px}
.auth-tabs button.selected{background:var(--surface);color:var(--blue);box-shadow:0 2px 6px #1a355510}
.dialog label{display:block;margin:15px 0 7px;font-size:12px}
.dialog input,.dialog textarea{width:100%;border:1px solid var(--border);background:var(--field);color:var(--text);border-radius:9px;padding:11px 12px;font-size:13px;resize:vertical}
.password-wrapper{position:relative}
.password-wrapper input{padding-right:60px}
.password-wrapper button{position:absolute;right:10px;top:10px;background:transparent;color:var(--muted);font-size:10px}
.field-hint{display:block;font-size:10px!important;color:var(--muted);line-height:1.9;margin-top:7px}
.primary-button,.secondary-button,.danger-button{display:flex;align-items:center;justify-content:center;gap:14px;border-radius:9px;padding:11px 16px;font-size:12px}
.primary-button{color:white;background:var(--blue);width:100%;margin-top:20px}
.primary-button:hover{background:#355ac6}
.primary-button svg{width:16px;height:16px}
.secondary-button{background:var(--field);border:1px solid var(--border);color:var(--text)}
.danger-button{color:white;background:#bc4d53}
.dialog-buttons{display:flex;gap:10px;justify-content:flex-start}
.auth-footnote{font-size:10px!important;line-height:1.9;margin:20px 0 0!important}
.form-error{font-size:11px;color:#be5058;margin:8px 0;min-height:0}
.form-error:empty{margin:0}
.dialog-symbol{display:grid;place-items:center;width:45px;height:45px;background:var(--pale);color:var(--blue);border-radius:12px;margin-bottom:20px;font-size:27px}
.dialog-symbol.gold{background:#f7f1e6;color:var(--gold)}
.wide-dialog{width:min(650px,calc(100% - 32px))}
.memory-list{margin:22px 0;display:grid;gap:8px;max-height:250px;overflow:auto}
.memory-item{border:1px solid var(--border);border-radius:10px;padding:12px;display:flex;align-items:flex-start;gap:10px}
.memory-item p{font-size:12px;margin:0;flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}
.memory-item button{flex-shrink:0}
.empty-state{text-align:center;color:var(--muted);padding:20px 0;font-size:12px}
.plans{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:25px 0}
.plan-item{border:1px solid var(--border);border-radius:12px;padding:19px 12px;text-align:center}
.plan-item.current{border-color:#95aceb;background:var(--pale)}
.plan-item h3{font-size:17px;font-weight:600;margin:0 0 16px}
.plan-item strong{display:block;font-size:25px;color:var(--blue)}
.plan-item small{display:block;font-size:10px;color:var(--muted)}
.plan-item .plan-status{margin-top:15px;font-size:10px;color:var(--gold)}
.usage-card{background:var(--field);padding:18px;border:1px solid var(--border);border-radius:12px;margin:20px 0;font-size:12px}
.usage-card progress{width:100%;height:7px;accent-color:var(--blue)}
.usage-card p{margin:8px 0;color:var(--muted);font-size:11px}
.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#203855;color:white;box-shadow:0 8px 40px #13254126;border:1px solid #ffffff1a;max-width:calc(100% - 40px);border-radius:10px;padding:12px 22px;font-size:12px;z-index:1000}
html[data-theme="dark"]{color-scheme:dark;--bg:#111d30;--surface:#18273e;--field:#142136;--text:#e2e9f5;--muted:#99a8bf;--border:#2b3b54;--blue:#8ba7ff;--pale:#243554;--gold:#d1ae75;--nav:#0c182a}
html[data-theme="dark"] .send-button:not(:disabled),html[data-theme="dark"] .primary-button{background:#4267d5;color:white}
html[data-theme="dark"] .send-button:disabled{background:#2b3b54;color:#7c8da9}
html[data-theme="dark"] .hero-emblem{background:radial-gradient(circle,#5478ef20,transparent 70%)}
html[data-theme="dark"] .emblem-ring,html[data-theme="dark"] .hero-emblem:after{border-color:#344664}
html[data-theme="dark"] .suggestion-icon{background:#293b5b}
html[data-theme="dark"] .composer{border-color:#384b68}
@keyframes reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1450px){.workspace{padding-top:35px}.welcome{padding-top:34px}.hero-emblem{margin-top:30px;margin-bottom:20px}.welcome-description{margin-bottom:36px}.composer-area{margin-top:27px}.suggestions button{padding:22px}}
@media(max-height:820px) and (min-width:901px){.workspace{padding-top:20px}.welcome{padding-top:0}.hero-emblem{width:88px;height:88px;margin:15px auto 10px}.hero-emblem img{width:62px;height:62px}h1{font-size:35px;line-height:1.5}.welcome-description{margin:10px 0 22px}.welcome-caption{margin-top:14px}.suggestions button{padding:14px}.suggestion-icon{margin-bottom:8px}.composer-area{margin-top:12px}.main-footer{padding-top:8px;padding-bottom:12px}.brand{margin-bottom:27px}.sidebar-bottom{padding-top:14px}}
@media(max-width:1150px){.sidebar{width:245px;padding-inline:17px}.main-shell{margin-inline-start:245px}.workspace{padding-inline:32px}.topbar{padding-inline:26px}.workspace-label,.topbar-divider{display:none}.suggestions{gap:10px}.suggestions button{padding:15px}.suggestions strong{font-size:11px}.suggestions button>span:not(.suggestion-icon){font-size:9px}}
@media(max-width:900px){.sidebar{transform:translateX(100%);transition:transform .2s;width:274px}.sidebar.open{transform:translateX(0)}.main-shell{margin:0}.mobile-toggle{display:inline-flex}.topbar{height:68px;padding-inline:20px}.mobile-scrim{position:fixed;inset:0;width:100%;height:100%;background:#06132970;backdrop-filter:blur(2px);z-index:25}.workspace{max-width:860px;padding-inline:28px}.welcome{padding-top:28px}.main-footer{padding-inline:28px}}
@media(max-width:560px){.topbar{height:64px;padding-inline:14px;gap:10px}.topbar-title,.topbar-actions{gap:9px}.page-name{font-size:11px;max-width:105px}.demo-badge{font-size:9px}.demo-badge i{display:none}.login-button{font-size:10px;padding:6px 8px;gap:5px}.login-button svg{display:none}.icon-button{width:30px;height:32px}.workspace{padding:22px 18px 8px}.welcome{padding-top:15px}.hero-emblem{margin-top:22px;width:94px;height:94px}.hero-emblem img{width:66px;height:66px}h1{font-size:35px;line-height:1.6}.welcome-eyebrow{font-size:10px}.welcome-description{font-size:12px;margin-bottom:23px}.mobile-only{display:block}.suggestions{grid-template-columns:1fr;gap:9px}.suggestions button{padding:12px 56px 12px 25px;min-height:68px}.suggestion-icon{position:absolute;right:13px;top:16px;width:30px;height:30px;margin:0}.suggestions strong{font-size:11px}.suggestions button>span:not(.suggestion-icon){font-size:10px}.card-arrow{top:26px;left:11px}.welcome-caption{font-size:9px;margin-top:17px}.composer-area{margin-top:22px}.composer{padding:15px 14px 12px;border-radius:14px}.composer textarea{font-size:12px;min-height:60px}.keyboard-hint{display:none}.composer-note{font-size:8px;align-items:flex-start}.composer-note svg{margin-top:2px}.main-footer{font-size:8px;padding:14px 20px}.main-footer>span:first-child{font-size:8px}.dialog{padding:28px 22px;border-radius:18px}.dialog h2{font-size:20px}.plans{gap:7px}.plan-item{padding:15px 7px}.plan-item h3{font-size:13px}.plan-item strong{font-size:20px}.message{gap:8px}.message-avatar{width:28px;height:28px}.message-text{padding:13px;font-size:13px}.message-label{font-size:11px}.toast{font-size:11px;min-width:220px;text-align:center}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.composer textarea:placeholder-shown{text-align:right}

/* ARIO visual refresh: lapis, warm paper and geometric Persian-inspired detail. */
:root{--bg:#f5f4f0;--blue:#345cb7;--muted:#657186;--gold:#99723c;--border:#dfe3ec}
.main-shell{background:radial-gradient(ellipse at 15% 10%,#cbd8ff55,transparent 48%),radial-gradient(ellipse at 85% 60%,#e9d6ac38,transparent 45%),var(--bg)}
.sidebar{background:radial-gradient(ellipse at 90% 0,#304a77,transparent 65%),linear-gradient(160deg,#152945,#101c31);box-shadow:-8px 0 40px #14264012;border-inline-end:1px solid #d9b87833}
.brand img{filter:drop-shadow(0 3px 12px #c5a26733)}
.new-chat{background:linear-gradient(115deg,#386acb,#354f96);border:1px solid #88a5e943;box-shadow:0 7px 20px #050f292b}
.plan-card{background:radial-gradient(ellipse at top left,#c5a26720,transparent 80%);border-color:#c5a26750}
.topbar{background:color-mix(in srgb,var(--surface) 85%,transparent);backdrop-filter:blur(16px)}
.demo-badge{padding:4px 10px;border:1px solid #b28e543b;border-radius:30px;background:#b28e540a}
.welcome{position:relative}
.welcome-eyebrow{color:var(--gold);font-size:12px}
.hero-emblem{width:124px;height:124px;background:radial-gradient(circle,#d3dfff 0,#eaf0ff60 50%,transparent 72%);margin-top:22px;margin-bottom:20px}
.emblem-ring{border-color:#bb965969;transform:rotate(45deg);border-radius:28px}
.hero-emblem:after{inset:12px;border-radius:23px;transform:rotate(45deg);border-color:#4768a92e}
.hero-emblem:before{content:"";position:absolute;inset:-12px;border:1px solid #bb96591d;border-radius:38px;transform:rotate(45deg)}
.hero-emblem img{filter:drop-shadow(0 8px 10px #253d8033)}
h1{font-weight:750;letter-spacing:-1px}
h1 span{background:linear-gradient(100deg,#9b7339,#4365b4 72%);background-clip:text;-webkit-background-clip:text;color:transparent}
.welcome-description{color:var(--muted);font-size:14px}
.suggestions{gap:15px}
.suggestions button{overflow:hidden;border-radius:18px;padding:21px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--pale) 38%,var(--surface)));box-shadow:0 6px 20px #24385905}
.suggestions button:before{content:"";position:absolute;width:100px;height:100px;top:-55px;left:-40px;border:1px solid #6b87ca23;border-radius:24px;transform:rotate(35deg);pointer-events:none}
.suggestions button:nth-child(2):before{border-color:#b28e5440}
.suggestions button:nth-child(3):before{border-color:#8e77c738}
.suggestions button:hover{border-color:#879dcc;box-shadow:0 12px 28px #24385913;transform:translateY(-4px)}
.suggestion-icon{width:40px;height:40px;border-radius:13px;box-shadow:inset 0 0 0 1px #ffffff55}
.suggestion-icon svg{width:21px;height:21px}
.suggestions strong{font-size:13px}
.suggestions button>span:not(.suggestion-icon){font-size:11px}
.welcome-caption{color:var(--muted)}
.composer{border-radius:22px;border-color:#aebcda;box-shadow:0 12px 40px #2438590d;background:var(--surface)}
.composer:focus-within{border-color:#6d88ca;box-shadow:0 0 0 4px #4267d50b,0 12px 40px #24385912}
.composer textarea{font-size:14px}
.composer-footer{border-top:1px solid var(--border);padding-top:11px}
.model-chip{background:var(--field);border:1px solid var(--border);padding:4px 9px;border-radius:20px;flex-wrap:wrap}
.send-button{width:40px;height:40px;border-radius:13px;background:linear-gradient(145deg,#527ade,#34539b);box-shadow:0 4px 10px #34539b20}
.send-button:disabled{box-shadow:none}
.composer-note{color:var(--muted);font-size:10px}
.message-list{gap:23px}
.message-avatar{width:40px;height:40px;border-radius:14px;box-shadow:0 4px 13px #2438590a}
.message-label{gap:12px}
.message-label small{padding:2px 8px;border-radius:20px;background:var(--pale)}
.message-text{border-radius:18px 4px 18px 18px;box-shadow:0 4px 18px #24385906;font-size:15px}
.message.user .message-text{background:linear-gradient(120deg,#eaf0ff,#e1e9fb);border:1px solid #d6e0f5}
.message:not(.user) .message-text{border-inline-start:3px solid #bfa06a}
.message-actions button{border-radius:7px;padding:5px 9px}
.message-actions button:hover{background:var(--pale);color:var(--blue)}
.has-messages .composer-area{background:linear-gradient(0deg,var(--bg) 85%,transparent)}
.dialog{background:radial-gradient(ellipse at top right,#537bd510,transparent 60%),var(--surface)}
html[data-theme="dark"]{--bg:#101a2c;--surface:#1a2940;--muted:#aab8ce}
html[data-theme="dark"] .main-shell{background:radial-gradient(ellipse at 10% 0,#2d49763d,transparent 60%),var(--bg)}
html[data-theme="dark"] h1 span{background-image:linear-gradient(100deg,#e3c48f,#9fb8ff 72%)}
html[data-theme="dark"] .hero-emblem{background:radial-gradient(circle,#537cda30,transparent 70%)}
html[data-theme="dark"] .message.user .message-text{background:linear-gradient(120deg,#263c60,#223452);border-color:#3a5075}
html[data-theme="dark"] .composer{border-color:#465d80}
@media(max-height:820px) and (min-width:901px){.hero-emblem{width:90px;height:90px;margin:17px auto}.suggestions button{padding:15px}.suggestion-icon{width:33px;height:33px}.welcome-description{font-size:13px}}
@media(max-width:560px){.hero-emblem{width:96px;height:96px;margin:23px auto}h1{font-size:34px}.suggestions button{padding:13px 62px 13px 28px}.suggestion-icon{width:34px;height:34px;top:16px}.suggestions strong{font-size:12px}.suggestions button>span:not(.suggestion-icon){font-size:10px}.composer{padding:14px;border-radius:18px}.composer textarea{font-size:13px}.model-chip{font-size:11px;padding:3px 6px;gap:4px}.model-label{font-size:9px}.composer-footer{gap:7px}.message-avatar{width:30px;height:30px}.message-text{font-size:14px}.demo-badge{padding:3px 6px}}


/* Original rosette and architectural lines, inspired by Iranian heritage. */
.main-shell{position:relative;isolation:isolate}
.main-shell:before{content:"";position:absolute;inset:82px 0 0;z-index:-1;pointer-events:none;background:url('/assets/heritage-rosette.svg') left -150px top 70px/360px no-repeat;opacity:.12}
.topbar{border-bottom:1px solid color-mix(in srgb,var(--gold) 30%,var(--border))}
.sidebar:after{content:"";height:9px;position:absolute;inset:0 0 auto;background:repeating-linear-gradient(90deg,transparent 0 18px,#c7a26766 18px 20px,transparent 20px 24px);border-block:1px solid #c7a26744;pointer-events:none}
.heritage-divider{display:flex;align-items:center;justify-content:center;gap:18px;margin:0 auto 26px;width:min(100%,380px);color:var(--gold)}
.heritage-divider:before,.heritage-divider:after{content:"";height:1px;flex:1;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.45}
.heritage-divider img{width:34px;height:34px}
.chat-heading{display:none;align-items:center;gap:12px;max-width:820px;width:100%;margin:0 auto 24px;padding-bottom:15px;border-bottom:1px solid var(--border)}
.has-messages .chat-heading{display:flex}
.chat-heading img{width:38px;height:38px;opacity:.8}
.chat-heading strong{display:block;font-size:13px;font-weight:600}
.chat-heading small{font-size:10px;color:var(--muted)}
.message.assistant .message-avatar{background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--gold) 14%,var(--surface)));border-color:color-mix(in srgb,var(--gold) 45%,var(--border))}
.message.assistant .message-text{padding:22px 24px;border-radius:5px 20px 20px 20px;box-shadow:0 8px 28px #182d4c08}
.message.user{margin-inline-start:38px}
.message.user .message-text{border-radius:20px 5px 20px 20px}
.retrieved-sources{display:block;margin-top:10px;font-size:11px;color:var(--muted)}
.retrieved-sources summary{cursor:pointer;width:fit-content;padding:5px 10px;border:1px solid var(--border);border-radius:20px;background:var(--surface)}
.retrieved-sources summary:hover{color:var(--text);border-color:var(--gold)}
.retrieved-sources summary:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.source-links{display:flex;flex-wrap:wrap;gap:8px;padding:12px 3px}
.source-links a{color:var(--blue);text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.source-links a+a:before{content:"·";display:inline-block;margin-inline-end:8px;color:var(--gold)}
.composer{border-top:2px solid color-mix(in srgb,var(--gold) 65%,var(--border))}
@media(max-width:560px){.main-shell:before{background-size:230px;background-position:left -130px top 100px}.message.user{margin-inline-start:12px}.message.assistant .message-text{padding:16px}.chat-heading{margin-bottom:18px}.heritage-divider{margin-bottom:18px}}

.heritage-prompts{max-width:780px;margin:26px auto;text-align:start}
.heritage-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;color:var(--gold);font-size:12px}
.heritage-title small{color:var(--muted);font-size:10px}
.heritage-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.heritage-cards button{position:relative;text-align:start;border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border));background:linear-gradient(125deg,color-mix(in srgb,var(--gold) 8%,var(--surface)),var(--surface));color:var(--text);border-radius:7px 7px 18px 18px;padding:16px;transition:border-color .2s,transform .2s}
.heritage-cards button:hover{border-color:var(--gold);transform:translateY(-2px)}
.heritage-cards small,.heritage-cards strong,.heritage-cards button>span:last-child{display:block}
.heritage-cards small{font-size:10px;color:var(--gold)}
.heritage-cards strong{font-size:20px;margin:5px 0;font-weight:600}
.heritage-cards button>span:last-child{font-size:10px;color:var(--muted)}
.heritage-glyph{position:absolute;inset:14px auto auto 14px;font-size:27px;color:var(--gold);opacity:.55}
@media(max-width:560px){.heritage-cards{gap:7px}.heritage-cards button{padding:12px 9px}.heritage-glyph{display:none}.heritage-cards strong{font-size:18px}.heritage-cards small{font-size:9px}.heritage-cards button>span:last-child{font-size:9px}}

.heritage-cards{grid-template-columns:repeat(4,1fr)}
@media(max-width:700px){.heritage-cards{grid-template-columns:repeat(2,1fr)}}

.source-item{border:1px solid var(--border);border-radius:14px;padding:16px;margin:12px 0;overflow-wrap:anywhere}.source-item>small{display:block;color:var(--gold);font-size:11px}.source-actions{display:flex;gap:8px}.source-url{font-size:11px;color:var(--muted)}.source-preview{white-space:pre-wrap;max-height:240px;overflow:auto;font-size:12px}.source-item p{font-size:12px}#source-file{font-size:12px}
/* Configurable Iranian companions and manual membership management. */
.companion-section{margin:18px 0 30px;text-align:right}
.companion-section h2{font-size:1.35rem;margin:10px 0}
.companion-section>p{font-size:.85rem;opacity:.75;line-height:1.9}
.companion-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}
.companion-card{font:inherit;color:inherit;background:linear-gradient(145deg,#143647,#172737);border:1px solid #aa87444d;border-radius:20px;padding:20px 12px;display:flex;flex-direction:column;align-items:center;gap:12px;cursor:pointer;transition:transform .2s,border-color .2s;color:#f3e8d3}
.companion-card:hover{transform:translateY(-3px);border-color:#dbb565}
.companion-card[aria-pressed=true]{outline:2px solid #dbb565;outline-offset:2px}
.companion-card small{font-size:.73rem;line-height:1.8;opacity:.8}
.companion-mark{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;font-size:2.1rem;background:#d8b4661a;border:1px solid #d8b46666;box-shadow:0 0 24px #d8b46612}
.management-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}
.management-dialog form{display:grid;gap:10px;margin:18px 0}
.management-dialog input,.management-dialog textarea,.management-dialog select{font:inherit;width:100%;padding:12px;border:1px solid #8886;border-radius:10px;background:transparent;color:inherit;box-sizing:border-box}
.management-dialog select option{color:#142536;background:#fff}
.management-dialog .source-item button{margin:6px}
#open-management{margin:8px 0;max-width:100%;font-size:.8rem}
@media(max-width:700px){.companion-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.management-dialog{max-width:94vw}.companion-card{padding:14px 8px}}
@media(prefers-reduced-motion:reduce){.companion-card{transition:none}.companion-card:hover{transform:none}}
/* Evaluation answers are plain text and wrap even when a model returns long lines. */
.evaluation-report { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-height: 55vh; overflow-y: auto; }

/* Keep every navigation section reachable when admin tools exceed viewport height. */
.sidebar{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8299b8 transparent}
.sidebar>*{flex-shrink:0}
.sidebar .history-list{flex:1 0 140px;min-height:140px;max-height:35dvh;overflow-y:auto;overflow-x:hidden}
.sidebar .nav-item{white-space:normal;overflow-wrap:anywhere;min-width:0;line-height:1.8}
.sidebar .sidebar-bottom{flex-shrink:0}
.receipt-preview{display:block;width:100%;max-height:65vh;object-fit:contain;background:var(--field);border:1px solid var(--border);border-radius:12px}
.management-dialog input[type=checkbox]{width:auto;margin-inline:8px;vertical-align:middle}
@media(max-height:700px){.sidebar .brand{margin-bottom:18px}.sidebar .nav-section-label{margin-top:16px}.sidebar .history-heading{margin-top:18px}}
.image-preview{display:flex;align-items:center;gap:12px;padding:12px}.image-preview[hidden]{display:none}.image-preview img{max-width:180px;max-height:140px;object-fit:contain;border-radius:12px}.image-attach{padding:8px 12px;border-radius:12px}.composer+small{display:block;margin:8px 0;color:var(--muted);line-height:1.8}
.image-attach,.image-preview button{border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;cursor:pointer;border-radius:12px;padding:8px 12px}.image-attach:disabled,.image-preview button:disabled{opacity:.5;cursor:default}
.pdf-dialog{max-height:90vh;overflow-y:auto}.pdf-dialog section{display:grid;gap:12px}.pdf-dialog textarea{width:100%;min-height:180px;line-height:1.8}.pdf-page-preview{display:block;max-width:100%;max-height:480px;object-fit:contain}.pdf-page-preview[hidden]{display:none}.pdf-dialog select,.pdf-dialog input{max-width:100%}.send-controls{flex-wrap:wrap}
.pdf-dialog select{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:10px;padding:10px;font:inherit}.pdf-dialog [role=status]{margin:12px 0}

.craft-studio{max-height:90dvh;overflow:auto}.craft-studio form{display:grid;gap:12px}.craft-field{display:grid;gap:6px}.craft-field input,.craft-field select{width:100%;box-sizing:border-box;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:10px;padding:10px;font:inherit}.craft-studio p{line-height:1.9}

.composer-tools{position:relative;flex-shrink:0}
.composer-tools-toggle{list-style:none;display:grid;place-items:center;width:42px;height:42px;box-sizing:border-box;border:1px solid var(--border);border-radius:50%;background:var(--surface);color:var(--text);font-size:27px;cursor:pointer;line-height:1}
.composer-tools-toggle::-webkit-details-marker{display:none}
.composer-tools-toggle:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.composer-tools-list{position:absolute;bottom:calc(100% + 10px);inset-inline-end:0;width:220px;max-width:calc(100vw - 44px);max-height:55dvh;overflow:auto;padding:8px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 12px 32px #0003;z-index:40;display:grid;gap:5px}
.composer-tools-list .image-attach{display:block;width:100%;text-align:start;border:0;padding:12px;border-radius:10px}
.composer-tools-list .image-attach:hover:not(:disabled){background:var(--field)}
.composer-tools:not([open]) .composer-tools-list{display:none}
.voice-status:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--line);border-radius:12px;margin-bottom:8px;flex-wrap:wrap}
dialog[aria-label="صدای آریو"] select{width:100%;padding:10px;margin-bottom:12px}
dialog[aria-label="صدای آریو"]>button{margin:6px 0;width:100%}
