:root { --intel-ink:#0b2537; --intel-muted:#587082; --intel-teal:#008f95; --intel-deep:#003f50; --intel-line:#d5e8e9; }
* { box-sizing:border-box; }
body.intelligence-page { min-height:100vh; margin:0; padding:16px 16px 112px; color:var(--intel-ink); background:linear-gradient(180deg,#eaf8f7 0%,#fbfdfd 52%,#edf6f5 100%); font-family:var(--font-sans,Inter,system-ui,sans-serif); }
.intelligence-shell { width:min(100%,900px); display:grid; gap:14px; margin:0 auto; }
.intelligence-hero { position:relative; min-height:112px; display:flex; align-items:center; justify-content:space-between; gap:22px; padding:22px 30px; overflow:hidden; border-radius:24px; color:#fff; background:radial-gradient(circle at 84% 8%,rgba(99,224,218,.36),transparent 29%),linear-gradient(135deg,#003b4d,#007f85 60%,#0eb6b7); box-shadow:0 16px 36px rgba(0,71,78,.18); }
.intelligence-hero::after { position:absolute; width:190px; height:190px; right:-72px; bottom:-104px; border:1px solid rgba(255,255,255,.2); border-radius:50%; content:""; }
.intelligence-hero-copy { position:relative; z-index:1; min-width:0; }
.intelligence-hero h1 { margin:0; font-size:clamp(32px,6.5vw,48px); line-height:1; letter-spacing:-.045em; }
.intelligence-chat { min-height:max(430px,calc(100dvh - 254px)); display:flex; flex-direction:column; padding:22px; border:1px solid rgba(94,181,184,.34); border-radius:24px; background:rgba(255,255,255,.96); box-shadow:0 14px 34px rgba(0,62,69,.08); }
.intelligence-chat-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.intelligence-chat-heading p { margin:0 0 5px; color:var(--intel-teal); font-size:11px; font-weight:900; letter-spacing:.16em; }
.intelligence-chat-heading h2 { margin:0; font-size:clamp(23px,5vw,31px); letter-spacing:-.035em; }
.intelligence-chat-heading button { min-height:38px; padding:0 13px; border:1px solid #c6e2e3; border-radius:12px; color:#087c80; background:#f6fbfb; font:inherit; font-size:12px; font-weight:850; cursor:pointer; }
.intelligence-messages { min-height:120px; display:grid; align-content:start; gap:15px; flex:1 1 auto; margin:20px 0; }
.intelligence-message { display:grid; grid-template-columns:34px minmax(0,1fr); gap:9px; align-items:start; }
.intelligence-message.user { grid-template-columns:minmax(0,1fr); justify-items:end; }
.intelligence-message-avatar { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; color:#fff; background:linear-gradient(145deg,#008f95,#0db6b5); font-size:13px; font-weight:950; box-shadow:0 6px 14px rgba(0,143,149,.17); }
.intelligence-message-copy { max-width:min(100%,680px); padding:13px 15px; border:1px solid #d9e9ea; border-radius:6px 17px 17px 17px; color:#17384b; background:#f7fbfb; font-size:15px; font-weight:600; line-height:1.58; white-space:pre-wrap; overflow-wrap:anywhere; }
.intelligence-message.user .intelligence-message-copy { border-color:#008f95; border-radius:17px 17px 6px 17px; color:#fff; background:linear-gradient(135deg,#007d84,#0ba6a8); }
.intelligence-message.pending .intelligence-message-copy { display:flex; align-items:center; gap:5px; min-height:48px; }
.intelligence-message.pending i { width:7px; height:7px; border-radius:50%; background:#16a5a8; animation:intelligence-pulse 1s ease-in-out infinite; }
.intelligence-message.pending i:nth-child(2) { animation-delay:.14s; }
.intelligence-message.pending i:nth-child(3) { animation-delay:.28s; }
@keyframes intelligence-pulse { 0%,70%,100% { opacity:.35; transform:translateY(0); } 35% { opacity:1; transform:translateY(-3px); } }
.intelligence-composer { position:sticky; bottom:90px; z-index:2; display:grid; gap:8px; flex:0 0 auto; margin-top:auto; padding:13px; border:1px solid #c8e1e2; border-radius:20px; background:rgba(255,255,255,.94); box-shadow:0 14px 32px rgba(0,63,70,.13); backdrop-filter:blur(12px); }
.intelligence-composer > label { padding:0 3px; color:#536d7e; font-size:11px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.intelligence-input-wrap { display:grid; grid-template-columns:minmax(0,1fr) 48px; gap:9px; align-items:end; }
.intelligence-input-wrap textarea { width:100%; min-height:48px; max-height:180px; resize:none; padding:13px 14px; border:1.5px solid #d1e5e6; border-radius:14px; outline:0; color:var(--intel-ink); background:#fbfdfd; font:inherit; font-size:16px; font-weight:650; line-height:1.4; }
.intelligence-input-wrap textarea:focus { border-color:#0aa7aa; box-shadow:0 0 0 4px rgba(10,167,170,.09); }
.intelligence-input-wrap button { width:48px; height:48px; display:grid; place-items:center; padding:0; border:0; border-radius:14px; color:#fff; background:linear-gradient(145deg,#008f95,#10b8b8); box-shadow:0 8px 17px rgba(0,143,149,.24); cursor:pointer; }
.intelligence-input-wrap button svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.intelligence-input-wrap button:disabled,.intelligence-input-wrap textarea:disabled { cursor:not-allowed; opacity:.5; }
.intelligence-status { min-height:0; margin:0 3px; color:var(--intel-muted); font-size:12px; font-weight:700; }
.intelligence-status:empty { display:none; }
.intelligence-status.is-error { color:#b4232c; }
.intelligence-composer > small { padding:0 3px; color:#718693; font-size:10px; line-height:1.35; }
.intelligence-denied { width:min(calc(100% - 32px),620px); margin:15vh auto 0; padding:30px; border-radius:24px; background:#fff; box-shadow:0 20px 46px rgba(0,61,68,.15); text-align:center; }
.intelligence-denied > div { width:58px; height:58px; display:grid; place-items:center; margin:0 auto 14px; border-radius:18px; color:#fff; background:linear-gradient(145deg,#008f95,#10b8b8); }
.intelligence-denied svg { width:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.intelligence-denied h1 { margin:0 0 8px; }
.intelligence-denied p { margin:0 0 20px; color:var(--intel-muted); }
.intelligence-denied a { display:inline-flex; padding:12px 16px; border-radius:12px; color:#fff; background:#008f95; font-weight:850; text-decoration:none; }
@media (max-width:640px) {
  body.intelligence-page { padding:8px 8px 104px; }
  .intelligence-hero { min-height:104px; padding:20px; border-radius:21px; }
  .intelligence-chat { min-height:max(420px,calc(100dvh - 230px)); padding:17px; border-radius:21px; }
  .intelligence-message-copy { font-size:14px; }
  .intelligence-composer { bottom:83px; margin-inline:-5px; }
}
@media (max-width:430px) {
  .intelligence-hero h1 { font-size:34px; }
}
@media (prefers-reduced-motion:reduce) { .intelligence-message.pending i { animation:none; } }
