/* Ilyra Research: Ilyra's own stylesheet (styles.css), in the research model's purple, plus the
   few things only this site has (the lock, the GPU banner). */
:root { --accent: rgb(196, 120, 220); }
.brand-mark { filter: hue-rotate(247deg) saturate(.9); }
.shell[hidden], .lock[hidden] { display: none; }
body.locked .shell { display: none; }

/* Code colours: Ilyra's, with the purple accent for keywords */
.md .math-block { margin: 0 0 12px; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.md .katex { font-size: 1.08em; color: var(--ink); }
.md pre code.hljs { color: #d8d4cc; }
.hljs-comment, .hljs-quote { color: #7d7a74; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-doctag, .hljs-meta .hljs-keyword { color: #c478dc; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-meta .hljs-string { color: #b5cf7a; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link { color: #f08c5a; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #ffd27a; }
.hljs-title.class_, .hljs-type, .hljs-built_in, .hljs-class .hljs-title { color: #7fc8d8; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-property, .hljs-params { color: #e8b98a; }
.hljs-name, .hljs-tag, .hljs-selector-id, .hljs-selector-class { color: #ff9d5c; }
.hljs-meta, .hljs-subst { color: #a8a39a; }
.hljs-deletion { color: #ef7b7b; }

/* The orb (orb.js): Ilyra's stage, in purple. Grabbable on the welcome screen; docks in the header in a chat. */
.orb { --orb-rgb: 196, 120, 220; touch-action: none; }
.orb canvas { cursor: grab; }
.orb canvas:active { cursor: grabbing; }
body.active .orb canvas { cursor: pointer; }
body.active .intro { display: none; }

/* The lock */
.lock { flex: 1; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse 50% 40% at 50% 30%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--bg); }
.lock-card[hidden], .lock-card [hidden] { display: none; }
.lock-card { width: min(360px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; }
.lock-inner { display: grid; justify-items: center; gap: 18px; width: min(360px, 100%); }
/* The lock's orb: big enough for the physics (the orb ignores the pointer under 120px). */
body .lock .lock-orb { --orb: 168px; width: var(--orb); margin: 0; }
body .lock .lock-orb .ring { display: block; }
.lock-card h1 { font-size: 26px; }
.lock-sub { margin: 0 0 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lock-input { width: 100%; padding: 11px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--line-strong); font-size: 15px; }
.lock-input:focus { outline: 0; border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); }
.lock-input[hidden], .lock-go[hidden], .lock-remember[hidden] { display: none; }
.lock-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.lock-go { width: 100%; padding: 10px 14px; font-size: 14px; }
.lock-msg { min-height: 18px; margin: 0; font-size: 13px; color: var(--danger); }

/* The GPU banner above the chat */
.gpu-banner { width: min(760px, 100%); margin: 18px auto 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13.5px; color: var(--muted); }
.gpu-banner[hidden] { display: none; }
.gpu-banner #bannerText { flex: 1; }
.gpu-banner .link-btn { color: var(--ink); }
body.active .gpu-banner { margin: 0 auto 18px; }
.status-dot.busy { background: var(--accent); animation: blink 1.2s steps(2) infinite; }

/* Settings: the GPU card */
.gpu-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.gpu-bar { height: 4px; margin-top: 12px; border-radius: 3px; background: var(--line); overflow: hidden; }
.gpu-bar[hidden] { display: none; }
.gpu-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.row select { flex: none; width: 150px; }
.provider-row-head .state.busy { color: var(--accent); }
.provider-row-head .state.busy::before { background: var(--accent); }
.provider-row-head .state.bad { color: var(--danger); }
.provider-row-head .state.bad::before { background: var(--danger); }

/* Tool runs: images from Python */
.msg-run .run-images { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.msg-run .run-images img { max-width: 100%; border-radius: 8px; background: #fff; }
.send-btn .stop-ico { display: none; width: 14px; height: 14px; }
.send-btn.stop .stop-ico { display: block; }
.send-btn.stop .send-ico { display: none; }
.msg-error { margin-top: 8px; font-size: 13px; color: var(--danger); }

/* The Python sandbox frame is never seen */
.py-sandbox { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

/* Very faint purple glows drifting behind the chat. */
.app { isolation: isolate; }
.app::before, .app::after {
  content: ""; position: absolute; inset: -25%; z-index: -1; pointer-events: none;
  filter: blur(40px); will-change: transform;
}
.app::before {
  background:
    radial-gradient(circle at 22% 30%, rgba(196, 120, 220, .075), transparent 28%),
    radial-gradient(circle at 78% 68%, rgba(150, 90, 230, .06), transparent 30%);
  animation: glow-a 46s ease-in-out infinite alternate;
}
.app::after {
  background:
    radial-gradient(circle at 70% 22%, rgba(210, 130, 235, .05), transparent 26%),
    radial-gradient(circle at 30% 80%, rgba(170, 100, 225, .055), transparent 30%);
  animation: glow-b 60s ease-in-out infinite alternate;
}
@keyframes glow-a {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(6%, 4%) rotate(8deg) scale(1.06); }
  100% { transform: translate(-4%, 7%) rotate(-6deg) scale(.97); }
}
@keyframes glow-b {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1.02); }
  50%  { transform: translate(-7%, -3%) rotate(-10deg) scale(.96); }
  100% { transform: translate(5%, -6%) rotate(6deg) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .app::before, .app::after { animation: none; } }

/* The sidebar's head: the hide button where the small orb was, then the name. */
.sidebar-head { gap: 6px; padding-left: 8px; }

/* Type: Inter (with optical sizes, so headings and small labels each get their own cut) for text,
   JetBrains Mono for code. Served from here: the site's CSP only allows its own fonts. */
@font-face { font-family: "Inter Var"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(vendor/fonts/inter-latin-opsz-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter Var"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(vendor/fonts/inter-latin-ext-opsz-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Var"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(vendor/fonts/inter-latin-opsz-italic.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter Var"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(vendor/fonts/inter-latin-ext-opsz-italic.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono Var"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(vendor/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono Var"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(vendor/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
:root {
  --ui: "Inter Var", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono Var", "Cascadia Mono", ui-monospace, Consolas, monospace;
}
body {
  font-optical-sizing: auto;
  /* cv11: single-storey a; ss03: rounder quotes and commas; cv05: lowercase l with a tail */
  font-feature-settings: "cv11", "ss03", "cv05";
  letter-spacing: -0.006em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, .intro h1, .lock-card h1 { letter-spacing: -0.022em; font-weight: 650; }
.brand-name { letter-spacing: -0.012em; font-weight: 620; }
.md { line-height: 1.65; }
code, pre, .md code { font-variant-ligatures: none; }

/* The wordmark: ILYRA in white, RESEARCH in the purple, as one word. */
.wm-ilyra { color: #fff; }
.wm-research { color: var(--accent); }
