@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/manrope-latin-variable.woff2?v=20261013-dark1') format('woff2');
}
:root {
    --black: #030505;
    --surface: #080d10;
    --raised: #0d151b;
    --ink: #f1f6f7;
    --muted: #9aadb8;
    --dim: #80949f;
    --line: #1b2a33;
    --blue: #0067ff;
    --cyan: #00d0cb;
    --error: #ffb8ae;
    --error-bg: #251416;
    font-family: Manrope, 'Segoe UI', ui-sans-serif, system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--black);
    color-scheme: dark;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--black); }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, input, select, textarea { outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--cyan); }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: #115768; color: #fff; }
.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; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 12px 18px; background: var(--ink); color: #030505; border-radius: 8px; }
.skip-link:focus { top: 16px; }
.app-shell { display: grid; grid-template-columns: minmax(280px, 33%) minmax(0, 1fr); min-height: 100dvh; max-width: 1800px; margin: auto; }
.brand-panel { position: relative; overflow: hidden; background: #020405; border-right: 1px solid var(--line); padding: 35px clamp(24px, 3.8vw, 64px) 36px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100dvh; isolation: isolate; }
.brand-panel::before { content: ''; position: absolute; z-index: -1; inset: 29% -40% 4%; background: radial-gradient(ellipse at 42% 69%, #003da01c, transparent 55%), radial-gradient(ellipse at 61% 44%, #008c9520, transparent 57%); pointer-events: none; }
.brand { display: inline-flex; gap: 13px; align-items: center; text-decoration: none; width: max-content; max-width: 100%; min-height: 62px; }
.brand img { display: block; width: 215px; height: 61px; object-fit: cover; object-position: center; mix-blend-mode: screen; max-width: calc(100% - 60px); }
.brand-tag { font-size: 9px; font-weight: 650; letter-spacing: 1.3px; color: #a7c0ce; border: 1px solid #264451; border-radius: 4px; padding: 4px 6px; flex: none; }
.brand-story { padding: 55px 0 28px; }
.eyebrow, .section-kicker { font-size: 10px; font-weight: 650; letter-spacing: 1.65px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: #a6bac5; }
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--cyan); flex: none; }
.brand-story h1 { font-size: clamp(36px, 3.85vw, 60px); line-height: 1.09; letter-spacing: -.058em; margin: 24px 0 21px; font-weight: 500; }
.gradient-text { color: var(--cyan); background: linear-gradient(110deg, #398bff 0%, #109deb 50%, #00d0cb 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-story p { font-size: 14px; line-height: 1.85; color: var(--muted); max-width: 315px; margin: 0; }
.brand-footer { font-size: 10px; color: #91a8b3; display: flex; align-items: center; gap: 9px; white-space: nowrap; letter-spacing: .1px; }
.small-dot { display: inline-block; width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; flex: none; box-shadow: 0 0 10px #00d0cb36; }
.story-graphic { width: 270px; height: 245px; position: relative; margin: 35px auto 0; max-width: 100%; }
.story-graphic::before { content: ''; position: absolute; inset: 10%; background: radial-gradient(ellipse, #0b657522, transparent 72%); filter: blur(16px); }
.graphic-question { position: absolute; left: 93px; top: 86px; width: 76px; height: 76px; border: 1px solid #295667; background: linear-gradient(135deg, #0b2532, #071017); border-radius: 23px; color: #50e8df; font-size: 44px; line-height: 74px; text-align: center; transform: rotate(-9deg); box-shadow: 0 12px 45px #000c, inset 0 1px 0 #54becb17; font-weight: 450; }
.graphic-orbit { position: absolute; left: 0; top: 66px; width: 270px; height: 132px; border: 1px solid #137580; border-radius: 50%; }
.orbit-one { transform: rotate(-35deg); border-color: #168b953e #218cbc8a #1649b87a #1649b846; box-shadow: 0 -1px 12px #00d0cb0c; }
.orbit-two { transform: rotate(35deg); border-color: #154a9c80 #0f627c70 #14669052 #12367080; }
.graphic-node { position: absolute; width: 8px; height: 8px; border: 2px solid #031118; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 1px #178991, 0 0 14px #00d0cb6b; }
.node-one { left: 23px; top: 79px; }
.node-two { right: 11px; top: 164px; background: #2184ff; box-shadow: 0 0 0 1px #194c92, 0 0 15px #0067ff57; }
.node-three { right: 59px; top: 51px; width: 5px; height: 5px; border: 0; box-shadow: 0 0 12px #00d0cb65; }
.main-panel { min-width: 0; display: flex; flex-direction: column; background: var(--black); }
.login-view { min-height: 100dvh; padding: 60px 38px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 38%, #071c253c, transparent 62%); }
.login-card { width: min(100%, 440px); background: linear-gradient(135deg, #0a151c, #070c10 65%); border: 1px solid #263b48; border-radius: 20px; padding: 37px; box-shadow: 0 24px 70px #0005; position: relative; }
.login-card::before { content: ''; position: absolute; top: -1px; left: 25%; right: 25%; height: 1px; background: linear-gradient(90deg, transparent, #36c6d0, transparent); }
.section-kicker { display: flex; align-items: center; gap: 8px; color: #9eb5c2; }
.login-card h2 { font-size: 32px; line-height: 1.15; letter-spacing: -1.25px; font-weight: 500; margin: 20px 0 14px; }
.intro { color: var(--muted); font-size: 13px; line-height: 1.85; margin: 0 0 28px; }
label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 9px; color: #c3d2db; }
input, select, textarea { border: 1px solid #2a3b47; border-radius: 9px; background: #070d12; color: var(--ink); width: 100%; }
input { height: 53px; padding: 0 15px; font-size: 16px; letter-spacing: 1.2px; }
input::placeholder { letter-spacing: 0; color: #8199a8; }
.field-hint { font-size: 11px; color: var(--dim); line-height: 1.7; margin: 10px 0 23px; }
.button { min-height: 44px; border: 0; border-radius: 9px; font-weight: 600; font-size: 12px; transition: background .18s, border-color .18s, color .18s; }
.button-primary { background: var(--blue); color: #fff; width: 100%; height: 51px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; box-shadow: 0 6px 25px #0067ff1a; }
.button-primary:hover:not(:disabled) { background: #075bdb; }
.button-arrow { font-size: 22px; font-weight: 400; }
.login-features { display: flex; flex-direction: column; gap: 15px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.login-features > div { display: flex; gap: 12px; align-items: center; font-size: 12px; color: #acbeca; }
.feature-number { font-size: 10px; font-weight: 600; color: #59c4d2; border: 1px solid #233b49; background: #091822; border-radius: 5px; padding: 5px; }
.privacy-note { font-size: 11px; line-height: 1.8; color: #8fa3af; width: min(100%, 425px); text-align: center; margin-top: 24px; }
.chat-view { height: 100dvh; display: flex; flex-direction: column; padding: 30px clamp(20px, 3.5vw, 52px) 17px; overflow: hidden; }
.chat-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex: none; }
.chat-header .section-kicker { color: #7ab8d1; }
.chat-header h2 { font-size: 30px; font-weight: 500; letter-spacing: -1.3px; margin: 6px 0 0; }
.header-actions { display: flex; gap: 4px; }
.button-quiet { background: transparent; color: #acbeca; padding: 0 10px; font-size: 11px; }
.button-quiet:hover:not(:disabled) { background: #0d1a23; color: #cce9f1; }
.session-bar { display: flex; flex-wrap: wrap; gap: 10px 22px; border: 1px solid #1c303b; border-radius: 9px; background: #071117; padding: 10px 13px; font-size: 10px; color: #9ab0bd; margin: 20px 0 19px; flex: none; }
.session-item { display: flex; align-items: center; gap: 6px; }
.session-item strong { font-weight: 600; color: #c1dbe8; font-variant-numeric: tabular-nums; }
.budget-item { margin-left: auto; }
.budget-item strong { color: #6cdfe0; }
.model-row { display: flex; align-items: flex-end; gap: 22px; flex: none; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.model-field { flex: 0 0 220px; }
.model-field label { font-size: 11px; margin-bottom: 7px; color: #afc4d1; }
.model-field select { height: 43px; padding: 0 30px 0 12px; background: #0a1219; font-size: 12px; text-overflow: ellipsis; }
.model-field option { color: var(--ink); background: #0a1219; }
.model-row p { font-size: 10px; line-height: 1.75; color: #8fa6b4; max-width: 265px; margin: 0 0 2px; }
.chat-scroll { flex: 1; min-height: 120px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #294451 transparent; padding: 24px 0 22px; scroll-behavior: smooth; outline-offset: 0 !important; }
.empty-chat { max-width: 540px; margin: 0 auto; text-align: center; padding: 30px 0; }
.welcome-symbol { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #102532, #071418); border: 1px solid #254a59; color: #5bdedc; font-size: 34px; line-height: 49px; margin: 0 auto 19px; box-shadow: 0 0 35px #087c9510; }
.empty-chat h3 { font-size: 25px; font-weight: 500; letter-spacing: -.8px; margin: 0 0 10px; }
.empty-chat > p { font-size: 12px; color: var(--muted); line-height: 1.75; margin: 0 0 25px; }
.example-prompts { display: grid; grid-template-columns: 1fr; gap: 9px; max-width: 475px; margin: auto; text-align: left; }
.example-prompt { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #253743; background: linear-gradient(115deg, #0b151e, #081015); border-radius: 11px; padding: 14px 16px; font-size: 12px; line-height: 1.65; color: #c0d1dc; text-align: left; min-height: 51px; transition: border-color .18s, background .18s; }
.example-prompt::after { content: '↗'; color: #51cad7; font-size: 17px; flex: none; }
.example-prompt:hover:not(:disabled) { background: linear-gradient(115deg, #10283b, #091b23); border-color: #2f7189; }
.messages { display: flex; flex-direction: column; gap: 21px; }
.message { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; max-width: 94%; }
.message-user { align-self: flex-end; align-items: flex-end; max-width: 86%; }
.message-label { font-size: 11px; letter-spacing: .2px; color: #8da8ba; display: flex; gap: 5px; align-items: center; }
.message-label .label-mark { font-size: 9px; color: #64c8dd; }
.message-body { font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; word-break: normal; }
.message-user .message-body { padding: 12px 16px; background: #0b2945; border: 1px solid #16446b; color: #e0edfa; border-radius: 15px 15px 4px 15px; }
.message-assistant .message-body, .message-tool .message-body { background: #0a1218; border: 1px solid #203440; padding: 15px 18px; border-radius: 4px 15px 15px 15px; width: 100%; }
.message-tool .message-body { color: #9ebac8; font-size: 12px; }
.pending-body { min-width: 108px; }
.typing-indicator { display: flex; align-items: center; gap: 5px; padding: 6px 0; }
.typing-indicator span { width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; animation: pulse 1.3s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .15s; }
.typing-indicator span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%,80%,100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.notice { font-size: 12px; line-height: 1.75; border: 1px solid; border-radius: 10px; padding: 12px 14px; margin-top: 16px; overflow-wrap: anywhere; }
.notice-error { color: var(--error); background: var(--error-bg); border-color: #673837; }
.notice-info { color: #a5e7ec; background: #09212a; border-color: #235464; }
.chat-notice { flex: none; margin: 0 0 12px; }
.composer { flex: none; margin-top: 4px; }
.composer-input { display: flex; align-items: flex-end; gap: 10px; background: linear-gradient(110deg, #0c171f, #081116); border: 1px solid #2b4658; border-radius: 14px; padding: 11px 11px 11px 16px; box-shadow: 0 5px 30px #0003; }
.composer-input:focus-within { border-color: #2294ac; box-shadow: 0 0 0 3px #00d0cb0a; }
.composer textarea { border: 0; outline: none !important; resize: none; padding: 2px 0; min-height: 43px; max-height: 140px; font-size: 13px; line-height: 1.7; background: transparent; }
.composer textarea::placeholder { color: #8ba2b2; }
.button-send { background: var(--blue); color: #fff; width: 43px; height: 43px; min-height: 43px; flex: none; border-radius: 10px; font-size: 25px; line-height: 1; }
.button-send:hover:not(:disabled) { background: #075bdb; }
.composer-footer { display: flex; align-items: center; gap: 10px; padding: 11px 2px 0; font-size: 10px; color: #849dac; }
.request-status { display: flex; align-items: center; gap: 6px; color: #9dc8d4; }
.status-dot { display: block; width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; flex: none; box-shadow: 0 0 9px #00d0cb32; }
.request-status.is-busy .status-dot { animation: pulse 1.3s infinite; }
.readonly-label { margin-left: auto; color: #9bb4c3; }
.composer-hint { margin-left: auto; }
.chat-footnote { font-size: 10px; line-height: 1.7; color: #859ba8; text-align: center; margin: 11px 0 0; }
.main-panel > #boot-error { margin: 30px; }
.login-card .notice { margin-bottom: 0; }
.setup { padding: 60px 30px; max-width: 680px; margin: 10vh auto; }
.setup h1 { font-weight: 500; letter-spacing: -.04em; }
.setup p { color: var(--muted); line-height: 1.8; }
@media (min-width: 1500px) {
    .brand-panel { padding-top: 42px; padding-bottom: 43px; }
    .chat-view { padding-top: 39px; }
    .empty-chat { padding-top: 50px; }
    .message-body, .composer textarea { font-size: 14px; }
}
@media (max-width: 1050px) {
    .app-shell { grid-template-columns: 270px minmax(0, 1fr); }
    .brand-panel { padding: 27px 24px 30px; }
    .brand { gap: 9px; }
    .brand img { width: 165px; height: 48px; max-width: calc(100% - 53px); }
    .brand-story h1 { font-size: 37px; }
    .brand-story p { font-size: 13px; }
    .brand-footer { font-size: 8px; }
    .eyebrow { font-size: 8px; letter-spacing: 1.1px; gap: 9px; }
    .eyebrow::before { width: 17px; }
    .story-graphic { transform: scale(.85); transform-origin: center; width: 270px; max-width: none; margin-left: -24px; }
    .model-row { gap: 15px; }
    .model-field { flex-basis: 190px; }
    .session-bar { gap: 8px 14px; }
    .request-item { display: none; }
    .chat-view { padding: 25px 24px 15px; }
    .composer-hint { display: none; }
}
@media (max-width: 760px) {
    .app-shell { display: flex; flex-direction: column; min-height: 100dvh; }
    .brand-panel { min-height: 80px; height: 80px; padding: 15px 20px; flex: none; overflow: visible; border-right: 0; border-bottom: 1px solid #1a2d37; }
    .brand-panel::before { display: none; }
    .brand { min-height: 49px; gap: 12px; }
    .brand img { width: 176px; height: 49px; max-width: calc(100% - 60px); }
    .brand-tag { font-size: 8px; padding: 4px 6px; }
    .brand-story, .brand-footer { display: none; }
    .main-panel { flex: 1; }
    .login-view { min-height: calc(100dvh - 80px); padding: 31px 20px 24px; }
    .login-card { padding: 30px 25px; max-width: 440px; }
    .login-card h2 { font-size: 31px; }
    .privacy-note { padding: 0 4px; font-size: 11px; }
    .chat-view { height: calc(100dvh - 80px); padding: 19px 17px max(11px, env(safe-area-inset-bottom)); min-height: 460px; }
    .chat-header { gap: 9px; }
    .chat-header h2 { font-size: 26px; }
    .chat-header .section-kicker { font-size: 9px; }
    .button-quiet { min-height: 44px; font-size: 11px; padding: 0 7px; }
    .header-actions { gap: 0; }
    .session-bar { margin: 15px 0; padding: 10px 11px; font-size: 10px; gap: 7px 10px; }
    .model-row { gap: 12px; padding-bottom: 15px; }
    .model-field { flex-basis: 52%; max-width: 250px; }
    .model-field label { font-size: 11px; }
    .model-field select { font-size: 12px; height: 44px; }
    .model-row p { font-size: 10px; line-height: 1.7; margin: 0 0 2px; }
    .chat-scroll { padding: 19px 0 18px; }
    .empty-chat { padding: 22px 0 15px; }
    .empty-chat h3 { font-size: 22px; }
    .welcome-symbol { width: 46px; height: 46px; line-height: 43px; font-size: 31px; margin-bottom: 16px; }
    .empty-chat > p { font-size: 12px; margin-bottom: 21px; }
    .example-prompt { font-size: 12px; padding: 12px 14px; }
    .messages { gap: 18px; }
    .message { max-width: 96%; }
    .message-user { max-width: 88%; }
    .message-body { font-size: 13px; }
    .message-assistant .message-body { padding: 12px 14px; }
    .composer textarea { font-size: 16px; line-height: 1.5; min-height: 43px; }
    .composer-input { padding: 10px 10px 10px 13px; }
    .button-send { width: 44px; height: 44px; min-height: 44px; }
    .composer-footer { font-size: 10px; padding-top: 10px; }
    .readonly-label { font-size: 9px; }
    .chat-footnote { font-size: 10px; margin-top: 9px; }
}
@media (max-width: 380px) {
    .brand-panel { padding-left: 16px; padding-right: 16px; }
    .brand img { width: 164px; }
    .chat-view { padding-left: 12px; padding-right: 12px; }
    .chat-header h2 { font-size: 23px; }
    .button-quiet { font-size: 10px; padding: 0 5px; }
    .session-bar { font-size: 9px; }
    .model-row p { font-size: 9px; }
    .model-field select { font-size: 11px; }
    .login-card { padding: 28px 21px; }
    .chat-footnote { font-size: 9px; }
    .readonly-label { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
    .gradient-text { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}
