/* Athena: the same night-dark window on the paper and on the night, with her gold. After the guide on the Kar-go site. */
.athena {
  --a-bg: #0f1012; --a-bg2: #17181b; --a-ink: #efeae0; --a-ink2: #bdb7ab; --a-dim: #8d877b;
  --a-line: rgba(239,234,224,.1); --a-line2: rgba(239,234,224,.2); --gold: #e9c47a; --live: #e5574b;
  --io: cubic-bezier(.65,0,.35,1);
  position: fixed; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 70;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none;
  font: 400 15px/1.55 var(--font); color: var(--a-ink); -webkit-font-smoothing: antialiased; text-align: left;
}
.athena > * { pointer-events: auto; }
.athena [hidden] { display: none !important; }
:where(.athena) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.athena svg { display: block; }
.athena :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@keyframes a-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes a-live { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes a-breathe { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* her orb, in a dark round window */
.a-orb { position: relative; display: block; width: 46px; height: 46px; flex: none; border: 1px solid rgba(233,196,122,.16); border-radius: 50%; background: radial-gradient(circle at 50% 45%, #1b1a17 0, #0b0b0c 72%); overflow: hidden; }
.a-orb.sm { width: 36px; height: 36px; }
.a-orb.xs { width: 40px; height: 40px; }
.a-orb canvas, .a-big canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.athena canvas.no-orb { background: radial-gradient(circle, transparent 0 44%, rgba(233,196,122,.55) 45% 47%, transparent 48%); }

/* the pill */
.a-launch { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px 0 5px; border: 1px solid rgba(233,196,122,.3); border-radius: 999px; background: var(--a-bg); color: var(--a-ink); font-size: 14px; line-height: 1; letter-spacing: .01em; box-shadow: 0 10px 30px rgba(8,9,10,.32);
  transition: border-color .3s, box-shadow .3s, transform .35s var(--ease), padding .55s var(--io), gap .55s var(--io), opacity .8s var(--ease); animation: a-rise .6s var(--ease) both; }
.a-launch:hover { border-color: rgba(233,196,122,.62); box-shadow: 0 14px 38px rgba(8,9,10,.4), 0 0 0 4px rgba(233,196,122,.08); transform: translateY(-1px); }
.a-launch:active { transform: scale(.98); }
.a-label { display: inline-block; max-width: 12em; overflow: hidden; white-space: nowrap; transition: max-width .55s var(--io), opacity .35s; }
.athena.tucked .a-label { max-width: 0; opacity: 0; }
.athena.tucked .a-launch { padding-right: 5px; gap: 0; }
[data-theme=dark] .a-launch { border-color: rgba(233,196,122,.42); box-shadow: 0 10px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05); }
/* the welcome page brings her in with its sentence; the menu sheet hides her pill */
.welcome-page:not(.home) .athena .a-launch { opacity: 0; pointer-events: none; transform: translateY(10px); animation: none; }
.menu-open .athena .a-launch, .menu-open .athena .a-consent { opacity: 0; pointer-events: none; }

/* the privacy question, above the pill */
.a-consent { position: relative; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 44px - var(--hh)); overflow-y: auto; padding: 24px 26px 20px; border: 1px solid rgba(239,234,224,.14); background: rgba(24,25,28,.98); box-shadow: 0 30px 80px -24px rgba(0,0,0,.6); animation: a-rise .45s var(--ease) both; }
.a-cn-h { margin: 0 0 10px; font: 400 var(--fs-label)/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--a-dim); }
.a-cn-p { margin: 0 0 18px; font-size: 14px; line-height: 1.7; color: var(--a-ink2); }
.a-cn-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border: 1px solid rgba(239,234,224,.36); font-size: 14px; color: var(--a-ink); transition: background .3s, color .3s, border-color .3s; }
.a-btn:hover { border-color: var(--a-ink); }
.a-btn.solid { background: #e9ecef; border-color: #e9ecef; color: #111417; }
.a-btn.solid:hover { background: #fff; }
.a-cn-links { display: flex; gap: 22px; margin: 16px 0 0; }
.a-lnk { font-size: 13px; color: var(--a-dim); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.a-lnk:hover { color: var(--a-ink); }
.a-cn-prefs { display: grid; margin: 0 0 18px; }
.a-cn-prefs label { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--a-line); }
.a-cn-prefs b { display: block; font-size: 13px; font-weight: 400; color: var(--a-ink); }
.a-cn-prefs small { font-size: 12px; line-height: 1.5; color: var(--a-dim); }
.a-cn-prefs input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }

/* the window */
.a-panel { position: relative; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 112px)); height: min(640px, calc(100svh - 112px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--a-line2); background: rgba(15,16,18,.97); -webkit-backdrop-filter: blur(20px) saturate(1.1); backdrop-filter: blur(20px) saturate(1.1); color: var(--a-ink); box-shadow: 0 40px 110px -30px rgba(0,0,0,.7); animation: a-rise .45s var(--ease) both; }
.a-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 10px; border-bottom: 1px solid var(--a-line); }
.a-head .a-orb { margin: 0 2px 0 4px; }
.a-title { flex: 1; min-width: 0; line-height: 1.35; }
.a-title b { display: block; font-size: 15px; font-weight: 400; letter-spacing: -.005em; }
.a-title small { display: block; overflow: hidden; font-size: 12px; color: var(--a-dim); white-space: nowrap; text-overflow: ellipsis; }
.a-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; color: var(--a-ink2); transition: background .2s, color .2s; }
.a-icon:hover { background: rgba(239,234,224,.08); color: var(--a-ink); }
.a-icon svg { width: 17px; height: 17px; }
.a-say[aria-pressed=false] .w1 { opacity: .22; }

/* the tour of the four */
.a-tour { padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--a-line); }
.a-tour-bar { height: 1px; overflow: hidden; margin-bottom: 10px; background: var(--a-line2); }
.a-tour-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .5s var(--ease); }
.a-tour-row { display: flex; align-items: center; gap: 6px; }
.a-tour-row span { flex: 1; font-size: 13px; line-height: 1.4; color: var(--a-ink2); }
.a-tour-row .a-tplay { background: var(--a-ink); color: var(--a-bg); }
.a-tour-row .a-tplay:hover { background: var(--gold); color: #17140e; }

/* the conversation */
.a-log { display: flex; flex-direction: column; flex: 1; gap: 18px; overflow-y: auto; min-height: 0; padding: 20px 18px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--a-line2) transparent; }
.a-msg { max-width: 100%; font-size: 14.5px; line-height: 1.62; overflow-wrap: anywhere; animation: a-rise .4s var(--ease) both; }
.a-msg.k { color: var(--a-ink); }
.a-msg.k .w { opacity: .3; transition: opacity .16s; }
.a-msg.k .w.on { opacity: 1; }
.a-msg.u { align-self: flex-end; max-width: 88%; padding: 8px 12px; background: rgba(239,234,224,.07); color: var(--a-ink); }
.a-msg.sys { align-self: flex-start; font-size: 13px; line-height: 1.55; color: var(--a-dim); }
.a-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.a-go { font-size: 13.5px; color: var(--a-ink); text-decoration: none; border-bottom: 1px solid rgba(233,196,122,.5); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.a-go:hover { color: var(--gold); border-color: var(--gold); }
.a-film { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; width: 100%; padding: 8px; border: 1px solid var(--a-line2); text-align: left; transition: border-color .2s, background .2s; }
.a-film:hover { border-color: var(--gold); background: rgba(233,196,122,.05); }
.a-film img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.a-film b { display: block; font-size: 14px; font-weight: 400; line-height: 1.35; }
.a-film small { font-size: 12px; color: var(--gold); }
.a-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.a-chips::-webkit-scrollbar { display: none; }
.a-chip { flex: none; min-height: 34px; padding: 6px 12px; border: 1px solid var(--a-line2); font-size: 12.5px; white-space: nowrap; color: var(--a-ink2); transition: color .25s, border-color .25s; }
.a-chip:hover { color: var(--a-ink); border-color: var(--a-ink); }
.a-ask { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; background: rgba(239,234,224,.04); }
.a-ask input { flex: 1; min-width: 0; height: 44px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--a-line2); background: none; color: var(--a-ink); font: inherit; font-size: 15px; border-radius: 0; }
.a-ask input::placeholder { color: var(--a-dim); }
.a-ask input:focus { outline: none; border-bottom-color: var(--a-ink); }
.a-mic, .a-send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--a-line2); transition: background .25s, color .25s, border-color .25s, box-shadow .2s; }
.a-mic svg, .a-send svg { width: 18px; height: 18px; }
.a-mic { color: var(--gold); border-color: rgba(233,196,122,.4); }
.a-mic:hover { border-color: var(--gold); background: rgba(233,196,122,.08); }
.a-mic[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: #17140e; box-shadow: 0 0 0 calc(var(--lvl, 0) * 9px) rgba(233,196,122,.18); }
.a-send { background: var(--a-ink); border-color: var(--a-ink); color: var(--a-bg); }
.a-send:hover { background: transparent; color: var(--a-ink); }

/* the voice: her orb large, what she hears and says, Mute and End */
.a-stage { display: grid; justify-items: center; gap: 6px; padding: 16px 18px 16px; border-bottom: 1px solid var(--a-line); background: radial-gradient(120% 90% at 50% 30%, rgba(233,196,122,.08), transparent 62%); }
.a-big { position: relative; display: block; width: min(184px, 50vw, 30vh); aspect-ratio: 1; border-radius: 50%; }
.a-state { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 14px; color: var(--a-ink); }
.a-dot { position: relative; display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--a-dim); }
.athena[data-voice=listening] .a-dot, .athena[data-voice=hearing] .a-dot, .athena[data-voice=starting] .a-dot { background: var(--live); }
.athena[data-voice=listening] .a-dot::after, .athena[data-voice=hearing] .a-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--live); opacity: 0; animation: a-live 1.6s var(--ease) infinite; }
.athena[data-voice=thinking] .a-dot, .athena[data-voice=speaking] .a-dot { background: var(--gold); }
.athena[data-voice=thinking] .a-dot { animation: a-breathe 1s infinite; }
.athena[data-voice=muted] .a-dot, .athena[data-voice=paused] .a-dot, .athena[data-voice=waiting] .a-dot { background: transparent; box-shadow: 0 0 0 1.5px var(--a-dim) inset; }
.athena[data-voice=off] .a-dock .a-dot { display: none; }
.a-scap { min-height: 3em; max-width: 30em; margin: 0; font-size: 14.5px; line-height: 1.5; text-align: center; color: var(--a-ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.a-scap.u, .a-cap.u { color: var(--a-ink2); font-style: italic; }
.a-scap.sys, .a-cap.sys { color: var(--a-dim); font-size: 13px; }
.a-scap .w, .a-cap .w { opacity: .35; transition: opacity .14s; }
.a-scap .w.on, .a-cap .w.on { opacity: 1; }
.a-vbar { display: flex; gap: 10px; margin-top: 6px; }
.a-vbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--a-line2); border-radius: 999px; font-size: 13.5px; transition: background .2s, border-color .2s, color .2s; }
.a-vbtn svg { width: 17px; height: 17px; }
.a-vbtn:hover { background: rgba(239,234,224,.07); }
.a-vbtn[aria-pressed=true] { background: var(--a-ink); border-color: var(--a-ink); color: var(--a-bg); }
.a-vbtn.end { border-color: rgba(229,87,75,.5); color: #ffb3aa; }
.a-vbtn.end:hover { background: rgba(229,87,75,.14); border-color: var(--live); }
.a-panel.in-voice .a-tour { display: none; }
.a-panel.in-voice .a-log { padding-top: 14px; }
.athena[data-voice=speaking] .a-big, .athena[data-voice=thinking] .a-big { cursor: pointer; }

/* minimised: the bar, and what she says above it */
.a-dock { display: grid; justify-items: end; }
.a-dock-bar { display: flex; align-items: center; gap: 2px; height: 56px; padding: 0 8px 0 5px; border: 1px solid rgba(233,196,122,.3); border-radius: 999px; background: var(--a-bg); color: var(--a-ink); box-shadow: 0 12px 34px rgba(8,9,10,.38); animation: a-rise .35s var(--ease) both; }
.a-dock-main { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 10px 0 0; border-radius: 999px; text-align: left; }
.a-dock-t { display: grid; gap: 3px; min-width: 0; line-height: 1.1; }
.a-dock-t b { font-size: 13.5px; font-weight: 400; }
.a-dock-t small { display: flex; align-items: center; gap: 6px; max-width: 14em; overflow: hidden; font-size: 12px; color: var(--a-dim); white-space: nowrap; }
.a-dock-t small span { overflow: hidden; text-overflow: ellipsis; }
.a-dmic[aria-pressed=true] { color: var(--live); }
.athena[data-voice=muted] .a-dmic { color: var(--a-ink); background: rgba(239,234,224,.1); }
.a-cap { max-width: min(360px, calc(100vw - 32px)); margin: 0; padding: 12px 16px; border: 1px solid var(--a-line); background: rgba(15,16,18,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--a-ink); font-size: 14px; line-height: 1.5; box-shadow: 0 20px 50px -20px rgba(0,0,0,.7); animation: a-rise .3s var(--ease) both; }

/* on the welcome page, with a section open, what she says runs as a subtitle under the drawing, clear of the words */
@media (min-width: 821px) {
  .panel-open .athena .a-cap { position: fixed; left: var(--gut); bottom: clamp(14px, 2vw, 28px); max-width: min(560px, 44vw); }
}
/* small screens: the window across the bottom; the pill becomes her orb alone */
@media (max-width: 560px) {
  .athena { right: 12px; bottom: 12px; }
  .a-label { display: none; }
  .a-launch { height: 52px; padding: 0 4px; gap: 0; }
  .a-launch .a-orb { width: 42px; height: 42px; }
  .a-panel { position: fixed; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(78vh, 640px); height: min(78svh, 640px); }
  .a-consent { position: fixed; left: 12px; right: 12px; bottom: 76px; width: auto; padding: 18px 18px 14px; }
  .a-cn-p { margin-bottom: 14px; font-size: 13px; line-height: 1.55; }
  .a-big { width: min(140px, 40vw, 24vh); }
  .a-dock-bar { height: 52px; }
  .a-dock-t small { max-width: 9em; }
}
@media (prefers-reduced-motion: reduce) {
  .athena *, .athena *::after { animation: none !important; transition-duration: .01ms !important; }
}
