.ai-chat{--ai-gold:#f7cb62;--ai-gold-deep:#bd8425;--ai-navy:#142b55;--ai-blue:#2f4fc4;position:relative;isolation:isolate;display:flex;flex-direction:column;margin:0 0 64px;border:1px solid var(--accent-border,var(--line-strong));border-radius:28px;background:var(--surface-100);box-shadow:0 50px 110px -60px var(--shadow-deep,rgba(10,20,40,.55)),0 2px 6px rgba(10,20,40,.04);overflow:hidden;overflow:clip;color:var(--ink);scroll-margin-top:100px}
.ai-chat *{box-sizing:border-box}
/* Full-screen chat: spans the viewport width (minus a gutter) and fills the height under the sticky site header.
   --ai-page-w and --ai-header are measured by ai-assistant.js; the fallbacks keep it usable before that runs. */
.ax-site-content.ai-fit-host{padding-top:12px}
.ai-chat{--ai-gutter:20px;--ai-read:880px;width:calc(var(--ai-page-w,100%) - 2*var(--ai-gutter));margin-inline:calc((100% - var(--ai-page-w,100%))/2 + var(--ai-gutter));height:calc(100vh - var(--ai-header,72px) - 32px);height:calc(100dvh - var(--ai-header,72px) - 32px);min-height:520px;border-radius:24px}
.ai-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Header: deep navy panel with a faint circuit pattern, brand glows and the AI capabilities. */
.ai-head{position:relative;isolation:isolate;padding:24px clamp(18px,3vw,34px) 20px;color:#fff;border-bottom:1px solid rgba(247,203,98,.28);
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M0 34h34l12 12h34M80 46v34l12 12h48M22 140v-34l12-12h24M104 0v22L92 34H70M140 64h-22l-12 12v24'/%3E%3Cg fill='%23ffffff' fill-opacity='.2' stroke='none'%3E%3Ccircle cx='80' cy='46' r='2.2'/%3E%3Ccircle cx='34' cy='94' r='2.2'/%3E%3Ccircle cx='70' cy='34' r='2.2'/%3E%3Ccircle cx='118' cy='64' r='2.2'/%3E%3C/g%3E%3C/svg%3E"),
 radial-gradient(110% 150% at 100% 0%,rgba(247,203,98,.24),transparent 55%),radial-gradient(80% 140% at 0% 100%,rgba(61,111,240,.38),transparent 60%),linear-gradient(135deg,#0a152c,#132a57 55%,#1b3a8a)}
.ai-head-row{display:flex;align-items:center;gap:16px}
.ai-head-copy{flex:1;min-width:0}
.ai-eyebrow{display:inline-flex;align-items:center;gap:7px;margin:0 0 4px!important;font-size:11.5px!important;line-height:1.3!important;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ai-gold)!important}
.ai-eyebrow svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.ai-chat .ai-head h1{margin:0;color:#fff;font-family:'Inter Tight',Inter,sans-serif;font-size:clamp(21px,2.3vw,27px)!important;line-height:1.25!important;font-weight:700;letter-spacing:-.02em}
.ai-status{display:flex;align-items:center;gap:8px;margin:6px 0 0!important;font-size:12.5px!important;line-height:1.4!important;color:rgba(255,255,255,.72)!important}
.ai-status i{flex-shrink:0;width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.22);animation:ai-pulse 2.4s ease-out infinite}
.ai-new{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border:1px solid rgba(255,255,255,.22);border-radius:9999px;background:rgba(255,255,255,.08);color:#fff;font-family:inherit;font-weight:600;font-size:13px;line-height:1;cursor:pointer;transition:background .2s,border-color .2s;white-space:nowrap;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.ai-new:hover{background:rgba(255,255,255,.16);border-color:var(--ai-gold)}
.ai-new svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ai-chat.is-empty .ai-new{visibility:hidden}
.ai-features{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 0;padding:0;list-style:none}
.ai-features li{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border:1px solid rgba(255,255,255,.14);border-radius:9999px;background:rgba(255,255,255,.07);color:rgba(255,255,255,.9);font-size:12.5px;font-weight:500;white-space:nowrap}
.ai-features svg{width:15px;height:15px;flex-shrink:0;fill:none;stroke:var(--ai-gold);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Brand avatar (3D Aurenex X, drawn by ai-assistant.js). */
.ai-avatar{display:inline-flex;flex-shrink:0;width:34px;height:34px;border-radius:26%;box-shadow:0 1px 0 rgba(255,255,255,.7) inset,0 2px 4px rgba(20,43,85,.14),0 10px 20px -10px rgba(20,43,85,.6)}
.ai-avatar svg{width:100%;height:100%;display:block}
.ai-avatar--head{width:56px;height:56px;box-shadow:0 0 0 4px rgba(255,255,255,.08),0 14px 30px -12px rgba(0,0,0,.6)}
.ai-avatar--hero{position:relative;z-index:1;width:92px;height:92px;box-shadow:0 2px 6px rgba(20,43,85,.12),0 28px 54px -18px rgba(20,43,85,.7),0 0 0 8px rgba(247,203,98,.12);animation:ai-float 5s ease-in-out infinite}

/* Conversation area with a soft dot grid. */
.ai-head{flex-shrink:0}
.ai-body{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}
.ai-body::before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background-image:radial-gradient(circle at 1px 1px,var(--line-strong,rgba(20,43,85,.12)) 1px,transparent 0);background-size:22px 22px;opacity:.55;-webkit-mask-image:radial-gradient(ellipse 70% 60% at 50% 30%,#000,transparent 80%);mask-image:radial-gradient(ellipse 70% 60% at 50% 30%,#000,transparent 80%)}
.ai-welcome,.ai-log{position:relative;z-index:1}
.ai-welcome{display:none;flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;flex-direction:column;align-items:center;text-align:center;padding:20px clamp(16px,4vw,48px) 18px}
/* Centred when it fits, scrollable from the top when it doesn't (plain justify-content:center would clip the top). */
.ai-welcome>*{flex-shrink:0}
.ai-welcome>:first-child{margin-top:auto}
.ai-welcome>:last-child{margin-bottom:auto}
.ai-chat.is-empty .ai-welcome{display:flex}
.ai-chat.is-empty .ai-log{display:none}
.ai-orbit{position:relative;display:grid;place-items:center;width:230px;height:170px}
.ai-orbit::before{content:'';position:absolute;inset:-10px 10px;border-radius:50%;background:radial-gradient(circle,rgba(247,203,98,.26),rgba(61,91,199,.12) 45%,transparent 70%)}
.ai-orbit-ring{position:absolute;width:156px;height:156px;border-radius:50%;border:1px dashed rgba(189,132,37,.45);animation:ai-spin 30s linear infinite}
.ai-orbit-ring::after{content:'';position:absolute;top:-4px;left:50%;width:8px;height:8px;margin-left:-4px;border-radius:50%;background:var(--ai-gold);box-shadow:0 0 12px var(--ai-gold)}
.ai-tech{position:absolute;z-index:2;display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:var(--bg);border:1px solid var(--line-strong);box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 12px 24px -12px rgba(20,43,85,.55);animation:ai-float 6s ease-in-out infinite}
.ai-tech svg{width:20px;height:20px;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ai-tech--a{top:6px;left:8px;animation-delay:-1s}.ai-tech--a svg,.ai-tech--c svg{stroke:var(--ai-blue)}
.ai-tech--b{top:16px;right:4px;animation-delay:-2.5s}.ai-tech--b svg,.ai-tech--d svg{stroke:var(--ai-gold-deep)}
.ai-tech--c{bottom:10px;left:18px;animation-delay:-4s}
.ai-tech--d{bottom:2px;right:22px;animation-delay:-5.5s}
.ai-chat .ai-welcome h2{margin:16px 0 0;font-family:'Inter Tight',Inter,sans-serif;font-size:clamp(22px,2.6vw,30px)!important;line-height:1.3!important;letter-spacing:-.02em}
.ai-welcome p{margin:10px 0 0!important;max-width:560px;font-size:14.5px!important;line-height:1.8!important;color:var(--ink-muted)}
.ai-suggestions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;max-width:660px;margin-top:28px}
.ai-suggest{display:flex;align-items:center;gap:12px;min-height:56px;padding:12px 16px;border:1px solid var(--line-strong);border-radius:16px;background:var(--bg);color:var(--ink);font-family:inherit;font-weight:500;font-size:13.5px;line-height:1.45;text-align:start;cursor:pointer;box-shadow:0 1px 2px rgba(10,20,40,.04);transition:border-color .2s,transform .2s,box-shadow .2s}
.ai-suggest:hover{border-color:var(--ai-gold);transform:translateY(-2px);box-shadow:0 14px 28px -18px rgba(189,132,37,.75)}
.ai-suggest svg{flex-shrink:0;width:32px;height:32px;padding:7px;border-radius:10px;background:rgba(247,203,98,.14);fill:none;stroke:var(--brand-label,var(--ai-gold-deep));stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.ai-log{flex:1;min-height:0;display:flex;flex-direction:column;gap:22px;overflow-y:auto;overscroll-behavior:contain;padding:28px max(14px,calc((100% - var(--ai-read))/2));scroll-behavior:smooth}
.ai-msg{display:flex;gap:12px;max-width:100%;animation:ai-in .25s ease-out}
.ai-msg--user{justify-content:flex-end}
.ai-msg--user .ai-msg-body{max-width:min(78%,620px)}
.ai-user-text{padding:11px 16px;border-radius:20px;border-end-end-radius:6px;background:linear-gradient(135deg,#2f5fe8,#173f9e);color:#fff;font-size:14.5px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 12px 24px -16px rgba(23,63,158,.8)}
.ai-msg--assistant .ai-msg-body{flex:1;min-width:0;max-width:780px;padding:12px 16px 10px;border:1px solid var(--line);border-radius:6px 20px 20px 20px;background:var(--bg);box-shadow:0 10px 26px -22px rgba(10,20,40,.6)}
html[dir=rtl] .ai-msg--assistant .ai-msg-body{border-radius:20px 6px 20px 20px}
.ai-msg-name{display:flex;align-items:center;gap:6px;margin:0 0 4px;font-size:12px;font-weight:700;letter-spacing:.02em;color:var(--brand-label,var(--ai-gold-deep))}
.ai-md{font-size:14.5px;line-height:1.85;color:var(--ink);overflow-wrap:anywhere}
.ai-md p{margin:0 0 10px!important;font-size:inherit!important;line-height:inherit!important;color:inherit!important}
.ai-md p:last-child{margin-bottom:0!important}
.ai-md ul,.ai-md ol{margin:4px 0 12px;padding-inline-start:22px}
.ai-md li{margin:4px 0}
.ai-md li::marker{color:var(--brand-label,var(--ai-gold-deep))}
.ai-md strong{font-weight:700;color:var(--ink)}
.ai-md a{color:var(--accent-blue);text-decoration:underline;text-underline-offset:3px;font-weight:600}
.ai-md code{padding:1px 6px;border-radius:6px;background:var(--surface-200,rgba(0,0,0,.06));font-size:.92em;direction:ltr;unicode-bidi:isolate}
.ai-md .ai-md-h{font-weight:700;margin-top:6px!important}
.ai-md .ai-md-row{display:flex;flex-wrap:wrap;gap:6px 14px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;margin:0 0 6px!important}
.ai-msg--error .ai-msg-body{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.05)}
.ai-msg--error .ai-md{color:var(--ink-muted)}
.ai-msg-tools{display:flex;gap:6px;margin-top:6px;min-height:0}
.ai-msg-tools:empty{display:none}
.ai-tool{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid transparent;border-radius:9px;background:none;color:var(--ink-subtle);font-family:inherit;font-weight:500;font-size:12px;line-height:1;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.ai-tool:hover{background:var(--surface-100);border-color:var(--line);color:var(--ink)}
.ai-tool svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ai-msg--error .ai-tool{border-color:var(--line-strong);color:var(--ink)}
.ai-typing{display:inline-flex;align-items:center;gap:5px;height:28px}
.ai-typing i{width:7px;height:7px;border-radius:50%;background:var(--brand-label,var(--ai-gold-deep));animation:ai-dot 1.2s infinite ease-in-out}
.ai-typing i:nth-child(3){animation-delay:.15s}.ai-typing i:nth-child(4){animation-delay:.3s}
.ai-caret{display:inline-block;width:8px;height:16px;margin-inline-start:2px;vertical-align:-3px;border-radius:2px;background:var(--brand-label,var(--ai-gold-deep));animation:ai-blink 1s steps(2) infinite}

/* Composer */
.ai-composer{position:relative;z-index:1;flex-shrink:0;display:flex;align-items:flex-end;gap:8px;width:min(var(--ai-read),calc(100% - 2*clamp(12px,3vw,30px)));margin:0 auto;padding:8px;border:1px solid var(--line-strong);border-radius:24px;background:var(--bg);box-shadow:0 20px 44px -30px rgba(10,20,40,.6);transition:border-color .2s,box-shadow .2s}
.ai-composer:focus-within{border-color:var(--ai-gold-deep);box-shadow:0 0 0 4px rgba(247,203,98,.18),0 20px 44px -30px rgba(10,20,40,.6)}
.ai-composer-icon{flex-shrink:0;display:grid;place-items:center;width:38px;height:42px;color:var(--ai-gold-deep)}
.ai-composer-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.ai-composer textarea{flex:1;min-height:42px;max-height:180px;padding:10px 0;border:0;outline:0;resize:none;background:transparent;color:var(--ink);font-family:inherit;font-weight:400;font-size:15px;line-height:1.55}
.ai-composer textarea::placeholder{color:var(--ink-subtle)}
.ai-send{flex-shrink:0;display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:14px;background:linear-gradient(135deg,var(--ai-gold),var(--ai-gold-deep));color:#14213d;cursor:pointer;box-shadow:0 10px 20px -10px rgba(189,132,37,.9);transition:opacity .2s,transform .2s}
.ai-send:hover:not(:disabled){transform:translateY(-1px)}
.ai-send:disabled{opacity:.35;cursor:default;box-shadow:none}
.ai-send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.ai-send .ai-icon-stop{display:none;fill:currentColor;stroke:none}
.ai-chat.is-busy .ai-send{background:var(--ink);color:var(--bg)}
.ai-chat.is-busy .ai-icon-send{display:none}
.ai-chat.is-busy .ai-icon-stop{display:block}
.ai-disclaimer{position:relative;z-index:1;flex-shrink:0;margin:10px clamp(12px,3vw,30px) 14px!important;text-align:center;font-size:11.5px!important;line-height:1.6!important;color:var(--ink-subtle)}

.ai-faq-title{margin:0 0 18px;font-family:'Inter Tight',Inter,sans-serif;font-size:clamp(22px,2.4vw,28px)}

@keyframes ai-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes ai-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
@keyframes ai-blink{to{opacity:0}}
@keyframes ai-spin{to{transform:rotate(360deg)}}
@keyframes ai-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes ai-pulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)}70%,100%{box-shadow:0 0 0 7px rgba(34,197,94,0)}}
@media(prefers-reduced-motion:reduce){.ai-msg,.ai-avatar--hero,.ai-orbit-ring,.ai-tech,.ai-status i,.ai-typing i,.ai-caret{animation:none}.ai-log{scroll-behavior:auto}}

/* Shorter screens: tighter header and welcome so the whole start screen fits without scrolling. */
@media(max-height:880px){
 .ai-head{padding-top:16px;padding-bottom:14px}
 .ai-features{margin-top:12px}
 .ai-orbit{width:200px;height:130px}
 .ai-orbit-ring{width:120px;height:120px}
 .ai-avatar--hero{width:72px;height:72px}
 .ai-tech{width:34px;height:34px;border-radius:11px}
 .ai-tech svg{width:17px;height:17px}
 .ai-chat .ai-welcome h2{margin-top:8px;font-size:clamp(20px,2.2vw,24px)!important}
 .ai-welcome p{margin-top:6px!important;line-height:1.65!important}
 .ai-suggestions{margin-top:16px}
 .ai-suggest{min-height:48px;padding:8px 14px}
}
@media(max-height:720px){.ai-welcome p{display:none}.ai-orbit{height:110px}.ai-orbit-ring{width:104px;height:104px}.ai-avatar--hero{width:62px;height:62px}.ai-tech{display:none}}
@media(max-width:700px){
 .ax-site-content.ai-fit-host{padding-top:8px}
 .ai-chat{--ai-gutter:8px;margin-bottom:40px;border-radius:20px;height:calc(100vh - var(--ai-header,64px) - 16px);height:calc(100dvh - var(--ai-header,64px) - 16px);min-height:460px}
 .ai-chat:not(.is-empty) .ai-features{display:none}
 .ai-head{padding:16px 14px 14px}
 .ai-head-row{gap:12px}
 .ai-avatar--head{width:46px;height:46px}
 .ai-chat .ai-head h1{font-size:19px!important}
 .ai-eyebrow{font-size:10.5px!important}
 .ai-status{font-size:11.5px!important}
 .ai-new{width:40px;padding:0;justify-content:center}
 .ai-new span{display:none}
 .ai-features{gap:6px;margin-top:14px}
 .ai-features li{height:28px;padding:0 10px;font-size:11.5px}
 .ai-log{padding:16px 10px;gap:16px}
 .ai-welcome{padding:14px 12px}
 .ai-welcome p{display:none}
 .ai-orbit{width:190px;height:118px}
 .ai-orbit-ring{width:108px;height:108px}
 .ai-avatar--hero{width:64px;height:64px}
 .ai-tech{width:32px;height:32px}
 .ai-suggestions{margin-top:14px}
 .ai-suggestions{grid-template-columns:1fr;gap:8px;margin-top:22px}
 .ai-suggest{min-height:50px;padding:9px 12px;font-size:13px}
 .ai-suggest svg{width:30px;height:30px}
 .ai-msg{gap:8px}
 .ai-msg .ai-avatar{width:28px;height:28px}
 .ai-msg--user .ai-msg-body{max-width:86%}
 .ai-msg--assistant .ai-msg-body{padding:10px 12px 8px}
 .ai-md,.ai-user-text{font-size:14px}
 .ai-composer{margin:0 10px;border-radius:20px;padding:6px}
 .ai-composer-icon{width:30px}
 .ai-composer textarea{font-size:16px}
 .ai-send{width:40px;height:40px}
}
@media(max-width:380px){.ai-chat .ai-head h1{font-size:17px!important}.ai-status{font-size:11px!important}.ai-features li:nth-child(4){display:none}}
