.nit-expert{position:fixed;right:24px;bottom:24px;z-index:9998;font-family:var(--nit-font-body,Arial,sans-serif)}.nit-expert__launcher{display:flex;align-items:center;gap:10px;border:0;border-radius:999px;padding:13px 18px;background:#7f1d2d;color:#fff;box-shadow:0 12px 36px #20100f38;font-weight:700;cursor:pointer}.nit-expert__launcher span:first-child,.nit-expert__mark{color:#eebd70;font-size:20px}.nit-expert__dialog{width:min(430px,calc(100vw - 32px));height:min(680px,calc(100vh - 48px));background:#fff;border:1px solid #e3d8ca;border-radius:20px;box-shadow:0 24px 70px #26161140;overflow:hidden}.nit-expert__dialog>header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;background:#331a1b;color:#fff}.nit-expert__dialog>header>div{display:flex;gap:10px;align-items:center}.nit-expert__dialog header strong,.nit-expert__dialog header small{display:block}.nit-expert__dialog header small{opacity:.75}.nit-expert__dialog header button{border:0;background:transparent;color:#fff;font-size:28px;cursor:pointer}.nit-expert__messages{height:calc(100% - 191px);overflow:auto;padding:18px;background:#faf7f2}.nit-expert__message{max-width:87%;padding:11px 13px;border-radius:14px;margin:0 0 12px;line-height:1.5}.nit-expert__message--assistant{background:#fff;border:1px solid #eadfd3}.nit-expert__message--user{margin-left:auto;background:#7f1d2d;color:#fff}.nit-expert__prompts{display:flex;gap:6px;overflow:auto;padding:8px 14px}.nit-expert__prompts button{white-space:nowrap;border:1px solid #cab9a8;background:#fff;border-radius:999px;padding:7px 10px}.nit-expert form{display:flex;gap:8px;padding:10px 14px;border-top:1px solid #eadfd3}.nit-expert textarea{flex:1;resize:none;border:1px solid #cab9a8;border-radius:10px;padding:9px}.nit-expert form button{border:0;border-radius:50%;width:42px;height:42px;background:#7f1d2d;color:#fff}.nit-expert__privacy{font-size:11px;text-align:center;color:#6f655c;margin:0 0 8px}.nit-expert__cards{display:grid;gap:10px;margin:12px 0}.nit-expert__card{display:grid;grid-template-columns:84px 1fr;background:#fff;border:1px solid #e2d6c9;border-radius:12px;overflow:hidden}.nit-expert__card img{width:84px;height:100%;object-fit:cover}.nit-expert__card>div{padding:10px}.nit-expert__card strong,.nit-expert__card small{display:block}.nit-expert__card a,.nit-expert__card button{display:inline-block;margin:7px 6px 0 0;color:#7f1d2d;background:none;border:0;padding:0;text-decoration:underline;font-weight:700;cursor:pointer}.nit-expert__sources{font-size:12px;margin:10px 0}.nit-expert__sources a{display:block;margin:5px 0}.nit-expert__feedback{display:flex;gap:4px}.nit-expert__feedback button{border:1px solid #dacdbf;background:#fff;border-radius:6px}@media(max-width:600px){.nit-expert{inset:auto 0 0}.nit-expert__launcher{margin:0 16px 16px auto}.nit-expert__dialog{width:100vw;height:100dvh;border-radius:0}.nit-expert__messages{height:calc(100% - 191px)}}@media(prefers-reduced-motion:reduce){.nit-expert *{scroll-behavior:auto!important}}
.nit-map-active .nit-expert__launcher{padding:11px 14px;box-shadow:0 8px 22px #20100f2e}.nit-map-popup-open .nit-expert__launcher{opacity:0;pointer-events:none;transform:translateY(24px)}

.nit-expert__launcher{font-size:14px;padding:11px 15px;max-width:calc(100vw - 32px)}
.nit-expert__launcher[hidden]{display:none}
.nit-expert__dialog:not([hidden]){display:flex;flex-direction:column;width:min(440px,calc(100vw - 32px));height:min(700px,calc(100dvh - 120px));max-height:calc(100dvh - 120px)}
.nit-expert__dialog>header{flex:0 0 auto;padding:14px 16px;gap:12px}.nit-expert__dialog header strong{font-size:15px;line-height:1.35}.nit-expert__dialog header small{font-size:12px}.nit-expert__dialog header button{flex:none;width:36px;height:36px}
.nit-expert__messages{flex:1 1 auto;min-height:0;height:auto;padding:14px;overscroll-behavior:contain;overflow-wrap:anywhere}.nit-expert__message{max-width:95%;font-size:14px;white-space:pre-line}
.nit-expert__prompts{flex:0 0 auto;flex-wrap:wrap;overflow:auto;padding:8px 12px;max-height:106px}.nit-expert__prompts[hidden]{display:none}.nit-expert__prompts button{white-space:normal;text-align:left;font-size:12px;padding:7px 10px}
.nit-expert form{flex:0 0 auto;align-items:flex-end;padding:10px 12px;margin:0}.nit-expert textarea{min-width:0;width:0;min-height:60px;max-height:120px;font-size:16px}.nit-expert form button{flex:none}.nit-expert__privacy{flex:none;font-size:10px;margin:0;padding:0 12px 10px;line-height:1.4}
.nit-expert__links{display:grid;gap:8px;margin:10px 0}.nit-expert__links a{display:block;background:#fff;border:1px solid #eadfd3;border-radius:10px;padding:10px 12px;color:#7f1d2d;text-decoration:none;font-size:13px;line-height:1.4}.nit-expert__links small{display:block;color:#70665c;font-size:11px;margin-bottom:3px}
@media(max-width:600px){.nit-expert{inset:auto 12px max(12px,env(safe-area-inset-bottom)) auto}.nit-expert__launcher{margin:0;padding:10px 12px;font-size:12px}.nit-expert__launcher span:last-child{max-width:124px;line-height:1.3}.nit-expert__dialog:not([hidden]){width:calc(100vw - 24px);height:calc(100dvh - 110px);max-height:calc(100dvh - 110px);border-radius:16px}.nit-expert__dialog header strong{font-size:14px}}
@media(max-width:600px){.nit-expert{left:12px;right:12px;pointer-events:none}.nit-expert__launcher{margin-left:auto;pointer-events:auto}.nit-expert__dialog:not([hidden]){width:100%;pointer-events:auto}}

.nit-expert__reason{font-size:.85rem;line-height:1.5;margin:.5rem 0}.nit-expert__type{color:#666}.nit-expert__card>div{min-width:0}.nit-expert__card strong{overflow-wrap:anywhere}.nit-expert__launcher{max-width:calc(100vw - 24px)}

.nit-expert__prompts{max-height:160px;overflow-x:hidden}.nit-expert__card--text{grid-template-columns:1fr}

.nit-expert__reset{flex:none;align-self:flex-end;font-size:12px;color:#7f1d2d;background:transparent;border:0;text-decoration:underline;cursor:pointer;margin:5px 12px;padding:3px 5px}.nit-expert__reset:disabled{opacity:.5;cursor:wait}.nit-expert__prompts button{cursor:pointer}.nit-expert__dialog{max-width:100%}

/* V3.1: spacious desktop, keyboard-aware mobile, native accessible buttons. */
.nit-expert__dialog:not([hidden]){width:min(560px,calc(100vw - 48px));height:min(760px,calc(100dvh - 48px));max-height:calc(100dvh - 48px)}
.nit-expert__prompts{max-height:126px}.nit-expert__prompts button,.nit-expert__feedback button{min-height:44px;min-width:44px}
.nit-expert button:focus-visible,.nit-expert a:focus-visible,.nit-expert textarea:focus-visible{outline:3px solid #bb7725;outline-offset:3px}
.nit-expert__feedback button[aria-pressed=true]{background:#f2d9b5;border-color:#7f1d2d}.nit-expert button:disabled{cursor:wait;opacity:.6}
@media(max-width:600px){.nit-expert{bottom:calc(var(--expert-keyboard-bottom,0px) + max(8px,env(safe-area-inset-bottom)))}.nit-expert__dialog:not([hidden]){width:100%;height:calc(var(--expert-viewport-height,100dvh) - 24px);max-height:calc(var(--expert-viewport-height,100dvh) - 24px)}.nit-expert__prompts{max-height:116px}.nit-expert__dialog header small{font-size:11px}}

/* V3.3: limited Markdown and delayed status for longer responses. */
.nit-expert__message--formatted{white-space:normal}.nit-expert__message--formatted p{margin:0 0 .9em;font:inherit;line-height:1.55}.nit-expert__message--formatted p:last-child{margin-bottom:0}.nit-expert__message--formatted ul,.nit-expert__message--formatted ol{margin:.5em 0 .9em;padding-left:1.5em}.nit-expert__message--formatted li{margin:.3em 0}.nit-expert__message--formatted a{color:#7f1d2d;text-decoration:underline;text-underline-offset:2px}.nit-expert__message--formatted strong{font-weight:700}.nit-expert__message--formatted em{font-style:italic}.nit-expert__waiting{font-size:13px;line-height:1.5;color:#6f655c;padding:9px 12px;border-left:3px solid #bb7725;margin:0 0 12px;background:#fff8ed;border-radius:0 8px 8px 0}

/* Compact mobile landscape only: keep the reading area dominant and all controls accessible. */
@media (orientation:landscape) and (max-height:500px) and (max-width:1000px){
 .nit-expert{left:8px;right:8px;bottom:max(4px,env(safe-area-inset-bottom))}
 .nit-expert__dialog:not([hidden]){width:100%;height:calc(var(--expert-viewport-height,100dvh) - 12px);max-height:calc(var(--expert-viewport-height,100dvh) - 12px)}
 .nit-expert__dialog>header{padding:4px 12px;min-height:38px}.nit-expert__dialog header small{display:none}
 .nit-expert__reset{margin:0 12px;padding:1px 5px;min-height:24px}
 .nit-expert__prompts{flex-wrap:nowrap;max-height:44px;overflow-x:auto;overflow-y:hidden;padding:0 8px}.nit-expert__prompts button{white-space:nowrap;min-height:40px;padding:4px 8px}
 .nit-expert form{padding:4px 8px;align-items:center}.nit-expert textarea{min-height:44px;height:44px;max-height:70px;padding:6px}
 .nit-expert__privacy{padding:0 8px 3px}.nit-expert__messages{padding:8px;min-height:100px}
}
