/* Ask Cosmic chat. Uses the site tokens from cosmic.css, so it follows the page theme. */
.cc-launch{position:fixed;right:20px;bottom:20px;z-index:60;display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:10px 18px 10px 12px;border:0;border-radius:999px;background:var(--accent);color:var(--ink);font:inherit;font-weight:700;font-size:16px;cursor:pointer;box-shadow:0 6px 18px rgba(20,8,31,.18)}
.cc-launch:hover{background:var(--accent2)}
.cc-launch img{border-radius:6px}
.cc-panel{position:fixed;right:20px;bottom:84px;z-index:60;display:flex;flex-direction:column;width:min(400px,calc(100vw - 24px));height:min(620px,calc(100vh - 110px));background:var(--panel);color:var(--text);border:1px solid var(--line2);border-radius:14px;overflow:hidden;font-size:16px;line-height:1.55}
.cc-panel[hidden]{display:none}
.cc-panel.cc-inline{position:static;width:100%;height:min(680px,calc(100vh - 160px));min-height:480px}
.cc-head{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.cc-head img{flex-shrink:0}
.cc-head div{display:flex;flex-direction:column;line-height:1.25;flex:1}
.cc-head span{font-size:13px;color:var(--muted)}
.cc-x{border:0;background:transparent;color:var(--muted);font-size:26px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:6px}
.cc-x:hover{color:var(--text)}
.cc-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}
.cc-msg{max-width:88%;padding:10px 14px;border-radius:12px;word-wrap:break-word}
.cc-msg p{margin:0 0 8px}.cc-msg p:last-child,.cc-msg ul:last-child{margin-bottom:0}
.cc-msg ul,.cc-msg ol{margin:0 0 8px;padding-left:22px}
.cc-msg li{margin:0 0 4px}.cc-msg li:last-child{margin-bottom:0}
.cc-msg p:last-child,.cc-msg ol:last-child,.cc-msg pre:last-child{margin-bottom:0}
.cc-msg .cc-h{font-weight:700;color:var(--text);margin-top:4px}
.cc-msg pre{margin:0 0 8px;padding:10px 12px;background:var(--bg);border:1px solid var(--line);border-radius:8px;white-space:pre-wrap;word-break:break-word}
.cc-msg pre code{background:transparent;padding:0;font-size:13px;line-height:1.5}
.cc-msg code{font-family:var(--mono);font-size:13px;background:var(--panel2);padding:1px 5px;border-radius:4px;word-break:break-word}
.cc-msg a{color:var(--accent)}
.cc-assistant{align-self:flex-start;background:var(--panel2)}
.cc-user{align-self:flex-end;background:var(--accent);color:var(--ink);white-space:pre-wrap}
.cc-starters{align-self:stretch;display:flex;flex-direction:column;gap:8px}
.cc-starter{text-align:left;font:inherit;font-size:15px;line-height:1.4;color:var(--text);background:var(--panel2);border:1px solid var(--line2);border-radius:10px;padding:10px 14px;cursor:pointer;min-height:44px}
.cc-starter:hover{border-color:var(--accent)}
.cc-starter:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.cc-note{align-self:flex-start;padding:0 2px;font-size:13px;color:var(--dim);font-family:var(--mono)}
.cc-wait{align-self:flex-start;display:flex;flex-direction:column;align-items:center;gap:4px;height:52px;flex-shrink:0;padding:0 6px;font-size:12px;line-height:1.3;color:var(--muted)}
/* A small planet: the disc stays put, its moon rides the orbit line. */
.cc-orb{position:relative;width:28px;height:28px;flex-shrink:0;border:1px solid var(--line2);border-radius:50%;animation:cc-spin 1.2s linear infinite}
.cc-orb::before{content:"";position:absolute;inset:6px;border-radius:50%;background:var(--accent)}
.cc-orb::after{content:"";position:absolute;top:-4px;left:50%;width:7px;height:7px;margin-left:-3.5px;border-radius:50%;background:var(--text)}
.cc-form{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--line)}
.cc-input{flex:1;resize:none;font:inherit;font-size:16px;color:var(--text);background:var(--bg);border:1px solid var(--line2);border-radius:8px;padding:10px 12px;max-height:120px}
.cc-input::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-input:focus{outline:2px solid var(--accent);outline-offset:1px}
.cc-send:disabled{opacity:.6;cursor:wait}
.cc-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 16px 14px}
.cc-meter{margin-left:auto;font-size:12px;color:var(--dim);font-family:var(--mono)}
@media (max-width:520px){.cc-panel:not(.cc-inline){right:12px;left:12px;width:auto;bottom:76px;height:calc(100vh - 100px)}.cc-launch{right:12px;bottom:12px}}
.cc-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:48px;align-items:start}
.cc-intro p{max-width:46ch}
.cc-small{font-size:15px;color:var(--dim)}
@media (max-width:900px){.cc-split{grid-template-columns:1fr;gap:24px}}
/* The logo idles with a small bob and sway. While an answer is on its way, a small one spins in the log (.cc-wait). */
.cc-mark{border-radius:22%;transform-origin:50% 60%;animation:cc-dance 3.6s ease-in-out infinite}
.cc-empty{flex:1;display:grid;place-items:center}
@keyframes cc-dance{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-6%) rotate(-4deg)}50%{transform:translateY(0) rotate(0) scale(1.03)}75%{transform:translateY(-4%) rotate(4deg)}}
@keyframes cc-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.cc-mark,.cc-orb{animation:none}}
.cc-start{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.cc-start h3{margin:0 0 8px}
.cc-start p{max-width:46ch}
