*{box-sizing:border-box} :root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#183235;background:#f6f8f7;font-size:14px;--accent:#087b74;--line:#dbe5e2;--muted:#647977}body{margin:0}button,input,textarea,select{font:inherit}button{border:1px solid transparent;background:var(--accent);color:#fff;border-radius:9px;padding:11px 16px;font-weight:600;cursor:pointer}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:not-allowed}button.secondary{background:white;color:#225956;border-color:#c6d9d4}button.text-button{background:transparent;color:var(--accent);padding:7px 2px;font-weight:500}.wide{width:100%}input,textarea,select{width:100%;border:1px solid #c6d6d2;border-radius:8px;background:#fff;color:#183235;padding:10px;outline-offset:3px}textarea{resize:vertical;line-height:1.55}input[type=checkbox]{width:auto;accent-color:var(--accent)}input[type=number]{max-width:72px}label{display:block;margin:12px 0 6px;font-size:13px;font-weight:600}small,.muted{color:var(--muted);font-size:12px;line-height:1.5}.preview{padding:9px 24px;background:#163c3b;color:#d5e9e5;font-size:10px;letter-spacing:1.5px;font-weight:700}.preview span{font-weight:400;letter-spacing:.3px;margin-left:14px}#status{padding:8px 24px;min-height:35px;background:#eaf3ef;font-size:12px;color:#2b625b}#status.error{background:#fff0e9;color:#9b3d22}.entry{max-width:520px;margin:7vh auto;padding:24px;text-align:center}.brandmark{display:inline-grid;place-items:center;width:52px;height:52px;background:#0b746e;color:#fff;border-radius:16px;font-size:29px;font-weight:650}.brandmark.small{width:38px;height:38px;font-size:24px;border-radius:12px}.eyebrow{font-size:10px;color:var(--muted);font-weight:700;letter-spacing:1.7px;margin:20px 0 10px}h1{font-size:32px;font-weight:600;letter-spacing:-1px;margin:12px 0}h2{font-size:20px;font-weight:600;letter-spacing:-.5px}.intro{color:var(--muted);font-size:16px;line-height:1.7}.auth-card{background:white;border:1px solid var(--line);border-radius:16px;padding:20px 24px;margin-top:28px;text-align:left;box-shadow:0 6px 24px #163c3b05}.auth-card .row{margin-top:18px}.entry-note{font-size:12px;color:var(--muted);margin-top:28px;line-height:1.6}.row{display:flex;gap:10px;align-items:center}.wrap{flex-wrap:wrap}.spread{justify-content:space-between}.workspace{display:grid;grid-template-columns:220px minmax(300px,1fr) 320px;min-height:calc(100vh - 68px)}.sidebar{padding:26px 18px;background:#edf2ef;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:12px}.wordmark{display:flex;gap:10px;align-items:center;font-weight:650;font-size:19px;margin-bottom:17px}.wordmark small{display:block;font-size:11px;font-weight:400;margin-top:3px}.sidebar nav{max-height:60vh;overflow:auto}.sidebar nav button{display:block;width:100%;text-align:left;font-size:12px;font-weight:400;background:transparent;color:#526b66;border-radius:7px;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar nav button[aria-current=true]{background:#dce9e3;color:#174d44;font-weight:600}.account{margin-top:auto;padding-top:22px;border-top:1px solid var(--line);display:flex;flex-direction:column;align-items:flex-start;gap:5px}.account span{font-size:12px;overflow-wrap:anywhere}.chat{min-width:0;background:#fff;display:flex;flex-direction:column;padding:26px clamp(18px,3vw,48px) 14px}.chat-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:22px;border-bottom:1px solid #edf1ef;gap:18px}.chat-header .eyebrow{margin:0 0 6px}.chat-header h1{font-size:24px;margin:0}.language-label{font-weight:400;margin:0;font-size:11px;color:var(--muted);max-width:190px}.language-label select{margin-top:5px;font-size:12px;padding:8px}.messages{flex:1;min-height:270px;max-height:55vh;overflow:auto;padding:24px 2px 18px;scrollbar-width:thin}.welcome{text-align:center;max-width:420px;margin:35px auto;color:var(--muted);line-height:1.6}.welcome .brandmark{width:43px;height:43px;font-size:26px;background:#e1efe9;color:var(--accent)}.welcome h2{color:#264c45}.message{margin:0 0 26px}.message .author{font-size:11px;font-weight:700;color:#51736d;margin-bottom:9px}.message.user .text{background:#edf5f0;border-radius:12px;padding:13px 16px}.message .text,.result-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;font-size:14px}.message[dir=rtl] .text{text-align:right}.message .actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:9px}.message .actions button{font-size:12px;padding:4px 0}.sources{border-left:2px solid #c7ddd4;padding-left:12px;margin-top:14px;font-size:12px;color:var(--muted)}.sources a{color:var(--accent);text-decoration:none}.sources p{margin:8px 0;line-height:1.6}.composer{background:#fafcfb;border:1px solid #d3e1db;border-radius:15px;padding:16px;margin-top:10px;box-shadow:0 6px 20px #1a574606}.composer>label{margin-top:0}.composer textarea{background:#fff;border-color:#d9e3df;min-height:86px}.composer>.row{margin-top:10px}.composer .check{font-size:12px;line-height:1.4}.check{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:400}.check small{display:block;font-size:10px}.composer-note{font-size:10px;color:var(--muted);margin:12px 0 0}.work-controls{display:flex;align-items:center;gap:10px;min-height:48px}.tools{padding:22px 18px;border-left:1px solid var(--line);background:#f8faf8;overflow-wrap:anywhere}.tools>h2{margin:5px 0 20px;font-size:17px}.tools details{border-top:1px solid var(--line);padding:15px 0}.tools summary{font-weight:600;font-size:13px;cursor:pointer;list-style-position:outside;margin-left:13px}.tools details p{font-size:12px;line-height:1.6}.tools form{padding-top:5px}.tools button{font-size:12px}.tools select,.tools input,.tools textarea{font-size:12px}.tools .upload{background:white;padding:12px;border:1px dashed #97b9ad;border-radius:10px;color:#256659}.upload input{border:0;background:none;font-size:11px;padding:8px 0 0}.file-row{padding:9px 0;border-bottom:1px solid #e3eae6;font-size:12px}.file-row label{display:flex;gap:8px;align-items:flex-start;font-size:12px;margin:3px 0;font-weight:500}.file-row small{font-size:10px}.file-list:empty::after{content:'No files added yet.';display:block;color:var(--muted);font-size:12px;margin:16px 0}.tools fieldset{border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin:12px 0;display:flex;flex-wrap:wrap;gap:7px 12px}.tools fieldset label{font-size:11px;margin:0;display:flex;gap:4px;align-items:center;font-weight:400}.tools legend{font-size:11px;color:var(--muted)}.tools-foot{font-size:10px;color:var(--muted);line-height:1.6}.task-button{width:100%;border:0;border-bottom:1px solid var(--line);background:none;color:#365d53;text-align:left;font-weight:400;padding:10px 0;font-size:12px}.task-button small{display:block;font-size:10px}.memory-note{border-left:2px solid #b5d1c2;padding-left:9px;font-size:12px;white-space:pre-wrap}dialog{border:1px solid var(--line);border-radius:16px;padding:24px;max-width:740px;width:90vw;max-height:85vh;color:#183235;box-shadow:0 20px 60px #13342d26}dialog::backdrop{background:#102d2c55}dialog header{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:16px}dialog h2{margin:0}audio{width:100%;height:40px;margin-top:12px}.downloads{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.downloads a{color:var(--accent);background:#edf6f0;padding:10px 15px;border-radius:8px;text-decoration:none;font-size:12px}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #62ac91;outline-offset:3px}[hidden]{display:none!important}
@media(min-width:1600px){.workspace{grid-template-columns:245px minmax(300px,1fr) 365px}.chat{padding-left:6vw;padding-right:6vw}}@media(max-width:1120px){.workspace{grid-template-columns:185px minmax(300px,1fr)}.tools{grid-column:1/-1;border-top:1px solid var(--line);display:block;padding:20px 6vw}.tools details{max-width:750px;margin:auto}.tools>h2,.tools-foot{max-width:750px;margin:15px auto}.chat{padding:24px}.messages{max-height:56vh}}@media(max-width:640px){.workspace{display:block}.sidebar{padding:16px;display:grid;grid-template-columns:1fr 1fr;border-right:0}.wordmark{margin:0}.sidebar>.eyebrow{display:none}.sidebar nav{grid-column:1/-1;max-height:105px}.account{margin:0;padding:8px 0 0;grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}.chat{padding:20px 16px}.chat-header{gap:8px}.language-label{max-width:155px}.messages{max-height:52vh}.composer>.spread{flex-wrap:wrap}.preview{padding:9px 16px;font-size:9px}#status{padding:8px 16px}.entry{margin:3vh auto}.tools{padding:20px 16px}}

.audio-import{font-size:11px;color:var(--muted);margin-top:10px}.audio-import summary{cursor:pointer}.audio-import input{font-size:11px}.chat-header>div{min-width:0}.chat-header h1{font-size:20px;line-height:1.35;overflow-wrap:anywhere}.language-label{flex-shrink:0}

/* Shared Visenious website palette, from its supplied globals.css.
   Keep the existing chat layout; all assets and fonts remain local. */
:root {
  color-scheme: dark;
  --ink: #030a1c;
  --field: #071432;
  --near: #0c1d45;
  --royal: #0050d8;
  --royal-hi: #2a6ff5;
  --cyan: #00f0f8;
  --mist: #eaf1ff;
  --haze: #8fa3cc;
  --line: #bfd4ff1f;
  --accent: var(--cyan);
  --muted: #a6b7d8;
  color: var(--mist);
  background: var(--ink);
}
body { background: var(--ink); color: var(--mist); }
button {
  color: #fff;
  background: linear-gradient(180deg, var(--royal-hi), var(--royal));
  border-color: #689bff42;
  box-shadow: inset 0 1px 0 #ffffff20, 0 5px 22px #0050d822;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { box-shadow: none; }
button.secondary { background: #10244a; color: var(--mist); border-color: #bfd4ff33; }
button.text-button { background: transparent; color: var(--cyan); box-shadow: none; border-color: transparent; }
input, textarea, select, .composer textarea { background: #071432; color: var(--mist); border-color: #bfd4ff38; }
input::placeholder, textarea::placeholder { color: #97acd1; opacity: 1; }
input[type=checkbox] { accent-color: var(--royal-hi); }
select option { background: var(--field); color: var(--mist); }
.preview { background: #071432; color: #c6dbff; border-bottom: 1px solid var(--line); }
.preview span { color: #a6b7d8; }
#status { background: #0a1934; color: #a6d5f4; }
#status.error { background: #321824; color: #ffb4a9; }
.entry { background: radial-gradient(ellipse at top, #0050d826, transparent 70%); }
.brandmark, .brandmark.small { background: linear-gradient(145deg, #2a6ff5, #002860); color: #fff; box-shadow: inset 0 1px 0 #ffffff30, 0 5px 24px #0050d833; }
.eyebrow { color: #8fa3cc; }
.auth-card { background: linear-gradient(145deg, #10244a, #071432); box-shadow: 0 12px 40px #00071459; }
.sidebar { background: linear-gradient(180deg, #09152c, #050e21); }
.sidebar nav button { background: transparent; color: #b3c4e3; box-shadow: none; border-color: transparent; }
.sidebar nav button:hover { background: #10244a; }
.sidebar nav button[aria-current=true] { background: #142c55; color: #eaf1ff; border-color: #2a6ff550; }
.chat {
  background-color: var(--ink);
  background-image: radial-gradient(ellipse at 80% 0%, #0050d81c, transparent 60%), linear-gradient(#bfd4ff06 1px, transparent 1px), linear-gradient(90deg, #bfd4ff06 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}
.chat-header { border-color: var(--line); }
.welcome .brandmark { background: #10244a; color: var(--cyan); }
.welcome h2 { color: var(--mist); }
.messages { scrollbar-color: #24416c transparent; }
.message .author { color: #8cb4f7; }
.message.user .text { background: #0e2242; border: 1px solid #bfd4ff14; }
.sources { border-color: #2a6ff577; }
.composer { background: linear-gradient(145deg, #102242f5, #09162ff5); border-color: #bfd4ff33; box-shadow: 0 12px 40px #00071459, inset 0 1px 0 #eaf1ff0d; }
.composer:focus-within { border-color: #00f0f880; }
.tools { background: linear-gradient(180deg, #08162f, #050e21); }
.tools .upload { background: #0c1d3b; border-color: #5988bd; color: #c6dbff; }
.upload input { background: none; }
.file-row { border-color: var(--line); }
.task-button { background: none; border-color: var(--line); color: #b6c9e9; box-shadow: none; }
.memory-note { border-color: #2a6ff577; }
dialog { background: #091831; color: var(--mist); box-shadow: 0 20px 60px #000714aa; }
dialog::backdrop { background: #000714b8; }
.downloads a { background: #10244a; color: var(--cyan); }
audio { color-scheme: dark; }
.microphone-button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
button.microphone-button.secondary { border-color: #00f0f866; color: #b9faff; background: #0b2945; }
.microphone-button svg { flex: none; color: var(--cyan); }
a { color: var(--cyan); }
::selection { background: var(--royal); color: var(--mist); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media(min-width:1121px){.workspace{height:calc(100dvh - 68px);min-height:0}.sidebar,.chat,.tools{min-height:0}.sidebar nav{flex:1;min-height:0;max-height:none}.tools{overflow-y:auto}.chat{padding-top:20px}.messages{min-height:100px;max-height:none}.chat-header{padding-bottom:14px}.composer{padding:12px}.composer textarea{min-height:72px}.work-controls{min-height:38px}}

/* Visenious.ai: quiet, fixed artwork. UI and company profile retain their theme. */
body[data-site="visenious_ai"] { isolation: isolate; background: var(--ink); }
.genie-backdrop {
  position: fixed;
  inset: 68px 0 0;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  /* Fit by height, never cover: leave room above the turban on wide screens. */
  background: url('/assets/genie-background-v1.png') right bottom / auto 85% no-repeat;
  opacity: .24;
}
body[data-site="visenious_ai"] .chat { background: transparent; }
body[data-site="visenious_ai"] .auth-card { background: linear-gradient(145deg, #10244af5, #071432f5); }
@media (min-width:1121px) {
  body[data-site="visenious_ai"]:has(#app:not([hidden])) .genie-backdrop {
    left: 220px;
    right: 320px;
  }
}
@media (max-width:1120px) {
  .genie-backdrop { opacity: .18; }
}
@media (max-width:640px) {
  /* The dark artwork needs more presence on small screens. Keep the whole
     head inside the viewport and above the sign-in/composer panels. */
  .genie-backdrop {
    opacity: .46;
    filter: brightness(1.15);
    background-position: right top;
  }
}
@media (min-width:1600px) {
  body[data-site="visenious_ai"]:has(#app:not([hidden])) .genie-backdrop { left: 245px; right: 365px; }
}
@media (prefers-contrast: more), (forced-colors: active), print {
  .genie-backdrop { display: none; }
}
