/* Color and spacing tokens keep the OS independent of CDN availability. */
:root {
  --base: #0f1214; --surface: #151a1d; --raised: #1c2226;
  --line: #2a3237; --text: #dce5e0; --muted: #87958f;
  --cyber: #6ee7b7; --neon: #f2c46d; --alert: #f07282;
  --display: 'Bahnschrift', 'DIN Condensed', sans-serif;
  --mono: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'Consolas', 'Menlo', monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html { background: var(--base); }
body { margin: 0; color: var(--text); font: 15px var(--display); background: var(--base); }
/* A pointer-transparent CRT layer never blocks controls or changes text contrast. */
body::after { content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .05; background: repeating-linear-gradient(transparent 0 3px, #000 3px 4px); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, textarea { min-width: 0; color: var(--text); }
input::placeholder, textarea::placeholder { color: #747e80; opacity: 1; }
:focus-visible { outline: 2px solid var(--cyber); outline-offset: 4px; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, p { margin: 0; }
.flex { display: flex; } .grid { display: grid; }
.flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.mono, .eyebrow, .metric-label, .role-label { font-family: var(--mono); }
.muted { color: var(--muted); } .neon { color: var(--neon); } .cyber { color: var(--cyber); }
.eyebrow { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 12px; }
.tiny-rule { display: inline-block; width: 24px; height: 2px; background: var(--cyber); flex: none; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 120; padding: 12px; background: var(--neon); color: var(--base); }
.skip-link:focus { top: 12px; }
.login-screen { min-height: 100vh; min-height: 100dvh; background-image: linear-gradient(#272a2b26 1px, transparent 1px), linear-gradient(90deg, #272a2b26 1px, transparent 1px); background-size: 48px 48px; }
.login-masthead, .login-footer { padding: 24px 40px; font: 11px var(--mono); }
.login-masthead { border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--neon); }
.wordmark svg { width: 22px; height: 22px; }
.signal-mark { display: inline-block; margin-left: 12px; width: 7px; height: 7px; background: var(--cyber); }
.login-grid { flex: 1; width: 100%; max-width: 1280px; margin: auto; padding: 64px 48px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr); gap: 80px; align-items: center; }
.login-visual { min-width: 0; }
.login-visual h1 { font: 700 72px var(--display); color: var(--neon); line-height: 1.04; margin-top: 20px; }
.brand-subline { margin-top: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font: 12px var(--mono); gap: 12px; }
.graph-host { height: 260px; width: 100%; position: relative; }
canvas { display: block; width: 100%; height: 100%; }
.visual-baseline { color: var(--muted); font: 10px var(--mono); border-top: 1px solid var(--line); padding-top: 16px; gap: 10px; }
.login-console { border-top: 2px solid var(--neon); min-width: 0; padding-top: 16px; }
.section-index { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.section-index svg { color: var(--neon); }
.login-console h2 { margin: 28px 0; font-size: 27px; font-weight: 500; }
#login-form { gap: 12px; }
#login-form label { font: 10px var(--mono); color: var(--muted); margin-top: 6px; }
.input-shell { gap: 12px; border: 1px solid var(--line); background: #101112b3; padding: 0 15px; min-height: 52px; transition: border-color .2s, box-shadow .2s; }
.input-shell:focus-within { border-color: var(--cyber); box-shadow: 0 0 0 1px #6ee7b726; }
.input-shell svg { color: var(--muted); width: 17px; }
.input-shell input { border: 0; outline: 0; background: transparent; width: 100%; padding: 15px 0; font: 14px var(--mono); }
.primary-button { min-height: 52px; margin-top: 14px; border: 1px solid var(--neon); background: var(--neon); padding: 0 18px; color: var(--base); font: 700 12px var(--mono); }
.primary-button:hover:not(:disabled) { background: #f6d48f; box-shadow: 0 0 24px #f2c46d26; }
.feedback { min-height: 24px; font: 12px/1.6 var(--mono); overflow-wrap: anywhere; color: var(--muted); }
.feedback.error { color: #f59aa5; }
.auth-warning { gap: 9px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; font: 9px/1.7 var(--mono); }
.auth-warning svg { color: var(--cyber); width: 16px; }
.login-footer { border-top: 1px solid var(--line); color: var(--muted); gap: 16px; }
.cross-mark { color: var(--neon); margin-left: 16px; font-size: 18px; }
/* Keep clone layers clipped: glitches cannot stretch the viewport. */
.glitch-text { position: relative; isolation: isolate; }
.glitch-text::before, .glitch-text::after { content: attr(data-text) / ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.glitch-text::before { color: var(--cyber); animation: glitch-text 9s infinite; }
.glitch-text::after { color: var(--alert); animation: glitch-text 9s .08s infinite reverse; }
@keyframes glitch-text { 0%, 91%, 97%, 100% { opacity: 0; transform: none; } 92% { opacity: .8; clip-path: inset(22% 0 62%); transform: translateX(-3px); } 94% { opacity: .7; clip-path: inset(68% 0 12%); transform: translateX(3px); } 96% { opacity: .5; clip-path: inset(44% 0 40%); transform: translateX(-2px); } }
.os-screen { height: 100vh; height: 100dvh; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; animation: screen-appear .45s var(--ease); }
.conversation-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 0; }
.conversation-workspace { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.conversation-sidebar { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); background: #151819; padding: 18px 12px; }
.sidebar-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.sidebar-heading h2 { flex: 1; min-width: 0; font: 11px var(--mono); color: var(--muted); }
.conversation-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.conversation-row { display: flex; min-width: 0; align-items: center; gap: 2px; border-left: 2px solid transparent; }
.conversation-row.active { background: #6ee7b70d; border-color: var(--cyber); }
.conversation-select { flex: 1; min-width: 0; text-align: left; padding: 10px 8px; color: var(--text); }
.conversation-select span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.conversation-select time { font: 9px var(--mono); color: var(--muted); }
.conversation-queue { display: block; font: 9px/1.6 var(--mono); color: var(--cyber); overflow-wrap: anywhere; }
.conversation-row .icon-button { width: 26px; height: 30px; border-color: transparent; }
.conversation-row .icon-button svg { width: 14px; height: 14px; }
.discussion-heading { display: flex; align-items: center; gap: 14px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: #12171a; min-width: 0; }
.discussion-heading h2 { min-width: 0; color: var(--muted); font: 13px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discussion-heading h2::before { content: '~/' / ''; color: var(--cyber); }
.window-dots { display: inline-flex; gap: 6px; flex: none; }
.window-dots span { width: 9px; height: 9px; border-radius: 50%; background: #f0728299; }
.window-dots span:nth-child(2) { background: #f2c46d99; } .window-dots span:nth-child(3) { background: #6ee7b799; }
.older-messages { display: flex; align-items: center; gap: 8px; margin: 0 auto 24px; font: 11px var(--mono); color: var(--muted); }
.older-messages svg { width: 16px; height: 16px; }
.conversation-dialog { width: min(440px, calc(100% - 32px)); margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--raised); }
.conversation-dialog::backdrop { background: #000a; }
.conversation-dialog label { display: block; font: 10px var(--mono); color: var(--muted); margin-bottom: 8px; }
.conversation-dialog input { width: 100%; padding: 10px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--base); color: var(--text); }
#discussion-toggle, #discussion-close { display: none; }
@media (max-width: 760px) {
  .conversation-layout { grid-template-columns: minmax(0, 1fr); }
  .conversation-sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(300px, 85%); z-index: 31; }
  .conversation-sidebar.is-open { display: block; }
  .discussion-backdrop { position: fixed; inset: 0; z-index: 30; background: #000a; border: 0; }
  #discussion-toggle, #discussion-close { display: inline-flex; }
  .discussion-heading { padding: 10px 20px; }
}
@keyframes screen-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.os-header { gap: 32px; min-width: 0; padding: 20px 32px; border-bottom: 1px solid var(--line); background: #121415; }
.os-brand { gap: 12px; flex: 1; min-width: 180px; }
.os-brand > svg { color: var(--neon); width: 32px; height: 32px; }
.os-brand h1 { font-size: 24px; line-height: 1.1; font-weight: 700; }
.os-brand .mono { font-size: 10px; }
.session-metrics { gap: 30px; min-width: 0; }
.metric { display: flex; flex-direction: column; gap: 5px; min-width: 75px; max-width: 165px; }
.metric-label { font-size: 9px; color: var(--muted); }
.metric strong { font: 14px var(--mono); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.role-label { font-size: 9px; color: var(--cyber); }
.header-actions { gap: 8px; }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; }
button { transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s; }
.icon-button:hover:not(:disabled), .cyber-button { color: var(--cyber); border-color: var(--cyber); }
.icon-button:hover:not(:disabled) { box-shadow: 0 0 18px #6ee7b720; background: #6ee7b70d; }
.icon-button::after { content: attr(data-tooltip) / ''; position: absolute; bottom: calc(100% + 9px); right: 0; width: max-content; max-width: min(280px, calc(100vw - 32px)); padding: 6px 9px; background: var(--raised); border: 1px solid var(--line); color: var(--text); font: 10px/1.5 var(--mono); white-space: normal; overflow-wrap: anywhere; pointer-events: none; opacity: 0; z-index: 12; }
.icon-button[data-tooltip]:hover::after, .icon-button[data-tooltip]:focus-visible::after { opacity: 1; }
.os-header .icon-button::after { bottom: auto; top: calc(100% + 9px); }
.chat-viewport { overflow: auto; min-height: 0; scrollbar-color: #3a4449 var(--base); scrollbar-width: thin; background: radial-gradient(ellipse at 50% 0, #6ee7b70a, transparent 60%), var(--base); }
.chat-inner { width: 100%; max-width: 1000px; margin: auto; padding: 36px 40px 24px; }
.channel-intro { margin-bottom: 36px; }
.boot-lines { list-style: none; margin: 0; padding: 0; font: 13px/1.9 var(--mono); }
.boot-line { display: flex; align-items: baseline; gap: 1ch; }
.boot-line::before { content: '\203A' / ''; color: var(--cyber); flex: none; }
.boot-line > span:first-child { min-width: 0; }
.boot-dots { flex: 1; min-width: 3ch; overflow: hidden; white-space: nowrap; color: #4a5752; }
.boot-dots::before { content: '................................................................................................................' / ''; }
.boot-ok { flex: none; color: var(--cyber); font-weight: 600; }
.boot-seal { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border: 1px solid #6ee7b74d; border-radius: 999px; background: #6ee7b70f; color: var(--cyber); font: 12px var(--mono); }
.boot-line:nth-child(1) { --delay: .2s; } .boot-line:nth-child(2) { --delay: .9s; } .boot-seal { --delay: 1.6s; }
.channel-intro.is-booting .boot-line, .channel-intro.is-booting .boot-seal { animation: boot-in .25s steps(2) var(--delay) both; }
.channel-intro.is-booting .boot-dots::before { animation: boot-dots .45s steps(10) calc(var(--delay) + .1s) both; }
.channel-intro.is-booting .boot-ok { animation: boot-in .15s steps(1) calc(var(--delay) + .55s) both; }
@keyframes boot-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes boot-dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.channel-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cyber); box-shadow: 0 0 8px var(--cyber); animation: channel-pulse 2.4s ease-in-out infinite; }
@keyframes channel-pulse { 50% { opacity: .35; } }
.channel-state { display: inline-flex; align-items: center; gap: 7px; color: var(--cyber); }
.welcome { padding: 32px 0; text-align: center; }
.welcome-index { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 10px; color: var(--muted); }
.welcome h2 { font-size: 38px; font-weight: 500; margin-top: 20px; }
.welcome-graph { max-width: 500px; margin: 12px auto; height: 180px; }
.quick-actions { gap: 12px; justify-content: center; margin-top: 8px; }
.quick-action { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); color: #c4cdcb; background: #17191acc; font-size: 13px; padding: 12px 16px; border-radius: 2px; }
.quick-action svg { width: 16px; color: var(--cyber); }
.quick-action:hover { border-color: var(--cyber); background: #6ee7b70d; }
.message { position: relative; padding: 4px 0 4px 18px; margin: 0 0 30px; border-left: 1px solid var(--line); min-width: 0; animation: message-appear .4s var(--ease) both; }
.message.assistant { border-color: #6ee7b740; } .message.error { border-color: var(--alert); }
.message-header { display: flex; align-items: center; gap: 8px; font: 11px var(--mono); color: var(--muted); margin-bottom: 8px; }
.prompt-mark { color: var(--neon); flex: none; }
.message.assistant .prompt-mark, .message.assistant .message-author { color: var(--cyber); }
.message.error .prompt-mark, .message.error .message-author { color: var(--alert); }
.message-author { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-time { margin-left: auto; color: var(--muted); }
.message-content { white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.75 var(--mono); }
.message.user .message-content { color: #c3cec8; }
.message.assistant .message-content { text-shadow: 0 0 14px #6ee7b712; }
.message.error .message-content { color: #f59aa5; }
.message-content.is-typing { cursor: pointer; }
.message-content.is-typing::after { content: ''; display: inline-block; margin-left: 2px; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--cyber); animation: caret-blink 1s steps(2) infinite; }
.message-tools { display: flex; gap: 8px; margin-top: 12px; }
.message-tools .icon-button { width: 30px; height: 30px; border-color: transparent; }
.message-tools svg { width: 15px; height: 15px; }
.message-tools .icon-button::after { left: 0; right: auto; }
@keyframes message-appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes caret-blink { to { opacity: 0; } }
.job-panel { max-width: 560px; margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #12171a; font: 13px/1.7 var(--mono); }
.job-title { display: flex; justify-content: space-between; gap: 12px; color: var(--cyber); font-weight: 600; }
.job-badge { color: var(--muted); font-weight: 400; flex: none; }
.job-panel[data-status="running"] .job-badge { color: var(--neon); }
.job-panel[data-status="succeeded"] .job-badge { color: var(--cyber); }
.job-panel[data-status="failed"] .job-badge { color: var(--alert); }
.job-prompt { margin: 6px 0 10px; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.job-prompt::before { content: '\203A  ' / ''; color: var(--neon); }
.job-steps { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.job-step { display: flex; flex-wrap: wrap; gap: 0 10px; color: #5c6965; }
.job-mark { width: 1ch; flex: none; }
.job-step[data-phase="done"] { color: var(--text); } .job-step[data-phase="done"] .job-mark { color: var(--cyber); }
.job-step[data-phase="active"] { color: var(--neon); } .job-step[data-phase="active"] .job-mark { animation: caret-blink 1s steps(2) infinite; }
.job-step[data-phase="stopped"] { color: var(--alert); }
.job-bar { white-space: pre; color: var(--cyber); }
.message-content.job-note { font: 12px/1.7 var(--mono); color: var(--muted); text-shadow: none; }
.message-content.job-note:empty { display: none; }
.compare-label { margin-top: 10px; color: var(--neon); font: 11px var(--mono); }
.compare-button[aria-pressed="true"] { color: var(--neon); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.routing-row { gap: 10px; color: var(--cyber); font: 10px var(--mono); padding: 8px 0 22px 22px; }
.routing-row > svg { width: 16px; height: 16px; }
.routing-row { flex-wrap: wrap; }
.routing-row > span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
.queue-message .message-content { font-size: 13px; color: var(--muted); }
.queue-message .message-content:empty { display: none; }
.queue-message.is-streaming .message-content { font-size: 15px; color: var(--text); }
.queue-message.is-streaming .message-content::after { content: ''; display: inline-block; margin-left: 2px; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--cyber); animation: caret-blink 1s steps(2) infinite; }
.queue-message .typing-indicator { margin-top: 12px; }
.activity-list { display: grid; gap: 3px; margin: 0 0 12px; padding: 0; list-style: none; font: 12px/1.6 var(--mono); }
.activity-list:empty { display: none; }
.activity-step { display: flex; gap: 10px; color: var(--muted); overflow-wrap: anywhere; animation: activity-in .25s var(--ease) both; }
.activity-mark { width: 1ch; flex: none; }
.activity-step[data-state="done"] .activity-mark { color: var(--cyber); }
.activity-step[data-state="active"] { color: var(--neon); }
.activity-step[data-state="active"] .activity-mark { animation: caret-blink 1s steps(2) infinite; }
.activity-step[data-state="skipped"] { color: #5c6965; }
@keyframes activity-in { from { opacity: 0; transform: translateY(-3px); } }
.activity-details { margin-bottom: 10px; font: 12px/1.6 var(--mono); }
.activity-summary { color: var(--muted); cursor: pointer; width: fit-content; }
.activity-summary:hover, .activity-details[open] .activity-summary { color: var(--cyber); }
.activity-details .activity-list { margin: 8px 0 4px; padding-left: 2px; }
.activity-details .activity-step { animation: none; }
@media (prefers-reduced-motion: reduce) { .activity-step { animation: none; } }
.typing-indicator { display: inline-flex; gap: 4px; height: 16px; align-items: center; padding-left: 4px; }
.typing-indicator span { width: 6px; height: 11px; background: var(--cyber); border-radius: 1px; animation: typing-indicator 1.2s steps(2) infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .2s; } .typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-indicator { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.composer-footer { border-top: 1px solid var(--line); background: #11161a; }
.composer-inner { max-width: 1000px; padding: 16px 40px 12px; margin: auto; }
.composer { gap: 12px; border: 1px solid var(--line); background: #12171a; padding: 10px 12px; border-radius: 6px; transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #6ee7b780; box-shadow: 0 0 0 3px #6ee7b714, 0 0 24px #6ee7b70f; }
.composer-prompt { align-self: center; flex: none; color: var(--cyber); font: 600 16px var(--mono); }
.composer textarea { min-width: 0; }
.composer > .icon-button { flex-shrink: 0; }
.attachment-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; min-width: 0; }
.attachment-preview img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.attachment-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px var(--mono); min-width: 0; }
.attachment-preview button { flex-shrink: 0; }
.attachment-preview .quick-actions { margin: 0 0 0 auto; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.quick-button { font: 10px var(--mono); padding: 5px 9px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
.quick-button:hover:not(:disabled), .quick-button:focus-visible { color: var(--cyber); border-color: var(--cyber); }
.quick-button:disabled { opacity: .5; cursor: default; }
.message-image { display: block; width: auto; max-width: 100%; max-height: 480px; object-fit: contain; margin: 12px 0; border: 1px solid var(--line); border-radius: 6px; }
.generated-media { width: 100%; aspect-ratio: 1; background: #12171a; }
video.generated-media { aspect-ratio: 16 / 9; }
.media-progress { display: block; width: min(100%, 320px); height: 6px; margin: 16px 0; accent-color: var(--accent); }
.media-shield { position: relative; width: fit-content; max-width: 100%; overflow: hidden; border-radius: 4px; }
.media-shield.wide-media { width: 100%; }
.media-shield.is-blurred > img, .media-shield.is-blurred > video { filter: blur(28px); opacity: .35; pointer-events: none; }
.media-shield > .media-reveal { position: absolute; top: 12px; right: 12px; background: #101213; }
.media-shield.is-blurred > .media-reveal { inset: 0; width: 100%; height: 100%; border: 0; background: #10121366; }
.media-shield > img { cursor: pointer; }
.attachment-preview .media-shield { width: 64px; height: 64px; flex-shrink: 0; }
.chat-viewport.drop-active { outline: 2px solid var(--cyber); outline-offset: -4px; }
.composer textarea { width: 100%; resize: none; min-height: 56px; max-height: 160px; background: transparent; border: 0; outline: none; padding: 6px 4px; font: 15px/1.6 var(--mono); caret-color: var(--cyber); }
.send-button { background: var(--cyber); color: var(--base); border-color: var(--cyber); border-radius: 4px; width: 42px; height: 42px; }
.send-button:hover:not(:disabled) { background: #93efc9; color: var(--base); border-color: var(--cyber); box-shadow: 0 0 20px #6ee7b726; }
.send-button.is-busy > svg, .is-busy > svg { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer-meta { gap: 20px; padding-top: 9px; font: 9px/1.7 var(--mono); color: var(--muted); }
#request-status { overflow-wrap: anywhere; }
.composer-meta > .mono { flex: none; }
.admin-dialog { width: min(920px, calc(100% - 40px)); max-width: none; padding: 0; background: #171a1bf5; color: var(--text); border: 1px solid #556061; border-top: 2px solid var(--cyber); border-radius: 2px; max-height: calc(100dvh - 56px); overflow: visible; }
.admin-dialog::backdrop { background: #0009; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.admin-dialog[open] { animation: modal-appear .28s var(--ease) both; }
@keyframes modal-appear { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.admin-shell { max-height: calc(100dvh - 58px); }
.admin-header { padding: 26px 28px; gap: 16px; }
.admin-header h2 { font-size: 28px; font-weight: 500; margin-top: 8px; }
.admin-navigation { padding: 0 28px; border-bottom: 1px solid var(--line); gap: 12px; }
.admin-tabs { gap: 22px; }
.admin-tabs button { display: flex; align-items: center; gap: 9px; border: 0; border-bottom: 2px solid transparent; padding: 16px 0; color: var(--muted); background: transparent; font: 11px var(--mono); }
.admin-tabs svg { width: 16px; height: 16px; }
.admin-tabs [aria-selected="true"] { color: var(--cyber); border-bottom-color: var(--cyber); }
.admin-status { padding: 14px 28px 0; flex: none; }
.admin-body { overflow: auto; padding: 16px 28px 28px; min-height: 180px; }
.admin-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; padding: 14px 28px; }
.accounts-table { border-collapse: collapse; width: 100%; font: 12px var(--mono); }
.accounts-table th { text-align: left; color: var(--muted); font-size: 10px; font-weight: 400; padding: 0 14px 14px 0; border-bottom: 1px solid var(--line); }
.accounts-table td { padding: 18px 14px 18px 0; vertical-align: middle; border-bottom: 1px solid #303536; overflow-wrap: anywhere; }
.accounts-table td:first-child { max-width: 200px; }
.account-role, .account-media { display: block; color: var(--muted); font-size: 9px; margin-top: 6px; }
.access-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.access-tabs button { flex: 1; padding: 12px 8px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 12px var(--mono); }
.access-tabs [aria-selected="true"] { color: var(--cyber); border-bottom-color: var(--cyber); }
.data-notice { color: var(--muted); font: 11px/1.7 var(--mono); overflow-wrap: anywhere; margin: 14px 0; }
#login-form .signup-notice { display: flex; align-items: start; gap: 10px; font: 11px/1.7 var(--mono); margin-bottom: 14px; }
.signup-notice input { flex: none; margin-top: 3px; accent-color: var(--cyber); }
.sidebar-tools { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.sidebar-notice { font-size: 10px; margin-bottom: 0; }
.library-dialog, .memory-dialog { width: min(1040px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; overflow: auto; padding: 24px; color: var(--text); background: #171a1b; border: 1px solid #556061; border-top: 2px solid var(--cyber); border-radius: 2px; }
.memory-dialog { width: min(700px, calc(100% - 32px)); }
.library-dialog::backdrop, .memory-dialog::backdrop { background: #000b; }
.library-dialog .sidebar-heading, .memory-dialog .sidebar-heading { margin-bottom: 20px; }
.library-dialog h2, .memory-dialog h2, .account-inspector h3 { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 20px; }
.library-dialog label, .memory-dialog label { display: block; color: var(--muted); font: 10px var(--mono); margin: 10px 0; }
.library-dialog select, .account-inspector select { width: 100%; padding: 12px; border: 1px solid var(--line); color: var(--text); background: var(--base); font: 12px var(--mono); }
.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px 16px; margin-top: 16px; }
.library-item { min-width: 0; margin: 0; }
.library-media { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #101213; border: 1px solid var(--line); border-radius: 2px; }
video.library-media { aspect-ratio: 16 / 9; }
.library-item figcaption { display: flex; gap: 10px; align-items: start; margin: 10px 0 6px; font-size: 12px; }
.library-item figcaption span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.library-item .icon-button { flex: none; }
#memory-form { display: flex; flex-wrap: wrap; gap: 10px; }
#memory-form label { width: 100%; margin: 0; }
#memory-text { width: 100%; resize: vertical; min-height: 96px; max-height: 240px; padding: 12px; background: var(--base); color: var(--text); border: 1px solid var(--line); font: 14px/1.6 var(--mono); }
.memory-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.memory-item p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.account-inspector { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--cyber); }
.account-inspector details { margin: 16px 0; }
.account-inspector summary { cursor: pointer; color: var(--cyber); font: 12px var(--mono); }
.inspector-note { padding-top: 12px; font-size: 12px; overflow-wrap: anywhere; }
.inspector-message { padding: 20px 0; border-bottom: 1px solid var(--line); }
.inspector-message strong { color: var(--cyber); font: 11px var(--mono); }
.inspector-message p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.inspector-message .library-media { max-width: 520px; margin: 12px 0; }
.account-mobile-usage { display: none; color: var(--muted); font-size: 9px; margin-top: 8px; line-height: 1.6; }
.credit-form { display: flex; align-items: center; gap: 7px; }
.credit-form input { width: 110px; padding: 9px; background: var(--base); border: 1px solid var(--line); font: 12px var(--mono); }
.credit-form .icon-button { width: 34px; height: 34px; }
.empty-state { color: var(--muted); padding: 32px 0; font: 12px var(--mono); }
.git-item { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.git-item h3 { font: 15px var(--mono); margin: 0; color: var(--text); overflow-wrap: anywhere; }
.git-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font: 10px var(--mono); margin: 12px 0 16px; }
.git-item details { margin: 14px 0; }
.git-item summary { cursor: pointer; color: var(--cyber); font: 11px var(--mono); padding: 6px 0; }
.git-item pre { background: #101213; padding: 16px; border-left: 2px solid var(--line); font: 11px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; margin-top: 8px; }
.git-review-check { display: flex; gap: 8px; align-items: center; font: 11px var(--mono); color: var(--muted); margin: 18px 0; }
.git-review-check input { accent-color: var(--cyber); }
.git-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.action-button { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--cyber); background: #6ee7b710; color: var(--cyber); font: 11px var(--mono); }
.action-button:hover:not(:disabled) { box-shadow: 0 0 20px #6ee7b725; background: #6ee7b722; }
.action-button.danger { color: #f59aa5; border-color: #f0728280; background: #f072820a; }
.action-button.danger:hover:not(:disabled) { background: #f0728218; box-shadow: 0 0 20px #f0728220; }
.action-button svg { width: 16px; height: 16px; }
@media (max-width: 1000px) {
  .login-grid { gap: 40px; padding: 48px 32px; }
  .login-visual h1 { font-size: 56px; }
  .os-header { gap: 20px; padding: 18px 24px; }
  .session-metrics { gap: 18px; }
  .os-brand { min-width: 150px; }
  .os-brand h1 { font-size: 21px; }
}
@media (max-width: 720px) {
  .login-grid { grid-template-columns: 1fr; gap: 28px; padding: 28px 24px; max-width: 500px; }
  .login-masthead, .login-footer { padding: 18px 24px; font-size: 9px; }
  .login-visual h1 { font-size: 50px; }
  .login-visual .graph-host { height: 140px; }
  .login-console h2 { margin: 18px 0; font-size: 24px; }
  .login-visual .eyebrow { font-size: 9px; }
  .brand-subline { font-size: 9px; padding-bottom: 12px; }
  .visual-baseline { font-size: 8px; padding-top: 10px; }
  .login-footer { margin-top: 16px; }
  .os-screen .os-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 16px 20px; gap: 16px; }
  .os-header .session-metrics { grid-row: 2; grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .metric { min-width: 0; max-width: none; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .os-brand h1 { font-size: 22px; }
  .os-brand > svg { width: 26px; height: 26px; }
  .chat-inner { padding: 24px 20px 16px; }
  .welcome { padding-top: 16px; }
  .welcome h2 { font-size: 28px; }
  .welcome-graph { height: 145px; }
  .quick-actions { gap: 8px; }
  .quick-action { padding: 10px 12px; font-size: 12px; }
  .composer-inner { padding: 12px 20px 10px; }
  .composer-meta > .mono { display: none; }
  .message { padding-left: 14px; }
  .message-content { font-size: 14px; }
  .boot-lines { font-size: 12px; }
  .admin-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .admin-shell { max-height: calc(100dvh - 26px); }
  .admin-header { padding: 20px 18px; }
  .admin-header h2 { font-size: 24px; }
  .admin-navigation { padding: 0 18px; }
  .admin-status { padding: 12px 18px 0; }
  .admin-body { padding: 16px 18px 20px; }
  .admin-footer { padding: 12px 18px; font-size: 8px; }
  .accounts-table { font-size: 10px; table-layout: fixed; }
  .accounts-table th:nth-child(2), .accounts-table td:nth-child(2) { display: none; }
  .account-mobile-usage { display: block; }
  .accounts-table th, .accounts-table td { padding-right: 8px; }
  .accounts-table th:last-child, .accounts-table td:last-child { width: 135px; padding-right: 0; }
  .credit-form { gap: 5px; }
  .credit-form input { width: 92px; }
}
@media (max-width: 360px) {
  .login-visual h1 { font-size: 42px; }
  .login-masthead, .login-footer, .login-grid { padding-left: 16px; padding-right: 16px; }
  .os-screen .os-header { padding: 14px 14px; gap: 12px; }
  .os-brand { min-width: 0; gap: 8px; }
  .os-brand h1 { font-size: 18px; }
  .os-brand > svg { display: none; }
  .header-actions { gap: 6px; }
  .header-actions .icon-button { width: 32px; height: 32px; }
  .chat-inner, .composer-inner { padding-left: 14px; padding-right: 14px; }
  .welcome h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .glitch-text::before, .glitch-text::after { display: none; }
  .typing-indicator span { opacity: .8; }
}
.web-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.web-image { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.web-image .message-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; max-height: none; margin: 0; }
.web-image-source { font-size: 0.75rem; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
