/* Quiet glass surfaces, with motion kept behind readable content. */
:root { --glass: rgb(255 255 255 / 77%); --glass-edge: rgb(255 255 255 / 92%); --glass-shadow: 0 8px 32px rgb(61 79 120 / 6%); }
:root[data-theme="dark"] { --glass: rgb(24 35 56 / 83%); --glass-edge: rgb(117 143 182 / 20%); --glass-shadow: 0 8px 32px rgb(0 0 0 / 12%); }
body { background: var(--canvas); }
.app-shell { position:relative; isolation:isolate; background:transparent; }
.app-shell::before { content:""; position:fixed; inset:-12%; pointer-events:none; z-index:-1; background:radial-gradient(ellipse at 18% 28%,#b6cef647,transparent 50%),radial-gradient(ellipse at 86% 15%,#dbcaf240,transparent 45%),radial-gradient(ellipse at 78% 87%,#c9e4ef44,transparent 50%); animation:glass-drift 26s ease-in-out infinite alternate; }
@keyframes glass-drift { from { transform:translate3d(-1%,0,0); } to { transform:translate3d(2%,2%,0) scale(1.025); } }
:root .sidebar { top:12px; bottom:12px; left:12px; height:calc(100dvh - 24px); width:224px; padding:22px 13px 14px; border:1px solid var(--glass-edge); border-radius:22px; background:var(--glass); box-shadow:var(--glass-shadow),inset 0 1px 0 var(--glass-edge); backdrop-filter:blur(22px); }
.brand strong { font-size:16px; letter-spacing:.2px; }
.site-record { display:block; width:fit-content; color:var(--ink-faint); font-size:11px; line-height:1.5; text-decoration:none; white-space:nowrap; }
.site-record:hover { color:var(--ui-accent); text-decoration:underline; }
.site-record-sidebar { margin:9px 8px 0; }
.site-record-main { display:none; gap:6px 14px; padding:12px 24px 20px; color:var(--ink-faint); font-size:11px; }
.auth-panel-bottom { display:grid; justify-items:center; gap:8px; }
.auth-panel-bottom strong { font-size:12px; font-weight:600; }
@media (max-width:740px) {
  .site-record-sidebar { display:none; }
  .site-record-main { display:flex; justify-content:center; flex-wrap:wrap; }
}
.workspace-picker { padding-bottom:14px; }
.nav-groups { padding:10px 0; }
.nav-group { margin-bottom:14px; }
.nav-label { font-size:10px; margin-bottom:5px; opacity:.8; }
:root .nav-item { border-radius:11px; min-height:36px; }
:root .nav-item.is-active { box-shadow:none; background:var(--ui-accent-soft); }
:root .project-switcher { border-radius:12px; background:color-mix(in srgb,var(--surface) 65%,transparent); }
:root :is(.page-header,.page-body,.view,.main-content) { background:transparent; }
:root :is(.workbench-project-card,.project-card,.stat-card,.panel,.audio-upload-card,.audio-history,.audio-preview) { border-radius:16px; box-shadow:var(--glass-shadow); }
:root .agent-panel { inset:12px 12px 12px 248px; border:1px solid var(--glass-edge); border-radius:22px; background:var(--glass); backdrop-filter:blur(22px); box-shadow:var(--glass-shadow); }
:root .agent-panel-header { background:transparent; padding:14px 22px; border-bottom:1px solid var(--line); }
:root .agent-workspace-body { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); border:0; }
:root .agent-panel.resources-open .agent-workspace-body { grid-template-columns:minmax(0,1fr) 310px; }
:root .agent-research-pane[hidden] { display:none !important; }
:root :is(.agent-conversation,.agent-thread) { background:transparent; }
:root .agent-thread { padding-left:max(24px,calc((100% - 900px)/2)); padding-right:max(24px,calc((100% - 900px)/2)); }
:root .agent-composer { background:transparent; padding:10px max(24px,calc((100% - 900px)/2)) 18px; border-top:0; }
:root .agent-composer-shell { border-radius:19px; background:var(--glass); border:1px solid var(--line); box-shadow:0 5px 20px rgb(45 74 120 / 5%); }
:root .agent-composer-shell:focus-within { box-shadow:0 0 0 3px var(--ui-accent-soft); }
:root .agent-message.user .agent-message-copy { border-radius:18px 18px 5px 18px; border-color:transparent; }
:root .agent-message-copy { font-size:14px; line-height:1.8; }
:root .agent-input { font-size:14px; line-height:1.65; }
.agent-header-actions { gap:8px; }
.agent-project-menu { position:relative; font-size:12px; }
.agent-project-menu summary { list-style:none; cursor:pointer; padding:8px 11px; border-radius:9px; color:var(--ink-soft); }
.agent-project-menu summary::-webkit-details-marker { display:none; }
.agent-project-menu summary:hover { background:var(--ui-hover); }
.agent-project-menu > div { position:absolute; top:40px; right:0; z-index:60; min-width:132px; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--ui-shadow); }
.agent-project-menu button { display:block; width:100%; text-align:left; background:none; border:0; padding:10px; color:var(--ink); cursor:pointer; border-radius:7px; }
.agent-project-menu button:hover { background:var(--ui-hover); }
:root .agent-research-pane { padding:16px; background:color-mix(in srgb,var(--surface) 65%,transparent); overflow-y:auto; }
.agent-source-details { border-top:1px solid var(--line); padding-top:12px; margin-top:16px; }
.agent-source-details > summary { cursor:pointer; font-size:12px; font-weight:600; padding:8px 0; }
.agent-source-details > summary span { font-weight:400; font-size:11px; color:var(--ink-faint); margin-left:8px; }
.agent-source-toolbar { display:flex; justify-content:space-between; align-items:center; color:var(--ink-faint); font-size:11px; }
:root .agent-research-content { padding:0; background:transparent; overflow:visible; }
.word-report-picker { padding:0; }
.agent-session-row { background:transparent; }
:root .agent-issue-file-notice:not(.is-active) { display:none; }
:root .agent-issue-file-notice { border:0; background:transparent; padding:3px 0 8px; font-size:11px; }
:root .agent-preset-row { gap:6px; }
:root .agent-preset-row button { border-radius:9px; border-color:var(--line); font-size:11px; padding:6px 9px; }
:root .agent-response-mode-control { border:0; background:transparent; }
:root .agent-response-mode-control button { font-size:11px; }
:root .agent-indicator-tools { background:transparent; border:0; }
@media (max-width:1150px) {
  :root .sidebar { width:191px; }
  :root .agent-panel { left:215px; }
  :root .agent-panel.resources-open .agent-workspace-body { grid-template-columns:minmax(0,1fr) 270px; }
}
@media (max-width:900px) {
  :root .agent-panel.resources-open .agent-workspace-body { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); }
  :root .agent-panel.resources-open .agent-research-pane { position:absolute; right:0; top:66px; bottom:0; width:min(330px,95%); z-index:45; background:var(--surface); box-shadow:var(--ui-shadow); }
  :root .agent-composer { padding:8px 16px 14px; }
  :root .agent-thread { padding-left:16px; padding-right:16px; }
}
@media (max-width:700px) {
  :root .sidebar { position:relative; top:auto; left:auto; width:calc(100% - 16px); height:auto; margin:8px; border-radius:16px; }
  :root .agent-panel { inset:8px; }
  :root .agent-panel-header { padding:10px 12px; }
  .agent-header-actions { gap:4px; }
}
@media (prefers-reduced-motion:reduce) { .app-shell::before { animation:none; } }
@media print { .app-shell::before { display:none; } }

/* Readable replies and compact confirmation choices. */
:root .agent-panel .agent-message.assistant .agent-message-copy { width:100%; max-width:100%; }
:root .agent-message.assistant .agent-message-copy { line-height:1.9; }
:root .agent-message.assistant .agent-message-copy p { margin:0 0 12px; text-align:justify; text-justify:inter-ideograph; }
:root .agent-message-copy :is(h1,h2,h3,h4) { margin:22px 0 10px; font-weight:650; }
:root .agent-message-copy > :first-child { margin-top:0; }
:root .agent-message-copy li { margin:7px 0; }
:root .agent-message-copy .agent-message-time { margin-top:12px; }
:root .agent-markdown-table-wrap { border-radius:12px; margin:16px 0; }
:root .agent-markdown-table-wrap table { font-size:13px; line-height:1.8; }
:root .agent-markdown-table-wrap :is(th,td) { padding:13px 16px; }
:root .agent-markdown-table-wrap.agent-two-column-table table { table-layout:fixed; min-width:0; }
:root .agent-two-column-table :is(th,td) { min-width:0; overflow-wrap:anywhere; }
:root .agent-two-column-table :is(th,td):first-child { width:30%; font-weight:600; }
:root .agent-two-column-table td:last-child { text-align:justify; text-justify:inter-ideograph; }
.agent-clarification-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:14px 0 4px; }
.agent-clarification-actions span { font-size:12px; color:var(--ink-faint); }
@media (max-width:520px) {
  :root .agent-markdown-table-wrap.agent-two-column-table :is(table,tbody,tr,td) { display:block; width:100%; }
  :root .agent-two-column-table thead { display:none; }
  :root .agent-two-column-table tr + tr { border-top:1px solid var(--line); }
  :root .agent-two-column-table :is(th,td):first-child { width:100%; padding-bottom:5px; border:0; background:var(--surface-muted); }
  :root .agent-two-column-table td:last-child { border:0; padding-top:8px; }
}

/* Conversation results, with references available when needed. */
:root .agent-message.assistant .agent-message-copy { font-size:15px; line-height:1.85; }
:root .agent-thread-item { margin-bottom:24px; }
:root .agent-artifact { padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
:root .agent-artifact strong { font-size:13px; font-weight:550; }
:root .agent-artifact-icon { border-radius:7px; }
:root .agent-result-sources { color:var(--ink-soft); font-size:13px; }
:root .agent-result-sources > summary { width:fit-content; cursor:pointer; color:var(--ink-faint); padding:4px 0; }
:root .agent-result-sources > summary span { font-size:12px; }
:root .agent-result-sources .agent-research-inline { margin-top:12px; }
:root .agent-panel .agent-attention { border:0; box-shadow:none; background:transparent; padding:4px 0; }
:root .agent-panel .agent-attention .agent-bullet { display:none; }
:root .agent-panel .agent-attention { grid-template-columns:minmax(0,1fr); }
:root .agent-panel .agent-attention .agent-activity-copy strong { font-size:14px; font-weight:450; line-height:1.8; }
:root #agent-composer-status:empty { display:none; }
@media (max-width:520px) {
  :root .agent-artifact { grid-template-columns:30px minmax(0,1fr); padding:12px; }
  :root .agent-artifact-actions { grid-column:2; justify-content:flex-start; flex-wrap:wrap; }
}
