/* Conversation palette shared by the homepage and the assistant widget. */
:is(.k-home,.kai-root,.assistant-app-top){
  --chat-night:#0b1328;
  --chat-backdrop:radial-gradient(ellipse at 16% 0%,#27204e 0%,transparent 58%),radial-gradient(ellipse at 91% 94%,#142950 0%,transparent 62%),var(--chat-night);
  --chat-reply:#162545;
  --chat-reply-line:#425e91;
  --chat-question:#1847b3;
  --chat-question-line:#5b7bd2;
  --chat-composer:#111d39;
  --chat-text:#f5f7ff;
  --chat-muted:#c3cdef;
  --chat-accent:#c1aeff;
  --chat-corner:18px;
}
.chat-speaker{
  display:block;
  margin:0 2px 5px;
  color:var(--chat-accent);
  font-size:.72em;
  font-weight:750;
  letter-spacing:.045em;
  line-height:1.4;
  text-transform:uppercase;
}

@media (forced-colors:active){
  .chat-speaker{color:CanvasText}
}

/* Kletus homepage: the voice stage. Kletus itself is the homepage.
   Everything (logo, menu, tagline, microphone, "Talk to Kletus", typing) fits on one phone screen. */
.k-home{
  --kx-bg:var(--chat-night);
  --kx-surface:var(--chat-reply);
  --kx-line:var(--chat-reply-line);
  --kx-text:var(--chat-text);
  --kx-muted:var(--chat-muted);
  --kx-accent:var(--chat-accent);
  background:
    radial-gradient(ellipse at 50% 14%,#1c377a 0%,transparent 42rem),
    var(--kx-bg);
  color:var(--kx-text);
}
.k-home .k-nav{
  background:rgba(8,15,35,.94);
  border-bottom-color:#273657;
}
.k-home .k-menu a,.k-home .k-menu-btn{color:var(--kx-text)}
.k-home .k-menu a:hover,.k-home .k-menu-btn:hover{background:var(--kx-surface)}
.k-home .k-signin{background:var(--kx-surface);border:1px solid var(--kx-line)}
.k-home .k-signin:hover{background:#203765}
.k-home :focus-visible{outline-color:var(--k-gold)}
@media (max-width:760px){
  .k-home .k-menu{background:var(--kx-bg);border-color:var(--kx-line)}
}
.kx-stage{
  --orb:clamp(134px,min(23svh,46vw),212px);
  display:flex;
  flex-direction:column;
  align-items:center;
  width:min(920px,calc(100% - 32px));
  min-height:clamp(530px,calc(100svh - 88px),780px);
  margin:14px auto;
  padding:clamp(16px,3svh,30px) clamp(14px,4vw,42px) 16px;
  border:1px solid #425789;
  border-radius:clamp(22px,4vw,38px);
  background:var(--chat-backdrop);
  box-shadow:0 28px 90px #02061590,inset 0 1px #ffffff13;
  text-align:center;
}
.kx-hero{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:clamp(7px,1.5svh,15px);
  width:100%;
}
.kx-tag{margin:0;font-size:clamp(29px,5.5vw,58px);line-height:1.06;letter-spacing:-.045em;font-weight:760;color:var(--kx-text);text-wrap:balance}
.kx-tag span{color:var(--kx-accent)}
.kx-cta{margin:0;font-size:clamp(19px,2.2vw,23px);font-weight:700;color:var(--kx-text)}
.kx-status{margin:0;font-size:14px;color:var(--kx-muted);max-width:520px}
.kx-status:empty{display:none}
.kx-welcome{margin:0;color:var(--kx-muted);font-size:clamp(14px,3.5vw,17px);text-align:center}
.kx-welcome-play[hidden],.kx-stage.has-convo .kx-welcome,.kx-stage.is-session .kx-welcome-play{display:none}

/* ---------- the microphone orb ---------- */
.kx-mic{position:relative;width:var(--orb);height:var(--orb);border:0;padding:0;background:none;cursor:pointer;border-radius:50%;-webkit-tap-highlight-color:transparent;transition:width .35s var(--k-ease),height .35s var(--k-ease),transform .2s var(--k-ease);margin:clamp(12px,2svh,26px) 0;flex:none}
.kx-mic::before,.kx-mic::after{
  content:"";
  position:absolute;
  inset:-10%;
  border:1px solid #8badff60;
  border-radius:50%;
  pointer-events:none;
}
.kx-mic::after{inset:-20%;border-color:#8badff32}
.kx-mic:active{transform:scale(.97)}
.kx-mic:focus-visible{outline:none}
.kx-mic:focus-visible .kx-core{box-shadow:0 0 0 4px #fff,0 0 0 8px var(--k-gold),0 30px 60px -20px rgba(15,47,143,.6)}
.kx-halo,.kx-ring,.kx-core,.kx-sheen{position:absolute;inset:0;border-radius:50%;pointer-events:none}
.kx-halo{inset:-22%;background:radial-gradient(circle,rgba(63,109,255,.32) 0,rgba(63,109,255,.12) 40%,transparent 68%);filter:blur(6px);opacity:.75;animation:kx-breathe 5s ease-in-out infinite}
.kx-ring{border:2px solid rgba(138,176,255,.65);opacity:0}
.kx-core{background:
  radial-gradient(circle at 34% 26%,rgba(255,255,255,.55) 0,rgba(255,255,255,0) 26%),
  radial-gradient(circle at 62% 92%,rgba(120,160,255,.45) 0,rgba(120,160,255,0) 38%),
  radial-gradient(circle at 40% 35%,#6f95ff 0,#2d5ff0 34%,#1a40c4 64%,#102a7a 100%);
  box-shadow:inset 0 -10px 30px rgba(5,15,50,.45),inset 0 6px 18px rgba(255,255,255,.18),0 30px 60px -22px rgba(15,47,143,.65),0 0 0 1px rgba(255,255,255,.4);
  transition:transform .4s var(--k-ease),filter .4s}
/* a slow sweep of golden light around the rim */
.kx-sheen{inset:-3px;background:conic-gradient(from 0deg,transparent 0 62%,rgba(255,201,40,.0) 64%,rgba(255,214,90,.95) 76%,rgba(255,255,255,.9) 79%,rgba(255,201,40,0) 88%,transparent 100%);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 calc(100% - 3px));mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 calc(100% - 3px));animation:kx-spin 9s linear infinite;opacity:.85}
.kx-icon{position:absolute;inset:0;display:grid;place-items:center;color:#fff;pointer-events:none}
.kx-icon svg{width:30%;height:30%;filter:drop-shadow(0 2px 6px rgba(0,0,0,.25));transition:transform .3s var(--k-ease)}
.kx-mic:hover .kx-core{transform:scale(1.025)}
.kx-mic:hover .kx-halo{opacity:1}
/* listening: soft royal rings radiate outward; the mic is on */
.kx-stage[data-state=listening] .kx-ring,.kx-stage[data-state=hearing] .kx-ring,.kx-stage[data-state=live] .kx-ring{animation:kx-ripple 2.4s var(--k-ease) infinite}
.kx-stage[data-state=listening] .kx-ring:nth-child(3),.kx-stage[data-state=hearing] .kx-ring:nth-child(3),.kx-stage[data-state=live] .kx-ring:nth-child(3){animation-delay:.8s}
.kx-stage[data-state=listening] .kx-ring:nth-child(4),.kx-stage[data-state=hearing] .kx-ring:nth-child(4),.kx-stage[data-state=live] .kx-ring:nth-child(4){animation-delay:1.6s}
.kx-stage[data-state=listening] .kx-sheen{animation-duration:4s}
/* hearing words: brighter, quicker */
.kx-stage[data-state=hearing] .kx-halo{opacity:1;animation:kx-breathe .9s ease-in-out infinite}
.kx-stage[data-state=hearing] .kx-ring{border-color:rgba(166,197,255,.85);animation-duration:1.4s}
.kx-stage[data-state=hearing] .kx-core{transform:scale(1.04)}
/* thinking: the light circles quickly */
.kx-stage[data-state=thinking] .kx-sheen{animation-duration:1.2s;opacity:1}
.kx-stage[data-state=thinking] .kx-core{filter:saturate(.85) brightness(.96)}
/* speaking: golden glow that pulses with the voice */
.kx-stage[data-state=speaking] .kx-halo{background:radial-gradient(circle,rgba(255,201,40,.42) 0,rgba(255,201,40,.14) 42%,transparent 68%);opacity:1;animation:kx-breathe 1.1s ease-in-out infinite}
.kx-stage[data-state=speaking] .kx-core{animation:kx-speak 1.1s ease-in-out infinite}
.kx-stage[data-state=speaking] .kx-sheen{animation-duration:2.6s;opacity:1}
.kx-stage[data-state=speaking] .kx-ring{border-color:rgba(255,190,20,.5);animation:kx-ripple 1.8s var(--k-ease) infinite}
.kx-stage[data-state=speaking] .kx-ring:nth-child(3){animation-delay:.6s}
.kx-stage[data-state=speaking] .kx-ring:nth-child(4){animation-delay:1.2s}
.kx-stage.is-session .kx-icon .kx-i-mic{display:none}
.kx-icon .kx-i-wave{display:none}
.kx-stage.is-session .kx-icon .kx-i-wave{display:block}
.kx-i-wave rect{transform-origin:center;transform-box:fill-box;animation:kx-bar 1s ease-in-out infinite}
.kx-i-wave rect:nth-child(2){animation-delay:.15s}.kx-i-wave rect:nth-child(3){animation-delay:.3s}.kx-i-wave rect:nth-child(4){animation-delay:.45s}.kx-i-wave rect:nth-child(5){animation-delay:.6s}
.kx-stage[data-state=thinking] .kx-i-wave rect{animation-duration:2.2s}

@keyframes kx-spin{to{transform:rotate(360deg)}}
@keyframes kx-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes kx-ripple{0%{transform:scale(1);opacity:.75}100%{transform:scale(1.55);opacity:0}}
@keyframes kx-speak{0%,100%{transform:scale(1)}30%{transform:scale(1.045)}60%{transform:scale(1.015)}}
@keyframes kx-bar{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}

/* ---------- live controls & privacy ---------- */
.kx-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:6px 0 0}
.kx-controls[hidden]{display:none}
.kx-micstate{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:650;color:var(--k-muted);padding:6px 12px;border-radius:999px;background:var(--k-bg2)}
.kx-micstate i{width:8px;height:8px;border-radius:50%;background:#9aa3b5}
.kx-stage.mic-on .kx-micstate{color:#b42318;background:#fdecea}
.kx-stage.mic-on .kx-micstate i{background:#e5372a;box-shadow:0 0 0 0 rgba(229,55,42,.5);animation:kx-live 1.6s infinite}
.kx-micstate .kx-on{display:none}.kx-stage.mic-on .kx-micstate .kx-on{display:inline}.kx-stage.mic-on .kx-micstate .kx-off{display:none}
@keyframes kx-live{70%{box-shadow:0 0 0 7px rgba(229,55,42,0)}100%{box-shadow:0 0 0 0 rgba(229,55,42,0)}}
.kx-chip{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--k-line);background:#fff;color:var(--k-ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.kx-wake.kx-chip{min-height:44px;color:#f8f5ff;background:#251c40;border-color:#7254a8}
.kx-wake[hidden]{display:none}
.kx-chip:hover{border-color:#c5cee0}
.kx-chip svg{width:16px;height:16px}
.kx-mute[aria-pressed=true]{color:var(--k-muted)}
.kx-end{background:var(--k-ink);color:#fff;border-color:var(--k-ink)}
.kx-end:hover{background:#b42318;border-color:#b42318}

/* ---------- typing ---------- */
.kx-type{display:flex;align-items:center;gap:6px;width:min(620px,100%);margin:clamp(10px,2.4svh,22px) auto 0;padding:6px;border:1px solid #d9dfeb;border-radius:999px;background:#fff;box-shadow:0 10px 30px -18px rgba(13,23,48,.35);transition:border-color .15s,box-shadow .15s}
.kx-type:focus-within{border-color:var(--k-royal);box-shadow:0 0 0 4px var(--k-royal-soft),0 10px 30px -18px rgba(13,23,48,.35)}
.kx-type input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:16px;color:var(--k-ink);padding:10px 0}
.kx-type input::placeholder{color:#8a94a8}
.kx-type button{flex:none;width:42px;height:42px;border-radius:50%;border:0;background:var(--k-royal);color:#fff;display:grid;place-items:center;cursor:pointer;transition:background .15s,transform .15s}
.kx-type button:hover{background:var(--k-royal-deep)}
.kx-type button:disabled{background:#b9c3d8;cursor:default}
.kx-type button svg{width:18px;height:18px}
.kx-type :is(.kx-attach,.kx-photos){background:var(--k-royal-soft);color:var(--k-royal-deep)}
.kx-type :is(.kx-attach,.kx-photos):hover:not(:disabled){background:#dce6ff}
.kx-type :is(.kx-attach,.kx-photos):disabled{opacity:.5}
.kx-basic :is(.kx-attach,.kx-photos)[hidden]{display:none}
.kx-basic .kx-type input{padding-inline-start:12px}
.kx-voice-dialog{
  box-sizing:border-box;width:min(36rem,calc(100% - 24px));padding:clamp(16px,4vw,26px);
  color:#f8f5ff;background:#141126;border:1px solid #7254a8;border-radius:20px;color-scheme:dark
}
.kx-voice-dialog::backdrop{background:#070612cc}
.kx-voice-dialog h2{margin-block:0 12px}
.kx-voice-dialog textarea{
  box-sizing:border-box;width:100%;padding:10px;font:inherit;color:inherit;
  border:1px solid #7254a8;border-radius:12px;background:#1d1732
}
.kx-voice-dialog .kx-chip{margin:10px 8px 0 0;color:#f8f5ff;background:#251c40;border-color:#7254a8}
.kx-voice-dialog .kx-chip:disabled{opacity:.55}
.kx-voice-dialog :focus-visible{outline:2px solid #a6c9ff;outline-offset:2px}
.kx-attachments{width:min(620px,100%);text-align:start}
.kx-files{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:8px 0 0;padding:0}
.kx-files[hidden],.kx-file-status:empty{display:none}
.kx-files li{display:flex;align-items:center;gap:6px;max-width:100%;padding:3px 6px;border:1px solid var(--k-line);border-radius:10px;background:#fff;color:var(--k-ink);font-size:13px}
.kx-files img{width:32px;height:32px;object-fit:cover;border-radius:5px}
.kx-files span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kx-files button{min-width:36px;min-height:36px;flex:none;border:0;border-radius:8px;background:transparent;color:var(--k-ink);cursor:pointer}
.kx-files button:hover:not(:disabled){background:var(--k-royal-soft)}
.kx-file-status{margin:4px 0 0;color:var(--k-muted);font-size:13px}
.kx-privacy{margin:10px 0 0;font-size:12.5px;color:#7a8499}
.kx-privacy a{text-decoration:underline;text-underline-offset:2px}

/* ---------- conversation ---------- */
.kx-convo{width:min(720px,100%);overflow-y:auto;overscroll-behavior:contain;padding:4px 2px 8px;text-align:start;scroll-behavior:smooth;-webkit-mask:linear-gradient(transparent,#000 18px);mask:linear-gradient(transparent,#000 18px)}
.kx-convo[hidden]{display:none}
.kx-log{list-style:none;margin:0;padding:14px 0 0;display:flex;flex-direction:column;gap:12px}
.kx-msg{max-width:88%;animation:kx-in .3s var(--k-ease)}
.kx-msg-body p{margin:0 0 .5em}.kx-msg-body p:last-child{margin:0}
.kx-msg-body ul{margin:.3em 0;padding-inline-start:1.2em}
.kx-msg-body .k-chat-link{color:inherit;text-decoration:underline;text-underline-offset:.16em}
.kx-user{align-self:flex-end;text-align:end}
.kx-user .kx-msg-body{
  background:var(--chat-question);color:var(--chat-text);text-align:start;
  padding:11px 15px;border:1px solid var(--chat-question-line);border-radius:var(--chat-corner)
}
.kx-user.is-interim .kx-msg-body{background:var(--chat-reply);border-style:dashed}
.kx-assistant{align-self:flex-start;color:var(--k-ink);font-size:16.5px;line-height:1.6}
.kx-assistant .kx-msg-body{padding:2px 0}
.kx-assistant.is-cut .kx-msg-body{color:var(--k-muted)}
.kx-msg-note{margin:6px 0 0;font-size:13px;color:var(--k-muted)}
.kx-msg-note a{color:var(--k-royal);font-weight:600}
.kx-dots{display:inline-flex;gap:5px;padding:8px 0}
.kx-dots i{width:8px;height:8px;border-radius:50%;background:var(--k-royal);opacity:.35;animation:kx-dot 1.2s infinite}
.kx-dots i:nth-child(2){animation-delay:.2s}.kx-dots i:nth-child(3){animation-delay:.4s}
@keyframes kx-dot{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
@keyframes kx-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* once a conversation starts, the orb steps back and the words take the space */
.kx-stage.has-convo{height:max(380px,calc(100svh - 88px));min-height:0}
.kx-stage.has-convo .kx-hero{flex:none;flex-direction:row;gap:14px;justify-content:flex-start;order:2;margin-top:6px;width:min(720px,100%)}
.kx-stage.has-convo .kx-tag{display:none}
.kx-stage.has-convo{--orb:68px}
.kx-stage.has-convo .kx-mic{margin:0}
.kx-stage.has-convo .kx-cta{font-size:16px;text-align:start}
.kx-stage.has-convo .kx-hero{flex-wrap:wrap}
.kx-stage.has-convo .kx-status{width:100%;order:3;font-size:13px;min-height:0}
.kx-stage.has-convo .kx-convo{flex:1;min-height:0;order:1}
.kx-stage.has-convo .kx-controls{order:3}
.kx-stage.has-convo .kx-type{order:4;margin-top:10px;width:min(720px,100%)}
.kx-stage.has-convo .kx-attachments{order:5;width:min(720px,100%)}
.kx-stage.has-convo .kx-privacy{order:6}

/* ---------- below the fold: one quiet line into the ecosystem ---------- */
.kx-more{padding:30px 0 40px;text-align:center}
.kx-more nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.kx-more nav a{padding:9px 16px;border-radius:999px;border:1px solid var(--k-line);font-size:14px;font-weight:600;color:#2b3650}
.kx-more nav a:hover{border-color:var(--k-royal);color:var(--k-royal)}
.kx-more p{margin:0 0 14px;color:var(--k-muted);font-size:14px}
.kx-app-faq{box-sizing:border-box;max-width:min(560px,calc(100% - 32px));margin:22px auto 0;padding:12px 16px;border:1px solid var(--k-line);border-radius:12px;text-align:start}
.kx-app-faq summary{padding-block:4px;cursor:pointer;font-weight:600}
.kx-app-faq p{margin:8px 0 0}
.kx-app-faq a{color:var(--k-royal-deep);text-decoration:underline;text-underline-offset:2px}

@media (max-height:650px){
  .kx-stage{--orb:104px;min-height:460px;padding-top:12px}
  .kx-tag{font-size:clamp(25px,5vw,35px)}
  .kx-stage.has-convo{--orb:48px;min-height:0}
}
@media (prefers-reduced-motion:reduce){
  .kx-halo,.kx-sheen,.kx-ring,.kx-core,.kx-i-wave rect{animation:none!important}
  .kx-stage[data-state=listening] .kx-ring:nth-child(2),.kx-stage[data-state=hearing] .kx-ring:nth-child(2){opacity:.8;transform:scale(1.12)}
  .kx-stage[data-state=speaking] .kx-halo{opacity:1}
}
@media (forced-colors:active){.kx-core{forced-color-adjust:none}.kx-mic{border:2px solid ButtonText}}

.kx-work-toolbar, .kx-work-panel {
  width: min(100%, 670px);
  margin-inline: auto;
}
.kx-work-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-block: .5rem;
}
.kx-work-panel {
  padding: 1rem;
  margin-block: .5rem;
  background: #142542;
  color: #f0f5ff;
  border: 1px solid #52698d;
  border-radius: 1rem;
}
.kx-work-panel h2 { margin: 0 0 .65rem; font-size: 1.1rem; }
.kx-work-panel input {
  display: block;
  width: 100%;
  margin-top: .65rem;
  padding: .55rem .7rem;
  border: 1px solid #7086aa;
  border-radius: .45rem;
  background: #0c1930;
  color: #f0f5ff;
  font: inherit;
}
.kx-work-panel input::placeholder { color: #b6c7df; }
.kx-work-panel p { margin-block: .5rem; font-size: .9rem; }
.kx-work-panel ul { max-height: 14rem; overflow-y: auto; list-style: none; margin: 0; padding: 0; }
.kx-work-panel li + li { margin-top: .35rem; }
.kx-work-toolbar button, .kx-work-panel button, .kx-work-download {
  min-height: 36px;
  padding: .35rem .7rem;
  border: 1px solid #6d85ad;
  border-radius: .55rem;
  background: #182d50;
  color: #f0f5ff;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
}
.kx-work-toolbar button:focus-visible, .kx-work-panel :focus-visible, .kx-work-download:focus-visible {
  outline: 2px solid #f9ca5f;
  outline-offset: 2px;
}
.kx-work-panel li button { width: 100%; text-align: start; overflow-wrap: anywhere; }
.kx-work-panel button:disabled { opacity: .65; cursor: default; }
.kx-work-download { margin-top: .5rem; }

/* Conversation stays in the same surface as the microphone and composer. */
.kx-stage .kx-work-toolbar,.kx-stage .kx-work-panel{width:min(720px,100%);order:-1}
.kx-stage .kx-work-toolbar{margin:0 0 8px}
.kx-stage .kx-work-toolbar button{min-height:44px;border-radius:999px}
.kx-stage .kx-work-panel{margin:0 0 8px;text-align:start;max-height:36svh;overflow:auto}
.kx-stage.has-convo{--orb:52px}
.kx-stage.has-convo .kx-hero{align-items:center;margin:8px 0 2px}
.kx-stage.has-convo .kx-mic::before,.kx-stage.has-convo .kx-mic::after{display:none}
.kx-stage.has-convo .kx-convo{
  padding:0 2px 8px;
  mask:none;
  -webkit-mask:none;
}
.kx-log{min-height:100%;justify-content:flex-end;padding:4px 0;overflow-wrap:anywhere}
.kx-assistant,.kx-assistant.is-cut{color:var(--kx-text)}
.kx-assistant.is-error{color:#ffd3d7}
.kx-assistant .kx-msg-body{
  padding:10px 14px;
  border:1px solid var(--chat-reply-line);
  border-radius:var(--chat-corner);
  background:var(--chat-reply);
}
.kx-assistant.is-error .kx-msg-body{color:#ffd3d7}
.kx-note-line .chat-speaker{display:none}
.kx-assistant.kx-note-line .kx-msg-body{
  padding:3px 1px;
  border:0;
  background:none;
  color:var(--kx-muted);
  font-size:13px;
}
.kx-msg-note{color:var(--kx-muted)}
.kx-msg-note a{color:var(--kx-accent);text-decoration:underline}
.kx-type{
  margin-top:10px;
  border-color:var(--chat-reply-line);
  background:var(--chat-composer);
  box-shadow:inset 0 1px #ffffff0b;
}
.kx-type:focus-within{border-color:var(--kx-accent);box-shadow:0 0 0 2px #a8c2ff40}
.kx-type input{color:var(--kx-text)}
.kx-type input::placeholder{color:var(--kx-muted);opacity:1}
.kx-type button{width:44px;height:44px;background:var(--chat-question)}
.kx-type button:hover{background:#2456cd}
.kx-type button:disabled{background:#354b78;color:#d5def4}
.kx-type :is(.kx-attach,.kx-photos){background:#263b67;color:var(--kx-text)}
.kx-type :is(.kx-attach,.kx-photos):hover:not(:disabled){background:#35548f}
.kx-file-status,.kx-privacy{color:var(--kx-muted)}
.kx-privacy{max-width:620px;line-height:1.45}
.kx-shortcuts{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:0 12px;
  margin-top:5px;
}
.kx-shortcuts a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding-inline:2px;
  color:var(--kx-accent);
  font-size:13px;
  text-underline-offset:3px;
}
.kx-shortcuts a:hover,.kx-more nav a:hover{text-decoration:underline}
.kx-stage.has-convo .kx-shortcuts,.kx-stage.is-session .kx-shortcuts{display:none}
.kx-more{width:min(920px,calc(100% - 32px));margin-inline:auto}
.kx-more p{color:var(--kx-muted)}
.kx-more nav{margin-bottom:16px}
.kx-more nav a,.kx-app-faq{border-color:var(--kx-line);color:var(--kx-text)}
.kx-more nav a:hover,.kx-more .k-link,.kx-app-faq a{color:var(--kx-accent)!important}
.kx-more .k-link{text-decoration:underline;text-underline-offset:3px}
.kx-launch-links{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 16px;margin-top:8px}
.kx-launch-links a{display:inline-flex;align-items:center;gap:.3em;min-height:36px;color:var(--kx-accent);font-weight:650;text-underline-offset:3px}
.kx-launch-note{margin:0;color:var(--kx-muted);font-size:.875rem;max-width:38rem}
.kx-stage.has-convo :is(.kx-launch-links,.kx-launch-note),.kx-stage.is-session :is(.kx-launch-links,.kx-launch-note){display:none}

.kx-discover{display:grid;gap:32px;text-align:start;padding-bottom:50px}
.kx-discover > section{padding-block:20px;border-top:1px solid var(--kx-line)}
.kx-discover h2{font-size:clamp(1.375rem,3.5vw,1.875rem);line-height:1.2;margin:0 0 12px}
.kx-discover h3{font-size:1.125rem;line-height:1.3;margin:0}
.kx-discover p{font-size:1rem;margin:0 0 12px}
.kx-tool-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin:0 0 16px}
@media (min-width:540px){
  .kx-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.kx-tool{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:18px;border:1px solid var(--kx-line);background:var(--kx-surface);border-radius:var(--k-radius)}
.kx-tool p{flex:1;margin:0}
.kx-discover .kx-everything{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 18px;padding:20px;border:1px solid var(--kx-accent);border-radius:var(--k-radius);background:var(--kx-surface)}
.kx-everything .kx-bundle-prices{margin:0;color:var(--kx-text);font-weight:650}
.kx-discover .kx-app-faq{margin-top:12px}
.k-vision-home > p{max-width:48rem}
.k-vision-home > .k-eyebrow{color:var(--kx-accent)}
html.a11y-calm .kx-stage{box-shadow:none}
@media (forced-colors:active){
  .kx-stage,.kx-type,.kx-assistant .kx-msg-body{border-color:CanvasText}
  .kx-shortcuts a,.kx-more .k-link,.kx-app-faq a{color:LinkText!important}
}

/* The avatar uses the same live state as the mic and the conversation controls. */
.kx-projection{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .24s var(--k-ease),transform .32s var(--k-ease);
  transform:translateY(8%) scale(.8);
}
.kx-avatar{
  position:absolute;
  inset:0 0 13%;
  width:100%;
  height:87%;
  object-fit:fill;
  filter:drop-shadow(0 4px 14px #217fff7a);
}
.kx-projector-beam{
  position:absolute;
  inset:19% 7% 7%;
  clip-path:polygon(0 0,100% 0,57% 100%,43% 100%);
  background:linear-gradient(0deg,#44aaff88 0%,#215eee30 44%,transparent 83%);
}
.kx-projector-base{
  position:absolute;
  inset:auto 30% 5%;
  height:9%;
  border:1px solid #a9dfff;
  border-radius:50%;
  background:radial-gradient(ellipse,#a4dfff,#1465d9 50%,#1d4eac 78%);
  box-shadow:0 0 12px #67baffcc,0 0 26px #356cff9e;
}
@media (forced-colors:none){
  .kx-stage.is-session{--orb:clamp(110px,22svh,176px)}
  .kx-stage.is-session .kx-mic{margin-block:0;border-radius:18px}
  .kx-stage.is-session .kx-mic:focus-visible{outline:3px solid var(--k-gold);outline-offset:3px}
  .kx-stage.is-session .kx-mic::before,.kx-stage.is-session .kx-mic::after,
  .kx-stage.is-session .kx-mic > :not(.kx-projection){opacity:0;animation:none}
  .kx-stage.is-session .kx-projection{
    opacity:1;
    transform:none;
    animation:kx-project-in .58s var(--k-ease) both;
  }
  .kx-stage.is-session .kx-welcome{display:none}
  .kx-stage.has-convo.is-session .kx-hero{gap:clamp(8px,3vw,18px)}
  .kx-stage.has-convo.is-session .kx-cta{flex:1;min-width:0;overflow-wrap:anywhere}
  .kx-stage.is-session.mic-on .kx-projector-base{box-shadow:0 0 0 4px #6ab8ff45,0 0 26px #499dffc9}
  .kx-stage.is-session[data-state=speaking] .kx-projector-base{
    border-color:#ffe398;
    box-shadow:0 0 18px #ffca5f9c,0 0 32px #366cffb8;
    animation:kx-project-speak .82s ease-in-out infinite alternate;
  }
  .kx-stage.is-session[data-state=speaking] .kx-avatar{animation:kx-avatar-speak 1.5s ease-in-out infinite alternate}
  @media (max-height:700px){
    .kx-stage.has-convo.is-session{--orb:clamp(88px,16svh,108px)}
  }
  @media (prefers-reduced-motion:reduce){
    .kx-stage.is-session .kx-projection,.kx-stage.is-session[data-state=speaking] .kx-projector-base,
    .kx-stage.is-session[data-state=speaking] .kx-avatar{animation:none;transition:none}
  }
  html.a11y-calm .kx-stage.is-session .kx-projection,
  html.a11y-calm .kx-stage.is-session .kx-projector-base,
  html.a11y-calm .kx-stage.is-session .kx-avatar{animation:none;transition:none}
}
@keyframes kx-project-in{
  0%{opacity:0;transform:translateY(13%) scale(.72);clip-path:inset(82% 0 0)}
  55%{opacity:.8;clip-path:inset(10% 0 0)}
  100%{opacity:1;transform:none;clip-path:inset(0)}
}
@keyframes kx-project-speak{to{filter:brightness(1.32);scale:1.13 1.06}}
@keyframes kx-avatar-speak{to{translate:0 -2px;filter:drop-shadow(0 4px 16px #4c9cff9c)}}

.kx-avatar-mouth{
  --kx-mouth-open:0;
  opacity:var(--kx-mouth-open);
  mask-image:radial-gradient(ellipse 6% 4.7% at 50.9% 33.6%,#000 68%,transparent 100%);
}
.kx-stage.is-session .kx-projector-beam{
  background:
    repeating-linear-gradient(0deg,transparent 0 5px,#64bbff24 6px 7px),
    linear-gradient(0deg,#44aaffad,#215eee60 55%,transparent 97%);
}
.kx-stage.is-session .kx-avatar{opacity:.92}
.kx-stage.is-session .kx-avatar-mouth{opacity:var(--kx-mouth-open)}
@media (prefers-reduced-motion:reduce){
  .kx-projection{transition:none}
}

/* Give the transcript the viewport once the person starts a conversation. */
.k-home:has(.kx-stage.has-convo){overflow:hidden}
.k-home:has(.kx-stage.has-convo) .k-nav{
  position:fixed;inset-block-start:var(--kx-viewport-top,0px);inset-inline:0
}
.k-home .k-logo-chat{display:none}
.k-home:has(.kx-stage.has-convo) .k-logo{min-width:0}
.k-home:has(.kx-stage.has-convo) .k-logo-default{display:none}
.k-home:has(.kx-stage.has-convo) .k-logo-chat{display:inline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.k-home:has(.kx-stage.has-convo) .k-logo img{
  border:1px solid var(--chat-reply-line);border-radius:10px;
}
.kx-stage.has-convo ~ :is(.kx-more,.k-vision-home,.k-foot){display:none}
.kx-stage.has-convo{
  --orb:44px;
  position:fixed;z-index:1;inset-block-start:calc(var(--kx-viewport-top,0px) + 60px);inset-inline:0;
  width:100%;height:calc(var(--kx-viewport-height,100dvh) - 60px);margin:0;
  padding:8px clamp(12px,3vw,30px) max(8px,env(safe-area-inset-bottom));
  border:0;border-radius:0;box-shadow:none;background:var(--chat-backdrop)
}
.kx-stage.has-convo.is-session{--orb:52px}
.kx-stage.has-convo :is(.kx-convo,.kx-type,.kx-attachments,.kx-hero,.kx-work-panel){width:min(100%,1040px)}
.kx-stage.has-convo .kx-convo{scroll-behavior:auto;overflow-anchor:none;padding:0 3px 8px}
.kx-stage.has-convo .kx-log{min-height:0;justify-content:flex-start;gap:18px;padding:12px 0 4px}
.kx-stage.has-convo .kx-msg{flex:none}
.kx-stage.has-convo .kx-user{max-width:min(86%,46rem)}
.kx-stage.has-convo .kx-assistant{max-width:min(94%,48rem);font-size:clamp(16px,1.7vw,18px);line-height:1.6}
.kx-stage.has-convo :is(.kx-promise,.kx-voice-help){display:none}
.kx-stage.has-convo .kx-privacy{font-size:12px;margin-top:6px}
.kx-stage.has-convo .kx-hero{gap:8px;margin:4px 0 0}
.kx-stage.has-convo .kx-status:not(:empty){flex:1;width:auto;text-align:start}
.kx-stage.has-convo .kx-cta{display:none}
.kx-stage.has-convo .kx-controls{margin-top:2px}
.kx-stage.has-convo .kx-type{margin-top:5px}
.kx-stage.has-convo .kx-attachments{max-height:20dvh;overflow:auto}
.kx-stage.has-convo .kx-work-toolbar{margin-bottom:2px}
@media(min-width:761px){
  .k-home:has(.kx-stage.has-convo) .k-menu-btn{display:grid}
  .k-home:has(.kx-stage.has-convo) .k-signin{margin-inline-start:auto}
  .k-home:has(.kx-stage.has-convo) .k-menu{
    display:none;position:absolute;inset-block-start:100%;inset-inline-end:18px;
    padding:10px;max-height:calc(100dvh - 60px);overflow:auto;
    background:var(--kx-bg);border:1px solid var(--kx-line);border-radius:12px
  }
  .k-home:has(.kx-stage.has-convo) .k-menu.is-open{display:grid}
}

.kletus-website-preview{margin:.65rem 0;min-width:min(100%,320px)}
.kletus-website-preview h3{margin:0 0 .4rem;font-size:.9rem}
.kletus-website-preview iframe{display:block;width:100%;height:clamp(320px,55vh,620px);border:1px solid #8c98aa;border-radius:12px;background:#fff}
@media (prefers-reduced-motion:reduce){
  .kx-msg{animation:none}
}

.chat-attachment-thumb{display:inline-grid;place-items:center;flex:none;padding:2px;min-width:44px;min-height:44px;background:transparent;color:inherit;border:0;border-radius:7px;cursor:zoom-in}
.chat-attachment-thumb img{display:block;width:38px;height:38px;object-fit:contain;border-radius:5px}
.chat-attachment-preview{box-sizing:border-box;width:min(94vw,960px);max-height:92dvh;padding:12px;border:1px solid #666;border-radius:12px;background:#181425;color:#fff;overflow:auto}
.chat-attachment-preview::backdrop{background:#000b}
.chat-attachment-preview p{margin:8px 0;overflow-wrap:anywhere}
.chat-attachment-preview img{display:block;max-width:100%;height:auto;margin-inline:auto}
.chat-attachment-preview button{min-height:44px;padding:0 14px;border:1px solid #a09bb6;border-radius:8px;background:#312a48;color:#fff;font:inherit;cursor:pointer}
.kx-type button:is(.kx-attach,.kx-photos){display:flex;flex-direction:column;justify-content:center;gap:2px;font-size:9px;font-weight:650;line-height:1}
.kx-type button:is(.kx-attach,.kx-photos)[hidden]{display:none}
.kx-files .chat-attachment-thumb{min-width:44px;min-height:44px;cursor:zoom-in}
.kx-files .chat-attachment-thumb img{width:38px;height:38px;object-fit:contain}


.kx-driver-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 27%);
  gap: clamp(.65rem, 3vw, 1.5rem);
  width: min(100%, 46rem);
  margin: 0 auto .75rem;
  align-items: center;
  text-align: start;
}

.kx-driver-launch p { margin: .5rem 0; color: var(--kx-muted); }
.kx-driver-launch .kx-launch-date { color: var(--kx-text); }
.kx-driver-launch .kx-home-primary { justify-content: start; }
.kx-driver-launch figure { margin: 0; text-align: center; }
.kx-driver-launch img {
  display: block;
  width: min(100%, 8rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 29%;
  margin: 0 auto .45rem;
  border: 1px solid var(--kx-line);
  border-radius: 50%;
}
.kx-driver-launch figcaption { color: var(--kx-muted); font-size: .82rem; line-height: 1.35; }
.kx-driver-launch .kx-driver-visual { display: grid; gap: .55rem; align-items: center; }
.kx-driver-visual > figure:first-child img { width: 3.5rem; margin-bottom: 0; }
.kx-route-preview { min-width: 0; }
.kx-preview-app {
  display: grid; gap: .3rem; padding: .65rem; border: 1px solid var(--kx-line);
  border-radius: 1rem; background: #17112a; color: #f6f2ff; text-align: start;
  font-size: .78rem; line-height: 1.25;
}
.kx-preview-route, .kx-preview-tip { display: grid; gap: .22rem; padding: .35rem; border-radius: .45rem; background: #241936; }
.kx-preview-maps { color: #e5d3ff; font-weight: 700; }
.kx-route-preview figcaption { margin-top: .3rem; }
.kx-stage.has-convo .kx-driver-launch { display: none; }

@media (max-width: 520px) {
  .kx-driver-launch { grid-template-columns: minmax(0, 1fr) minmax(112px, 34%); }
  .kx-driver-launch h1 { font-size: clamp(1.7rem, 6vw, 2.1rem); }
  .kx-driver-launch p { font-size: .9rem; line-height: 1.4; }
  .kx-driver-launch .k-btn { padding-inline: .65rem; font-size: .85rem; }
  .kx-driver-launch figcaption { font-size: .72rem; }
}

.kx-progress { color: var(--kx-muted); font-size: .9rem; }
