/* Aura — the assistant's light. Navy and steel blue from the site itself, with
   a passage of sea green and a little warm sand. */

:root {
  --a1: #a9bfd9;  /* mist: the bright core */
  --a2: #5d86b8;  /* steel: the body */
  --a3: #2c4a70;  /* navy: the same family as the role titles */
  --a4: #e6edf5;  /* near white */
  --ah: #5fa48a;  /* sea green: the highlight */
  --ag: #dcc07a;  /* gold: the warm counterpoint, a step yellower than the section labels */
  --ar: #b4476e;  /* crimson magenta: the rarest note, used in the smallest amount */
  --am: var(--ah);
  --label: #b3a68c;
  --accent: var(--a1);
  --aura-flow: linear-gradient(90deg, var(--a3), var(--a2), var(--a1), var(--ah), var(--ag), color-mix(in srgb, var(--ar) 70%, var(--a2)) 72%, var(--a2), var(--a3));
}

#aura { position: fixed; inset: 0; z-index: 30; width: 100%; height: 100%; pointer-events: none; }
#threads { position: fixed; inset: 0; z-index: 29; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

/* The aura mark: a small capsule of the same light, flowing. Used wherever the
   interface would otherwise blink a dot: live, working, watching. */
.aura-mark {
  flex: none;
  display: inline-block;
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: var(--aura-flow) 0 0 / 300% 100%;
  box-shadow: 0 0 10px color-mix(in srgb, var(--a2) 55%, transparent);
  opacity: 0.85;
  animation: auraFlow 7s linear infinite;
}
.aura-mark.is-working { width: 26px; animation-duration: 1.6s; opacity: 1; }
@keyframes auraFlow { to { background-position: -300% 0; } }

/* threads: a soft ribbon from a word in the answer to the thing it names */
.thread-glow { fill: none; stroke: url(#threadGrad); stroke-width: 9; stroke-linecap: round; filter: url(#threadBlur); opacity: 0.55; }
.thread-core { fill: none; stroke: url(#threadGrad); stroke-width: 1.3; stroke-linecap: round; opacity: 0.9; }
.thread-pulse { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.05 0.95; opacity: 0.8; animation: threadPulse 1.6s linear infinite; }
.thread-glow,
.thread-core { stroke-dasharray: 1; stroke-dashoffset: 1; animation: threadDraw 820ms var(--ease) forwards; }
.thread.is-leaving { opacity: 0; transition: opacity 900ms ease; }
.thread-dot { fill: #fff; filter: drop-shadow(0 0 7px var(--a2)); animation: dotIn 500ms 500ms var(--ease) both; }
@keyframes threadDraw { to { stroke-dashoffset: 0; } }
@keyframes threadPulse { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dotIn { from { r: 0; opacity: 0; } }

/* the bubble being written carries a slow-moving edge of light */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.message.assistant.is-live { border-color: rgba(255, 255, 255, 0.08); }
.message.assistant.is-live::before {
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), transparent 0 50%, var(--a3), var(--a2), var(--a1), var(--ah) 86%, var(--ag) 92%, color-mix(in srgb, var(--ar) 75%, var(--a2)) 96%, transparent 99%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  content: "";
  pointer-events: none;
  animation: auraSpin 3.4s linear infinite;
}
@keyframes auraSpin { to { --ang: 360deg; } }

/* names the assistant links: a quiet wash of the same blue */
.ent {
  background: linear-gradient(90deg, color-mix(in srgb, var(--a2) 30%, transparent), color-mix(in srgb, var(--a1) 22%, transparent));
  box-shadow: inset 0 -1px color-mix(in srgb, var(--a1) 85%, transparent);
}
.ent:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--a2) 48%, transparent), color-mix(in srgb, var(--ah) 34%, transparent)); box-shadow: inset 0 -1px var(--white), 0 0 18px color-mix(in srgb, var(--a2) 55%, transparent); }

/* cited paper: lit and lifted */
.is-cited { animation: auraCited 4.6s ease both; }
@keyframes auraCited {
  0% { transform: scale(0.985); }
  8%, 72% { background: #fff; transform: scale(1.012); box-shadow: 0 18px 50px rgba(31, 53, 82, 0.24); }
}
.timeline-role.is-cited { animation: auraRole 4.6s ease both; }
@keyframes auraRole { 8%, 72% { background: #fff; box-shadow: 0 0 0 8px #fff, 0 18px 50px 8px rgba(31, 53, 82, 0.2); } }
