:root{--bg:#f5f6f8;--surface:#fff;--text:#1c2330;--muted:#5b6577;--border:#d9dde4;--border-strong:#7b8597;--accent:#1f4fbf;--focus:#12348a;--transcript-bg:#eef1f6;--composer-bg:#f5f8fe;--accent-text:#fff;--danger-bg:#fdf1f0;--danger-border:#e3a9a4;--danger-text:#7a1f18;--radius:10px;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;line-height:1.5}*{box-sizing:border-box}body{min-height:100vh;margin:0}h1{margin:0 0 .75rem;font-size:1.5rem;line-height:1.25}p{margin:0 0 1rem}[hidden]{display:none!important}.muted{color:var(--muted);font-size:.95rem}.screen{flex-direction:column;min-height:100vh;padding:1rem;display:flex}.screen-header{justify-content:flex-end;display:flex}.screen-main{flex:1;justify-content:center;align-items:center;padding:1rem 0;display:flex}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:100%;max-width:26rem;padding:1.5rem}.card>:last-child{margin-bottom:0}.card-error{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}.card-error .muted{color:inherit}.button{font:inherit;color:var(--accent-text);background:var(--accent);border:1px solid var(--accent);cursor:pointer;border-radius:8px;padding:.65rem 1.1rem;font-weight:600;text-decoration:none;display:inline-block}.button:hover{filter:brightness(1.08)}.button:disabled{opacity:.6;cursor:not-allowed;filter:none}.button[aria-disabled=true]{opacity:.6;cursor:not-allowed}.button-secondary{color:var(--accent);background:var(--surface)}.button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.language-switcher{background:var(--surface);border:1px solid var(--border-strong);border-radius:8px;display:inline-flex;overflow:hidden}.language-option{font:inherit;color:var(--text);cursor:pointer;background:0 0;border:0;padding:.4rem .75rem;font-size:.9rem}.language-option+.language-option{border-left:1px solid var(--border-strong)}.language-option[aria-pressed=true]{color:var(--accent-text);background:var(--accent);font-weight:600}.language-option:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}.language-option[aria-pressed=true]:focus-visible{outline-color:var(--accent-text)}.shell{min-height:100vh}.shell-header{background:var(--surface);border-bottom:1px solid var(--border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem 1rem;padding:.75rem 1rem;display:flex}.brand{font-weight:700}.shell-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.shell-header .button{padding:.45rem .85rem}.shell-body{flex-direction:column;gap:1rem;max-width:90rem;margin:0 auto;padding:1.5rem 1rem;display:flex}.shell-main{min-width:0;container-type:inline-size}.workspaces{gap:1.5rem;max-width:44rem;margin:0 auto;display:grid}@container (width>=60rem){.workspaces{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);align-items:start;max-width:none}}.settings-drawer{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);min-width:0;padding:1rem}.settings-drawer-header{justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:1rem;display:flex}.settings-drawer-header h2{margin:0;font-size:1.15rem;line-height:1.3}.settings-drawer-header h2:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:4px}@media (width>=64rem){.shell-body{flex-direction:row;align-items:flex-start;gap:1.5rem}.shell-main{flex:1 1 0;order:1}.settings-drawer{flex:0 0 24rem;order:2;max-height:calc(100vh - 2rem);position:sticky;top:1rem;overflow-y:auto}}.notice{border-radius:8px;margin-bottom:1rem;padding:.75rem 1rem}.notice>:last-child{margin-bottom:0}.notice-error{background:var(--danger-bg);border:1px solid var(--danger-border);color:var(--danger-text)}.notice-error .muted{color:inherit}.facts{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);gap:.75rem;margin:0;padding:1rem;display:grid}.facts dt{color:var(--muted);font-size:.85rem}.facts dd{margin:0;font-weight:600}.account-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-top:1.5rem;padding:1rem}.account-panel h2{margin:0 0 1rem;font-size:1.15rem;line-height:1.3}.account-panel h3{margin:0;font-size:1rem}.account-connection+.account-connection{border-top:1px solid var(--border);margin-top:1rem;padding-top:1rem}.account-status,.account-expiry,.account-operation{margin:.25rem 0 0}.account-connection>.button,.account-link-details,.account-confirmation{margin-top:.75rem}.account-link-details>:last-child,.account-confirmation>:last-child{margin-bottom:0}.account-actions{flex-wrap:wrap;gap:.5rem;display:flex}.button-danger{color:var(--danger-text);background:var(--danger-bg);border-color:var(--danger-border)}.account-panel>.notice,.account-panel>.account-operation{margin-top:1rem;margin-bottom:0}.settings-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-top:1.5rem;padding:1rem}.settings-panel h2{margin:0 0 .5rem;font-size:1.15rem;line-height:1.3}.settings-note{margin-bottom:1rem}.settings-field{flex-direction:column;gap:.35rem;margin-bottom:1rem;display:flex}.settings-label{font-weight:600}.settings-select{width:100%;max-width:16rem;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:.55rem .75rem}.settings-select:disabled{opacity:.6;cursor:not-allowed}.settings-select:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.settings-actions{flex-wrap:wrap;gap:.5rem;display:flex}.settings-panel>.notice,.settings-panel>.settings-status{margin-top:1rem;margin-bottom:0}.documents-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem}.documents-panel h2{margin:0 0 .5rem;font-size:1.15rem;line-height:1.3}.documents-panel h3{margin:0;font-size:1rem}.documents-note{margin-bottom:1rem}.documents-warning{background:var(--bg);border:1px solid var(--border)}.documents-upload{flex-direction:column;gap:.35rem;margin-bottom:1rem;display:flex}.documents-label{font-weight:600}.documents-file-input{max-width:100%;font:inherit}.documents-file-input:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.documents-hint,.documents-selected,.documents-problem{margin:0}.documents-name{overflow-wrap:anywhere;min-width:0;font-weight:600}.documents-problem{border-left:3px solid var(--danger-border);color:var(--danger-text);overflow-wrap:anywhere;padding-left:.5rem;font-weight:600}.documents-actions{flex-wrap:wrap;gap:.5rem;display:flex}.documents-status,.documents-panel>.notice{margin:.75rem 0}.documents-panel .notice .button{margin-top:.5rem}.documents-toolbar{justify-content:space-between;align-items:center;gap:1rem;margin:1rem 0 .5rem;display:flex}.documents-empty{margin:.5rem 0}.documents-list{border-top:1px solid var(--border);margin:0;padding:0;list-style:none}.documents-list[aria-busy=true],.documents-item[aria-busy=true]{opacity:.7}.documents-item{border-bottom:1px solid var(--border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem .75rem;padding:.75rem 0;display:flex}.documents-item-main{flex-direction:column;flex:12rem;min-width:0;display:flex}.documents-time{font-size:.85rem}.documents-confirmation{flex-basis:100%}.documents-confirmation>p{margin:0 0 .5rem}.documents-confirmation>.documents-status,.documents-confirmation>.documents-problem{margin:.5rem 0 0}.documents-pager{justify-content:space-between;align-items:center;gap:.75rem;margin-top:1rem;display:flex}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem}.chat h2{margin:0 0 .25rem;font-size:1.15rem;line-height:1.3}.chat-note{margin-bottom:.75rem}.chat-transcript{background:var(--transcript-bg);border:1px solid var(--border);border-radius:var(--radius);min-height:10rem;max-height:min(32rem,60vh);padding:.75rem;overflow-y:auto}.chat-empty{margin:0}.chat-messages{flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none;display:flex}.chat-exchange{flex-direction:column;gap:.5rem;min-width:0;display:flex}.chat-message{border:1px solid var(--border);border-radius:var(--radius);min-width:0;max-width:85%;padding:.5rem .75rem}.chat-message-user{background:#e9effc;border-color:#b9ccf3;align-self:flex-end}.chat-message-assistant{background:var(--surface);align-self:flex-start}.chat-message-pending{opacity:.7}.chat-author{color:var(--muted);margin-bottom:.125rem;font-size:.8rem;font-weight:600;display:block}.chat-text{white-space:pre-wrap;overflow-wrap:anywhere}.chat-compose{background:var(--surface);margin-top:.5rem;padding:.5rem 0 0;position:sticky;bottom:0}.chat-status,.chat-compose>.notice{margin:0 0 .5rem}.chat-composer{background:var(--composer-bg);border:1px solid var(--border-strong);border-radius:var(--radius);padding:.75rem}.chat-composer:focus-within{border-color:var(--focus)}.chat-input{width:100%;min-height:4.5rem;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);resize:vertical;border-radius:8px;padding:.6rem .75rem;display:block}.chat-input[readonly]{background:var(--bg);color:var(--muted)}.chat-input[aria-invalid=true]{border-color:var(--danger-text);box-shadow:inset 0 0 0 1px var(--danger-text)}.chat-input:focus-visible,.chat-transcript:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.chat-composer-row{justify-content:space-between;align-items:center;gap:.75rem;margin-top:.5rem;display:flex}.chat-hint{color:var(--muted);font-size:.85rem}.chat-hint-over{color:var(--danger-text);font-weight:600}@media (width<=30rem){.chat-message{max-width:100%}.chat-composer-row{flex-direction:column-reverse;align-items:stretch}.chat-composer-row .button{width:100%}.account-actions,.settings-actions,.documents-actions{flex-direction:column}.settings-select{max-width:none}.account-actions .button,.settings-actions .button,.documents-actions .button,.documents-item>.button,.account-connection>.button{text-align:center;width:100%}.card{padding:1.25rem}.card .button{text-align:center;width:100%;display:block}}
