:root{--sim-navy:#155dfc;--sim-brand:#2563eb;--sim-glow:#7dd3fc;--sim-ink:#fff;--sim-muted:#ffffffa6;--sim-bg:#030e24;--sim-sans:"Reddit Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
/* mascot and its proactive message */
#mascot-root{position:fixed;right:16px;bottom:6px;width:250px;height:310px;z-index:40;pointer-events:none}#mascot-root canvas,#mascot-root .bubble-pop.show,#mascot-root .mascot-fallback{pointer-events:auto}
#mascot-canvas{width:100%;height:100%}#mascot-canvas canvas{outline:none;display:block}
#mascot-canvas canvas:focus-visible{outline:3px solid var(--sim-glow);outline-offset:-3px;border-radius:24px}
.mascot-fallback{width:84px;height:84px;margin:90px 0 0 60px;padding:0;border:0;border-radius:50%;background:#0a1d4a url(/simulation/brand/eonsr-icon.png) center/80% no-repeat;cursor:pointer;box-shadow:0 0 0 6px rgba(77,179,255,.3)}
.bubble-pop{position:absolute;right:190px;bottom:190px;width:max-content;max-width:min(270px,calc(100vw - 190px));padding:16px 20px 18px;border-radius:22px 22px 6px 22px;background:#08142cf2;color:#fff;border:1px solid #ffffff2e;
  box-shadow:0 14px 40px rgba(0,0,0,.5);opacity:0;transform:translateY(8px) scale(.96);pointer-events:none;transition:opacity .25s,transform .25s}
.bubble-pop.show{opacity:1;transform:none;pointer-events:auto}
.bubble-pop #bubble-text{all:unset;display:block;cursor:pointer;font:600 17px/1.4 var(--sim-sans);color:var(--sim-ink)}
.bubble-pop #bubble-text:focus-visible{outline:2px solid var(--sim-glow);outline-offset:4px;border-radius:6px}
.bubble-pop #bubble-close{position:absolute;top:4px;right:8px;border:0;background:none;color:#9aa6c4;font-size:13px;cursor:pointer;padding:4px}
.bubble-pop .bar{display:block;width:34px;height:4px;border-radius:2px;background:var(--sim-navy);margin-top:10px}

/* mascot set no. 1 (moon): a wider box; only the moon itself takes clicks (see moon.js) */
#mascot-root.set-moon{width:340px;height:280px;right:12px;bottom:4px;transform-origin:100% 100%;transition:transform .3s ease}
#mascot-root.set-moon.chat-open{transform:scale(.62)}   /* beside the open chat window the moon steps back, so it does not cover the message box */
.set-moon .bubble-pop{right:calc(100% - 30px);bottom:130px}
@media (max-width:640px){#mascot-root.set-moon{width:270px;height:224px;right:2px}.set-moon .bubble-pop{right:calc(100% - 60px);bottom:90px;max-width:62vw}}
/* mascot set no. 3 (moon buddy): a taller, narrower box */
#mascot-root.set-buddy{width:300px;height:330px;right:14px;bottom:4px;transform-origin:100% 100%;transition:transform .3s ease}
#mascot-root.set-buddy.chat-open{transform:scale(.6)}
.set-buddy .bubble-pop{right:calc(100% - 40px);bottom:160px}
@media (max-width:640px){#mascot-root.set-buddy{width:220px;height:240px;right:2px}.set-buddy .bubble-pop{right:calc(100% - 50px);bottom:100px;max-width:62vw}}
/* mascot set no. 4 (core egg): a tall, narrow box */
#mascot-root.set-egg{width:270px;height:320px;right:14px;bottom:4px;transform-origin:100% 100%;transition:transform .3s ease}
#mascot-root.set-egg.chat-open{transform:scale(.6)}
.set-egg .bubble-pop{right:calc(100% - 40px);bottom:150px}
@media (max-width:640px){#mascot-root.set-egg{width:200px;height:240px;right:2px}.set-egg .bubble-pop{right:calc(100% - 40px);bottom:100px;max-width:62vw}}
/* label of the mascot set being tried, bottom left, linking back to the /mascot gallery */
.mascot-tag{position:fixed;left:16px;top:92px;z-index:41;display:flex;flex-direction:column;gap:2px;padding:9px 14px;border-radius:14px;background:#08142cf2;border:1px solid #ffffff2e;color:#fff;text-decoration:none;font:600 12.5px/1.3 var(--sim-sans);box-shadow:0 10px 30px rgba(0,0,0,.4)}
.mascot-tag a{font-weight:500;color:var(--sim-glow);text-decoration:none}.mascot-tag a:hover,.mascot-tag a:focus-visible{text-decoration:underline}
.mascot-tag .forms{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}.mascot-tag .forms button{font:inherit;font-size:11.5px;color:#fff;background:#ffffff14;border:1px solid #ffffff33;border-radius:999px;padding:2px 9px;cursor:pointer}.mascot-tag .forms button[aria-pressed=true]{border-color:var(--sim-glow);box-shadow:0 0 0 1px var(--sim-glow) inset}
@media (max-width:640px){.mascot-tag{left:8px;top:70px;font-size:11.5px;max-width:52vw}}
/* chat window: a frosted-glass popup over 75% of the screen, so the site shows through it; the mascot docks in its left column */
.scrim{position:fixed;inset:0;z-index:55;background:rgba(0,6,20,.12);opacity:0;transition:opacity .24s ease}.scrim.show{opacity:1}
.chat{position:fixed;left:12.5vw;top:12.5vh;width:75vw;height:75vh;z-index:60;display:flex;flex-direction:column;border-radius:28px;overflow:hidden;
  opacity:0;transform:translateY(18px) scale(.985);transition:opacity .24s ease,transform .24s ease}
.chat.show{opacity:1;transform:none}
.glass{background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(125,211,252,.06) 45%,rgba(8,20,44,.22));backdrop-filter:blur(16px) saturate(1.6) brightness(.85);-webkit-backdrop-filter:blur(16px) saturate(1.6) brightness(.85);
  border:1px solid rgba(255,255,255,.28);box-shadow:0 30px 90px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.35),inset 0 0 0 1px rgba(125,211,252,.08)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.glass{background:rgba(3,14,36,.9)}}
.chat,.chat *{text-shadow:0 1px 8px rgba(0,8,24,.55)}.chat-head{flex:none;display:flex;align-items:center;gap:10px;padding:14px 22px;border-bottom:1px solid rgba(255,255,255,.12);color:var(--sim-ink)}
.chat-head .spacer{flex:1}.logo{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;overflow:hidden;background:transparent}.logo img{display:block;width:100%;height:100%;object-fit:contain}
.icon{border:0;background:none;color:var(--sim-muted);font-size:16px;cursor:pointer;padding:6px 10px;border-radius:8px}.icon:hover{background:rgba(255,255,255,.12)}
.chat-grid{flex:1;min-height:0;display:grid;grid-template-columns:1fr}
.chat-side{display:flex;flex-direction:column;min-height:0;padding:8px 20px 20px;border-right:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);overflow-y:auto}
.mascot-slot{flex:none;display:flex;justify-content:center}.chat-side h3{margin:4px 0 12px;font-size:17px;color:var(--sim-ink)}
.side-list{display:flex;flex-direction:column;gap:10px}
.side-item{border:1px solid rgba(255,255,255,.2);background:rgba(8,20,44,.35);color:var(--sim-ink);padding:12px 16px;border-radius:16px;font:500 14px/1.4 var(--sim-sans);text-align:left;cursor:pointer}
.side-item:hover{background:rgba(125,211,252,.14);border-color:var(--sim-glow)}
.chat-main{display:flex;flex-direction:column;min-height:0;min-width:0}
.chat-body{flex:1;overflow-y:auto;padding:22px 28px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}
.row{display:flex;gap:10px;align-items:flex-start}.row.user{justify-content:flex-end}
.avatar{flex:none;width:32px;height:32px;border-radius:50%;background:#0a1d4a url(/simulation/brand/eonsr-icon.png) center/82% no-repeat;box-shadow:0 0 0 2px rgba(77,179,255,.5)}
.bubble{max-width:min(720px,calc(100% - 46px));padding:14px 18px;border-radius:20px;background:rgba(8,20,44,.42);border:1px solid rgba(255,255,255,.16);box-shadow:none;font-size:15.5px;overflow-wrap:anywhere}
.row.user .bubble{background:linear-gradient(135deg,var(--sim-brand),var(--sim-navy));color:#fff;max-width:75%;border-bottom-right-radius:6px}
.bubble p{margin:0 0 8px}.bubble p:last-child{margin:0}.bubble ul,.bubble ol{margin:4px 0 8px;padding-left:22px}.bubble a{color:var(--sim-glow);font-weight:600}
.refs{margin-top:10px;padding-top:8px;border-top:1px solid rgba(255,255,255,.14);font-size:13px;color:var(--sim-muted)}.refs a{margin-right:10px}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-left:42px}.chips-label{flex-basis:100%;font-size:13px;color:var(--sim-muted)}
.chip{border:1px solid rgba(125,211,252,.45);background:rgba(8,20,44,.4);color:var(--sim-ink);padding:9px 16px;border-radius:999px;font:500 14px var(--sim-sans);text-align:left;cursor:pointer}
.chip:hover{background:rgba(125,211,252,.2);border-color:var(--sim-glow)}
.typing i{display:inline-block;width:7px;height:7px;margin-right:4px;border-radius:50%;background:var(--sim-navy);animation:blink 1.2s infinite both}.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.25;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}
.chat-foot{flex:none;padding:12px 28px 16px;border-top:1px solid rgba(255,255,255,.12)}
.composer{display:flex;gap:10px}.composer input{flex:1;min-width:0;border:1px solid rgba(255,255,255,.28);background:rgba(8,20,44,.4);border-radius:999px;padding:13px 20px;font:15.5px var(--sim-sans);color:var(--sim-ink)}
.composer input:focus{outline:2px solid var(--sim-glow);border-color:transparent}
.send{flex:none;width:46px;height:46px;border:0;border-radius:50%;background:linear-gradient(135deg,var(--sim-navy),var(--sim-brand));color:#fff;font-size:17px;cursor:pointer}.send:disabled{opacity:.5;cursor:default}
.privacy{display:block;margin-top:8px;font-size:12px;line-height:1.4;color:var(--sim-muted)}

/* docked mascot: inside the left column of the open window */

@media (max-width:900px){.chat{left:4vw;top:6vh;width:92vw;height:88vh}}
@media (max-width:640px){.chat{left:0;top:8vh;width:100%;height:92vh;border-radius:24px 24px 0 0}.chat-body{padding:16px}.chat-foot{padding:10px 16px 14px}#mascot-root{width:170px;height:205px;right:4px}.bubble-pop{right:120px;bottom:130px}}
/* mobile browsers: 100vh counts the area behind the address bar, so the message box slid under it; dvh is the visible height (the vh rules above stay as the fallback) */
@supports (height:1dvh){.chat{height:75dvh;top:12.5dvh}@media (max-width:900px){.chat{height:88dvh;top:6dvh}}@media (max-width:640px){.chat{height:92dvh;top:8dvh}}}
.chat-foot{padding-bottom:max(16px,env(safe-area-inset-bottom))}
/* a phone turned sideways is wide but very short: use the whole screen for the chat and shrink the mascot so it never covers the composer */
@media (max-height:520px) and (orientation:landscape){.chat{left:0;top:0;width:100%;height:100vh;border-radius:0}@supports (height:1dvh){.chat{height:100dvh;top:0}}.chat-head{padding:8px 16px}.chat-body{padding:12px 16px}.chat-foot{padding:8px 16px 10px}#mascot-root{transform:scale(.5);transform-origin:100% 100%}#mascot-root.set-moon.chat-open,#mascot-root.set-buddy.chat-open,#mascot-root.set-egg.chat-open{transform:scale(.3)}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* the popup the chatbot opens by itself: a short message; click it to open the chat, where the suggested questions are */
.bubble-pop{width:min(320px,calc(100vw - 32px));max-width:none}
.bubble-pop #bubble-text{font:600 15.5px/1.45 var(--sim-sans)}

/* every text in the chat window is white, whatever colour the host page gives its body */
.chat,.chat .chat-head,.chat .bubble,.chat .bubble *,.chat .chat-foot,.chat .composer input,.chat .icon,.chat .chips .chip{color:#fff}
.chat .bubble a{color:var(--sim-glow)}
.chat .chips-label,.chat .privacy,.chat .bubble .refs,.chat .bubble .refs *{color:rgba(255,255,255,.78)}
.chat .bubble .refs a{color:var(--sim-glow)}
.chat input::placeholder{color:rgba(255,255,255,.6)}
.bubble-pop,.bubble-pop #bubble-text,.bubble-pop #bubble-close{color:#fff}

/* cards inside an answer: a person's profile card with the photo, small cards for images, pages, articles and documents */
.chat .cards{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.chat .mcard{display:flex;gap:16px;align-items:flex-start;padding:14px;border-radius:18px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.2);box-shadow:0 10px 30px rgba(0,0,0,.25)}
.chat .mphoto{flex:none;width:96px;height:112px;border-radius:14px;object-fit:cover;object-position:center top;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.22)}
.chat .mphoto.ph{display:grid;place-items:center;font:700 38px Georgia,serif;color:#fff}
.chat .minfo{display:flex;flex-direction:column;gap:4px;min-width:0}
.chat .mname{font-size:17px;line-height:1.25}
.chat .mrole{font-size:13.5px;color:var(--sim-glow)}
.chat .mquote{margin:6px 0 0;font-size:13.5px;line-height:1.5;font-style:italic;color:rgba(255,255,255,.85)}
.chat .mactions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chat a.pill{display:inline-block;padding:6px 14px;border-radius:999px;border:1px solid rgba(125,211,252,.55);background:rgba(125,211,252,.1);color:#fff;font-size:13px;font-weight:600;text-decoration:none}
.chat a.pill:hover{background:rgba(125,211,252,.25)}.chat a.pill:focus-visible{outline:2px solid var(--sim-glow);outline-offset:2px}
.chat .icard{margin:0;border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.06)}
.chat .iphoto{display:block;width:100%;max-height:220px;object-fit:cover}
.chat .icard figcaption{padding:8px 12px;font-size:13px;color:rgba(255,255,255,.85)}
.chat .lcard{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.18)}
.chat .ltitle{font-weight:700}.chat .lsub{font-size:12.5px;color:rgba(255,255,255,.7)}
@media (max-width:520px){.chat .mcard{flex-direction:column}.chat .mphoto{width:100%;height:200px}}
