/* ElyAI v2: a chat app in the logo's colours. Night indigo, a violet-to-cyan glow. */
@font-face { font-family: "Sora"; src: url(/assets/fonts/sora.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
:root {
  --bg: #0b0a1f; --bg2: #13112e; --bg3: #191640; --card: rgba(255, 255, 255, .045);
  --ln: rgba(190, 180, 255, .12); --ln2: rgba(190, 180, 255, .22);
  --ink: #f2f0ff; --body: #dcd9f7; --mut: #a9a5cc; --dim: #77739f;
  --vio: #8b5cf6; --cy: #3ec6ff; --grad: linear-gradient(90deg, #8b5cf6, #3ec6ff);
  --up: #4ee6a8; --dn: #ff7a9a; --amb: #ffc861;
  --f: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15.5px/1.55 var(--f); overflow-x: clip; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(50% 40% at 6% 0%, rgba(98, 58, 220, .36), transparent 70%), radial-gradient(45% 40% at 100% 100%, rgba(30, 110, 180, .26), transparent 70%); background-attachment: fixed; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; -webkit-tap-highlight-color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
.up { color: var(--up); } .dn { color: var(--dn); } .muted { color: var(--dim); font-size: 13.5px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 10, 31, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 22px; height: 66px; padding: 0 max(var(--gl), 28px) 0 max(var(--gl), 28px); }
.logo { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.logo i { font-style: normal; background: var(--grad); color: var(--bg); border-radius: 7px; padding: 1px 7px; font-size: 15px; line-height: 1.35; }
.logo.sm { font-size: 17px; } .logo.sm i { font-size: 12.5px; }
.links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--mut); }
.links a:hover { color: var(--ink); }
.gb { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; background: linear-gradient(var(--bg2), var(--bg2)) padding-box, var(--grad) border-box; border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600; flex: none; white-space: nowrap; }
.strip { display: none; }

/* app */
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 22px; padding: 6px max(var(--gr), 28px) 26px max(var(--gl), 28px); max-width: 1500px; margin: 0 auto; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 100px); height: calc(100dvh - 100px); min-height: 560px; max-height: 900px; border: 1px solid var(--ln); border-radius: 26px; background: var(--card); padding: 22px 26px 16px; min-width: 0; }
.log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--ln2) transparent; }
.hello { text-align: center; max-width: 660px; margin: 4vh auto 0; }
.orb { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 0 50px rgba(139, 92, 246, .45); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); box-shadow: 0 0 70px rgba(62, 198, 255, .45); } }
h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello > p { color: var(--mut); font-size: clamp(14px, 1.3vw, 16px); margin: 12px auto 0; max-width: 540px; }
.sug { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; text-align: left; }
.sug button { text-align: left; border: 1px solid var(--ln); border-radius: 16px; padding: 13px 15px; font-size: 14px; font-weight: 500; background: rgba(255, 255, 255, .03); transition: border-color .15s, background .15s, transform .1s; }
.sug button:hover { border-color: var(--ln2); background: rgba(139, 92, 246, .1); }
.sug button:active { transform: scale(.98); }
.sug small { display: block; color: var(--dim); font-size: 12px; font-weight: 400; margin-top: 2px; }

/* messages */
.me { margin: 14px 0 12px auto; width: fit-content; max-width: 82%; background: var(--grad); color: var(--bg); border-radius: 18px 18px 5px 18px; padding: 10px 15px; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; animation: pop .2s ease both; }
.ai { display: flex; gap: 11px; margin: 4px 0 16px; animation: pop .25s ease both; }
.ai .av { width: 32px; height: 32px; border-radius: 10px; flex: none; background: url(/assets/logo-160.png) center / cover; box-shadow: 0 0 18px rgba(139, 92, 246, .35); }
.ai .bub { min-width: 0; flex: 1; font-size: 14.5px; color: var(--body); }
.ai .bub p + p { margin-top: 8px; }
.ai .bub b { color: var(--ink); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.typing { display: inline-flex; gap: 5px; padding: 8px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mut); animation: dot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .25; transform: translateY(-3px); } }
.cards { display: grid; gap: 7px; margin-top: 10px; }
.cc { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--ln); border-radius: 14px; padding: 9px 12px; background: rgba(255, 255, 255, .035); }
.cc .ci { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--bg); }
.cc b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc b .nm { font-style: normal; font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 6px; }
.cc small { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc .cv { text-align: right; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.cc .cv small { font-weight: 400; }
.cc { cursor: pointer; transition: border-color .15s; } .cc:hover { border-color: var(--ln2); }
.strip span[data-q] { cursor: pointer; }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; margin-top: 8px; }
.verdict.ok { background: rgba(78, 230, 168, .14); color: var(--up); } .verdict.wa { background: rgba(255, 200, 97, .14); color: var(--amb); } .verdict.no { background: rgba(255, 122, 154, .14); color: var(--dn); }
.follow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.follow button { border: 1px solid var(--ln2); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--mut); }
.follow button:hover { color: var(--ink); border-color: var(--vio); }

/* input */
.inp { display: flex; align-items: center; gap: 10px; margin-top: 12px; border: 1.5px solid transparent; background: linear-gradient(#141233, #141233) padding-box, var(--grad) border-box; border-radius: 20px; padding: 7px 7px 7px 18px; box-shadow: 0 0 40px rgba(139, 92, 246, .16); }
.inp input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; padding: 10px 0; }
.inp input::placeholder { color: var(--dim); }
.inp button { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--grad); color: var(--bg); display: grid; place-items: center; transition: transform .1s, filter .15s; }
.inp button:active { transform: scale(.94); }
.inp button:disabled { filter: grayscale(.6) brightness(.8); }
.fine { font-size: 11.5px; color: var(--dim); text-align: center; margin-top: 8px; }

/* side */
.side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { border: 1px solid var(--ln); border-radius: 22px; background: var(--card); padding: 16px 18px; }
.panel h3 { font-size: 13px; font-weight: 600; color: var(--mut); display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.live { color: var(--up); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.orbit { position: relative; height: 300px; }
.orbit canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.otip { position: absolute; pointer-events: none; background: rgba(19, 17, 46, .95); border: 1px solid var(--ln2); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -120%); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.legend .g { background: var(--up); } .legend .r { background: var(--dn); }
.pulse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.pulse div { background: rgba(255, 255, 255, .04); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.pulse b { display: block; font-size: 20px; letter-spacing: -.02em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse small { font-size: 11px; color: var(--dim); }
.feed .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--ln); cursor: pointer; }
.feed .row:first-child { border-top: 0; }
.feed .row span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .row small { color: var(--dim); margin-left: 6px; }
.feed .row em { font-style: normal; flex: none; font-weight: 600; }

/* sections */
.band { padding: 60px max(var(--gr), 28px) 20px max(var(--gl), 28px); }
.band-in { max-width: 1100px; margin: 0 auto; }
.band h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; font-weight: 600; margin-bottom: 22px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.three > div { border: 1px solid var(--ln); border-radius: 20px; padding: 20px; background: var(--card); }
.three b { display: block; font-size: 16.5px; margin-bottom: 6px; }
.three p { color: var(--mut); font-size: 14.5px; }
.tok { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; align-items: center; border: 1px solid var(--ln2); border-radius: 26px; padding: 30px; background: linear-gradient(135deg, rgba(139, 92, 246, .14), rgba(62, 198, 255, .06)); }
.tok h2 { margin-bottom: 8px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(40px, 5vw, 60px); }
.tok p { color: var(--mut); }
.lbl { display: block; font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.ca { display: flex; align-items: center; gap: 10px; border: 1px solid var(--ln2); border-radius: 14px; padding: 8px 8px 8px 14px; background: rgba(11, 10, 31, .6); min-width: 0; }
.ca code { flex: 1; min-width: 0; font-size: 13px; color: var(--mut); overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; }
.ca.on code { color: var(--ink); }
.ca button { border: 1px solid var(--ln2); border-radius: 10px; padding: 7px 13px; font-size: 13px; font-weight: 600; flex: none; }
.ca button:disabled { opacity: .35; cursor: default; }
.tok-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ln2); border-radius: 14px; padding: 12px 18px; font-size: 14.5px; font-weight: 600; }
.btn.pri { background: var(--grad); color: var(--bg); border-color: transparent; }
.btn.off { background: var(--bg3); color: var(--dim); border-color: var(--ln); cursor: default; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 30px max(var(--gr), 28px) calc(30px + env(safe-area-inset-bottom, 0px)) max(var(--gl), 28px); margin-top: 40px; border-top: 1px solid var(--ln); color: var(--dim); font-size: 13px; }

/* tablets: side column under the chat */
@media (max-width: 1080px) { .app { grid-template-columns: minmax(0, 1fr) minmax(0, 330px); } .orbit { height: 240px; } }

/* phones: a messaging app. The input sits at the bottom of the screen. */
@media (max-width: 860px) {
  .top-in { height: 58px; gap: 10px; padding: 0 var(--gr) 0 var(--gl); }
  .links { display: none; }
  .gb { margin-left: auto; padding: 7px 12px; font-size: 12.5px; }
  .gb + .gb { margin-left: 0; }
  .strip { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gr) 10px var(--gl); }
  .strip::-webkit-scrollbar { display: none; }
  .strip span { flex: none; border: 1px solid var(--ln); border-radius: 999px; padding: 5px 11px; font-size: 12px; background: rgba(255, 255, 255, .04); white-space: nowrap; }
  .app { display: block; padding: 0 var(--gr) 0 var(--gl); }
  .chat { height: auto; min-height: 0; max-height: none; border: 0; border-radius: 0; background: none; padding: 0; }
  .log { overflow: visible; padding: 0 0 8px; }
  .hello { margin-top: 22px; }
  .orb { width: 58px; height: 58px; border-radius: 17px; margin-bottom: 14px; }
  .sug { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 20px; }
  .sug button { padding: 12px 14px; font-size: 13.5px; }
  .inp { position: fixed; z-index: 15; left: var(--gl); right: var(--gr); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin: 0; padding: 6px 6px 6px 16px; border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .55), 0 0 30px rgba(139, 92, 246, .18); }
  .inp button { width: 42px; height: 42px; border-radius: 13px; }
  .fine { display: none; }
  body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(96px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 45%); pointer-events: none; z-index: 14; }
  .side { margin-top: 24px; }
  .orbit { height: 260px; }
  body.chatting .side, body.chatting .band, body.chatting .foot { display: none; }
  body.chatting .log { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .band { padding: 44px var(--gr) 10px var(--gl); }
  .three { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tok { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px; }
  .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 360px) { .pulse { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pulse div:last-child { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
