@import url('./source-picker.css');
@import url('./settings.css');
@import url('./projects.css');
@import url('./typography.css');
@import url('./interactions.css');
@import url('./sidebar.css');
@import url('./search-animations.css');
/* Shared chat geometry with explicit neutral theme roles.
   These user-requested themes replace the earlier green palette in both modes. */
:root {
  --sidebar-width: 260px;
  --radius: 10px;
  --pastel-ink: var(--on-action);
  --pastel-muted: var(--muted);
}

:root:not([data-theme]), :root[data-theme=light] {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #f4f4f4;
  --sidebar-surface: #f9f9f9;
  --ink: #0d0d0d;
  --muted: #565656;
  --sidebar-muted: #616161;
  --selection: #e9e9e9;
  --text-selection: #d9d9d9;
  --on-text-selection: #0d0d0d;
  --action: #0d0d0d;
  --on-action: #ffffff;
  --action-hover: #303030;
  --action-active: #454545;
  --check: #0d0d0d;
  --evidence: #f8f8f8;
  --subtle-hover: #ededed;
  --active-row: #eaeaea;
  --surface-hover: #e8e8e8;
  --scope-hover: #e3e3e3;
  --edge: #767676;
  --line: #dedede;
  --focus: #0d0d0d;
  --dialog-surface: #ffffff;
  --dialog-border: #cdcdcd;
  --popover-surface: #ffffff;
  --popover-border: #dedede;
  --overlay: rgb(0 0 0 / .35);
}

:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: #212121;
  --surface: #303030;
  --sidebar-surface: #171717;
  --ink: #f3f3f3;
  --muted: #b4b4b4;
  --sidebar-muted: #ababab;
  --selection: #383838;
  --text-selection: #515151;
  --on-text-selection: #ffffff;
  --action: #f3f3f3;
  --on-action: #171717;
  --action-hover: #dedede;
  --action-active: #c7c7c7;
  --check: #e3e3e3;
  --evidence: #2b2b2b;
  --subtle-hover: #262626;
  --active-row: #2f2f2f;
  --surface-hover: #3d3d3d;
  --scope-hover: #414141;
  --edge: #7c7c7c;
  --line: #3e3e3e;
  --focus: #dedede;
  --dialog-surface: #2b2b2b;
  --dialog-border: #555555;
  --popover-surface: #2f2f2f;
  --popover-border: #4a4a4a;
  --overlay: rgb(0 0 0 / .65);
}

html[data-theme] body {
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

html[data-theme] ::selection { background: var(--text-selection); color: var(--on-text-selection); }
html[data-theme] :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
html[data-theme] :is(button, a, select) { -webkit-tap-highlight-color: transparent; }
html[data-theme] button:hover { background: var(--selection); color: var(--ink); }
html[data-theme] button:disabled { opacity: .55; }
html[data-theme] button:disabled:hover { background: transparent; color: var(--ink); }
html[data-theme] .primary { background: var(--action); border-color: transparent; color: var(--on-action); }
html[data-theme] .primary:hover { background: var(--action-hover); color: var(--on-action); }
html[data-theme] .primary:active { background: var(--action-active); }
html[data-theme] button.primary:disabled:hover { background: var(--action); color: var(--on-action); }
html[data-theme] :is(input[type=checkbox], input[type=radio]) { accent-color: var(--check); }
html[data-theme] :is(h1, h2, h3) { text-wrap: balance; }

html[data-theme] .app-header {
  min-height: 56px;
  padding: 6px 16px;
  gap: 12px;
  background: var(--canvas);
}

html[data-theme] .wordmark { font-size: 18px; letter-spacing: -.025em; font-weight: 550; }
html[data-theme] .wordmark span { color: inherit; }
html[data-theme] :is(nav a, .utilities a) { border-radius: 8px; }
html[data-theme] nav a[aria-current=page] { color: var(--ink); background: var(--selection); }
html[data-theme] .utilities .account-link {
  background: var(--action);
  color: var(--on-action);
  border: 0;
  border-radius: 24px;
  min-height: 36px;
  padding: 6px 16px;
}

html[data-theme] .workspace { min-height: 100svh; }
html[data-theme] .workspace-content { max-width: none; padding: 0 32px 24px; }
html[data-theme] .conversation-sidebar {
  background: var(--sidebar-surface);
  border: 0;
  padding: 12px 10px;
  gap: 8px;
}

html[data-theme] .sidebar-heading { padding: 0 10px; min-height: 32px; }
html[data-theme] .sidebar-heading h2 { font-size: 12px; font-weight: 500; color: var(--muted); }
html[data-theme] .new-chat-button {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  border-radius: 8px;
}

html[data-theme] .new-chat-button:hover { background: var(--subtle-hover); }
html[data-theme] .conversation-sidebar input[type=search] {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  min-height: 40px;
}

html[data-theme] .conversation-sidebar input[type=search]:focus { background: var(--subtle-hover); border-color: var(--edge); }
html[data-theme] .conversation-list { margin-top: 12px; }
html[data-theme] .conversation-row { margin-bottom: 2px; padding: 0; grid-template-columns: minmax(0, 1fr) 36px; border-radius: 8px; }
html[data-theme] .conversation-row:has([aria-current=page]) { background: var(--active-row); }
html[data-theme] .conversation-row:hover { background: var(--subtle-hover); }
html[data-theme] .conversation-open {
  padding: 8px 12px;
  font-size: 14px;
  min-height: 40px;
  font-weight: 400;
  border-radius: 8px;
}

html[data-theme] .conversation-open[aria-current=page] { color: var(--ink); background: transparent; }
html[data-theme] .conversation-meta { padding: 0 12px 6px; color: var(--sidebar-muted); font-size: 11px; line-height: 1.4; }
html[data-theme] .chat-options { min-height: 36px; border-radius: 8px; color: var(--muted); }
html[data-theme] .sidebar-archive { font-weight: 400; border: 0; border-radius: 8px; padding: 8px 12px; }
html[data-theme] .conversation-sidebar > .note { padding: 4px 12px; font-size: 11px; color: var(--sidebar-muted); }
html[data-theme] .sidebar-nav { display: flex; flex-direction: column; gap: 2px; margin: 0; }
html[data-theme] .sidebar-nav a { justify-content: flex-start; padding: 8px 12px; font-size: 14px; }
html[data-theme] .sidebar-nav a:hover { background: var(--subtle-hover); }

html[data-theme] :is(.chat-view, .workspace .intro) { max-width: 768px; margin-inline: auto; }
html[data-theme] .chat-view { margin-block: 0 24px; }
html[data-theme] .workspace .intro { padding-top: clamp(96px, 22svh, 220px); padding-bottom: 32px; }
html[data-theme] .intro h1 { font-size: 28px; font-weight: 550; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 20px; }
html[data-theme] .intro-description { font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
html[data-theme] .chat-toolbar { justify-content: flex-end; border: 0; padding: 0; gap: 8px 16px; margin-bottom: 32px; align-items: center; }
html[data-theme] .chat-toolbar h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; font-size: 17px; font-weight: 500; line-height: 1.5; }
html[data-theme] .chat-tools { gap: 2px; margin: 0; }
html[data-theme] .chat-tools :is(button, select) { font-size: 12px; font-weight: 400; min-height: 36px; padding: 6px 10px; color: var(--muted); }
html[data-theme] .chat-tools select { border-color: transparent; background: transparent; border-radius: 8px; }

html[data-theme] .user-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 100%;
  margin: 24px 0 20px;
}

html[data-theme] .user-message h2 {
  max-width: min(85%, 640px);
  background: var(--surface);
  padding: 10px 18px;
  border-radius: 22px;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

html[data-theme] .user-message > .note { max-width: 85%; margin: 4px 8px 0; font-size: 12px; }
html[data-theme] .user-message .message-action { margin-top: 2px; }
html[data-theme] .answer { margin-bottom: 28px; }
html[data-theme] .answer-layout.has-evidence { display: block; }
html[data-theme] .reading { max-width: 100%; }
html[data-theme] .answer-summary { font-size: 16px; line-height: 1.75; margin-bottom: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
html[data-theme] .message-action { font-size: 12px; font-weight: 400; min-height: 36px; padding: 6px 8px; text-decoration: none; border-radius: 8px; }
html[data-theme] .message-actions { gap: 4px; }
html[data-theme] .source-list { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 0; margin-block: 12px; }
html[data-theme] .source-list .source-title { border-radius: 12px; background: var(--surface); color: var(--ink); padding: 4px 10px; min-height: 36px; font-size: 12px; font-weight: 400; text-decoration: none; overflow-wrap: anywhere; max-width: 100%; }
html[data-theme] .source-list .source-title:hover { background: var(--surface-hover); }
html[data-theme] .answer-notes { border: 0; padding: 0; margin: 8px 0; }
html[data-theme] .answer-notes > summary { min-height: 36px; padding: 6px 0; color: var(--muted); font-size: 12px; }
html[data-theme] .reading > .note { font-size: 12px; margin-bottom: 4px; }
html[data-theme] .evidence { margin-top: 20px; padding: 20px; border-radius: 12px; color: var(--ink); background: var(--evidence); }
html[data-theme] .evidence .note { color: var(--muted); }
html[data-theme] .evidence :focus-visible { outline-color: var(--focus); }
html[data-theme] .evidence h2 { font-size: 18px; }

html[data-theme] :is(.chat-view, .intro) .composer { width: 100%; max-width: 768px; margin-top: 24px; }
html[data-theme] .composer-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[data-theme] .question-box { border: 0; border-radius: 26px; background: var(--surface); padding: 14px 16px 10px; }
html[data-theme] .question-box:has(textarea:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
html[data-theme] .question-box textarea:focus-visible { outline: none; }
html[data-theme] .question-box textarea { min-height: 32px; max-height: 240px; height: 32px; border: 0; padding: 2px 4px; font-size: 16px; line-height: 1.6; resize: none; }
html[data-theme] .compose-bottom { margin-top: 10px; gap: 10px; }
html[data-theme] .scope-picker { gap: 6px; }
html[data-theme] .scope-picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
html[data-theme] .scope-picker select { min-height: 36px; border: 0; background: transparent; padding: 6px 8px; font-size: 13px; color: var(--ink); }
html[data-theme] .scope-picker select:hover { background: var(--scope-hover); }
html[data-theme] .send-actions { gap: 10px; }
html[data-theme] .cost { font-size: 14px; color: var(--muted); }
html[data-theme] .send-actions .send-button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 50%; background: var(--action); color: var(--on-action); }
html[data-theme] .send-actions .send-button:hover { background: var(--action-hover); }
html[data-theme] .send-button .send-icon { display: block; width: 22px; height: 22px; flex-shrink: 0; }
html[data-theme] .send-button .send-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[data-theme] .send-actions > button:not(.send-button) { min-height: 40px; font-size: 13px; padding: 6px 10px; }
html[data-theme] .session-line { justify-content: center; font-size: 12px; line-height: 1.5; gap: 4px 8px; margin-top: 6px; }
html[data-theme] .session-line button { font-size: 12px; min-height: 32px; padding: 4px; text-decoration: none; }
html[data-theme] .coverage-note { color: var(--muted); text-align: center; font-size: 12px !important; line-height: 1.5; }
html[data-theme] .context-preview { font-size: 12px; min-height: 36px; padding: 6px 8px; color: var(--muted); text-decoration: none; }
html[data-theme] .example-question { margin-top: 14px; font-size: 13px; min-height: 36px; text-decoration: none; border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; }
html[data-theme] .app-footer { padding-block: 6px; gap: 20px; font-size: 12px; }
html[data-theme] .app-footer a { min-height: 36px; }
html[data-theme] dialog { background: var(--dialog-surface); border-color: var(--dialog-border); border-radius: 16px; }
html[data-theme] dialog::backdrop { background: var(--overlay); }
html[data-theme] .drawer-open .drawer-shade { background: var(--overlay); }

/* Both themes share workspace navigation; public pages keep their own header. */
html[data-theme] .has-workspace > :is(.app-header, .app-footer) { display: none; }
html[data-theme] .dark-only { display: revert; }
html[data-theme] .workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 56px;
  margin: 0 -16px 16px;
  padding: 6px 0;
  background: var(--canvas);
}
html[data-theme] .workspace-name { font-size: 18px; font-weight: 500; text-decoration: none; }
html[data-theme] .topbar-account { display: flex; align-items: center; gap: 8px; margin-left: auto; }
html[data-theme] a.topbar-account { justify-content:center; min-height:36px; padding:6px 14px; border-radius:20px; background:var(--action); color:var(--on-action); font-size:14px; font-weight:500; text-decoration:none; flex-shrink:0; }
html[data-theme] .sidebar-heading { min-height: 52px; padding: 0 4px; gap: 8px; }
html[data-theme] .sidebar-heading h2 { display: none; }
html[data-theme] .sidebar-brand { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; color: var(--ink); text-decoration: none; }
html[data-theme] .sidebar-brand svg { width: 24px; height: 24px; }
html[data-theme] :is(.sidebar-collapse, .sidebar-expand) { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; padding: 8px; border-radius: 8px; color: var(--muted); }
html[data-theme] :is(.sidebar-collapse, .sidebar-expand) svg { width: 20px; height: 20px; }
html[data-theme] .sidebar-collapse { margin-left: auto; }
html[data-theme] :is(.sidebar-collapse,.topbar-sidebar-toggle) .action-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
html[data-theme] :is(.sidebar-nav a,.sidebar-utilities > a) { gap:12px; }
html[data-theme] .sidebar-nav { display: flex; flex-direction: column; flex-basis: auto; order: 0; margin: 0; }
html[data-theme] .sidebar-utilities { display: flex; flex-wrap: wrap; gap: 0 4px; padding: 4px 8px; }
html[data-theme] .sidebar-utilities a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px; color: var(--muted); font-size: 12px; text-decoration: none; }
html[data-theme] .sidebar-utilities a:hover { color: var(--ink); text-decoration: underline; }

html[data-theme] .chat-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
html[data-theme] .new-chat-button { display: flex; align-items: center; gap: 12px; }
html[data-theme] .sidebar-history-label { display: block; color: var(--muted); font-size: 12px; margin: 12px 12px 0; }
html[data-theme] .conversation-list { margin-top: 0; }
html[data-theme] .icon-action { display: inline-flex; align-items: center; justify-content: center; width: 36px; padding: 8px; }
html[data-theme] .icon-action .action-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[data-theme] .full-chat-actions { display: none; }
html[data-theme] .chat-actions-menu { display: block; position: relative; }
html[data-theme] .chat-actions-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; width: 36px; min-height: 36px; padding: 8px; border-radius: 8px; color: var(--muted); }
html[data-theme] .chat-actions-menu > summary::-webkit-details-marker { display: none; }
html[data-theme] .chat-actions-menu > summary:hover { background: var(--selection); color: var(--ink); }
html[data-theme] .chat-actions-popover { display: flex; flex-direction: column; position: absolute; right: 0; top: calc(100% + 4px); z-index: var(--layer-drawer); width: 200px; max-width: calc(100vw - 32px); padding: 6px; border: 1px solid var(--popover-border); border-radius: 12px; background: var(--popover-surface); }
html[data-theme] .chat-actions-popover button { width: 100%; text-align: left; min-height: 40px; padding: 8px 12px; font-size: 14px; color: var(--ink); border-radius: 8px; }
html[data-theme] .chat-view { display: flex; flex-direction: column; min-height: calc(100dvh - 104px); }
html[data-theme] .message-thread { flex: 1; min-width: 0; }
html[data-theme] .chat-view > .composer { position: sticky; bottom: 0; background: var(--canvas); padding-top: 20px; margin-top: auto; }
html[data-theme] .topbar-sidebar-toggle { display: none; }
html[data-theme] .light-sidebar-toggle { display:none; }

/* The transcript owns its scroll area, keeping the composer clear of answers. */
html[data-theme] .is-chat { height:100dvh; min-height:0; overflow:hidden; }
html[data-theme] .is-chat main { min-height:0; }
html[data-theme] .is-chat .workspace { height:100dvh; min-height:0; }
html[data-theme] .is-chat .workspace-content { height:100dvh; display:flex; flex-direction:column; overflow:hidden; padding-bottom:8px; }
html[data-theme] .is-chat .workspace-topbar { flex-shrink:0; position:relative; z-index:var(--layer-header,10); }
html[data-theme] .is-chat .chat-view { width:100%; flex:1; min-height:0; margin:0 auto; overflow:hidden; }
html[data-theme] .is-chat .chat-toolbar { flex-shrink:0; margin-bottom:8px; }
html[data-theme] .is-chat .message-thread { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 8px 16px 0; }
html[data-theme] .is-chat .chat-view > .composer { position:static; flex-shrink:0; padding-top:16px; margin:0; }
html[data-theme] .is-chat .workspace .intro { flex:1; display:flex; flex-direction:column; justify-content:center; width:100%; padding-block:24px; min-height:0; }
html[data-theme] .is-chat .intro > :is(h1,.composer,.example-question) { flex-shrink:0; }
html[data-theme] .is-chat .intro-description { display:none; }
html[data-theme] .is-chat .home-overview { display:none; }
html[data-theme] .is-chat .context-preview { display:none; }
html[data-theme] .is-chat .example-question { align-self:center; }
html[data-theme] .is-chat .status-message { flex-shrink:0; margin:4px 0; font-size:13px; }
html[data-theme] .is-chat .coverage-note { margin-bottom:4px; }

@media (min-width: 761px) {
  html[data-theme] .has-workspace .conversation-sidebar { position: fixed; top: 0; bottom: 0; left: 0; height: 100dvh; width: var(--sidebar-width); }
  html[data-theme] .workspace-content { grid-column: 2; }
  html[data-theme] .workspace.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
  html[data-theme] .sidebar-collapsed .conversation-sidebar { display: none; }
  html[data-theme] .sidebar-collapsed .topbar-sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; width: 40px; padding: 8px; }
  html[data-theme] .sidebar-collapsed .workspace-content { padding-inline: 32px; }
}

@media (max-width: 1000px) and (min-width: 761px) {
  html[data-theme] .workspace-content { padding-inline: 24px; }
  html[data-theme] .chat-toolbar { display: flex; }
}

@media (max-width: 760px) {
  html[data-theme] .app-header { padding: 8px 12px; gap: 4px 8px; }
  html[data-theme] .wordmark { font-size: 16px; }
  html[data-theme] .app-header > nav { margin-top: 0; }
  html[data-theme] .workspace-content { padding: 0 16px 20px; }
  html[data-theme] .workspace-topbar { margin: 0 -4px 12px; gap: 4px; }
  html[data-theme] .workspace-name { font-size: 16px; }
  html[data-theme] .sidebar-collapse { display: none; }
  html[data-theme] .topbar-sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; padding: 8px; }
  html[data-theme] .chat-view { min-height: calc(100dvh - 92px); }
  html[data-theme] .conversation-sidebar { width: min(280px, calc(100vw - 48px)); height: 100dvh; top: 0; padding: 12px; }
  html[data-theme] .sidebar-toggle { min-height: 40px; padding: 6px 12px; border: 0; background: transparent; border-radius: 8px; margin-bottom: 12px; }
  html[data-theme] .drawer-close { color: var(--muted); min-height: 40px; }
  html[data-theme] .workspace .intro { padding-top: clamp(64px, 14svh, 140px); }
  html[data-theme] .intro h1 { font-size: 26px; }
  html[data-theme] .chat-toolbar { display: flex; margin-bottom: 20px; gap: 6px; }
  html[data-theme] .chat-toolbar h1 { font-size: 16px; }
  html[data-theme] .chat-tools { flex-wrap: wrap; gap: 0; }
  html[data-theme] .chat-tools :is(button, select) { padding: 6px 8px; }
  html[data-theme] .user-message { margin-top: 16px; }
  html[data-theme] .user-message h2 { max-width: 90%; font-size: 16px; padding: 10px 16px; }
  html[data-theme] .question-box { padding: 12px 12px 8px; border-radius: 24px; }
  html[data-theme] .session-line { display: flex; text-align: center; font-size: 14px; }
  html[data-theme] .session-line button { margin-left: 0; font-size: 14px; }
  html[data-theme] .compose-bottom { flex-wrap: nowrap; gap: 4px; }
  html[data-theme] .send-actions { gap: 6px; }
  html[data-theme] .scope-picker select { padding-inline: 4px; }
  html[data-theme] .cost { white-space: normal; text-align: right; }
  html[data-theme] .evidence { padding: 16px; }
}

/* Leave room for controls when zoom or a mobile keyboard reduces the viewport. */
@media (max-height: 600px) {
  html[data-theme] .question-box textarea { max-height: max(32px, calc(100dvh - 440px)); }
  html[data-theme] .is-chat .workspace-content:has(> .intro) { overflow-y: auto; }
  html[data-theme] .is-chat .workspace .intro { flex: 0 0 auto; min-height: min-content; padding-block: 20px; }
  html[data-theme] .conversation-sidebar { min-height: 0; }
}

/* Three small skins peel away in sequence; motion indicates activity, not percent complete. */
.search-activity { display:flex; align-items:center; gap:10px; min-height:48px; margin-block:12px 24px; color:var(--muted); }
.search-activity-label { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }

.animation-settings { margin-block:24px 32px; }
.plain-view input[type=file] { max-width:100%; }
.animation-settings legend { font-size:16px; font-weight:550; color:var(--ink); }
.animation-settings > .note { font-size:14px; margin-block:8px 16px; }
.animation-preview { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-height:88px; padding:16px 20px; margin-block:16px; border-radius:12px; background:var(--surface); color:var(--ink); }
.animation-preview-label { flex:1; font-size:14px; color:var(--muted); }
.animation-preview-toggle { font-size:14px; min-height:44px; padding-inline:12px; }
.animation-preview[data-paused=true] .search-animation * { animation-play-state:paused !important; }
.animation-reduced-note { display:none; font-size:13px; color:var(--muted); }
.animation-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.animation-choice { display:flex; align-items:center; gap:12px; min-width:0; min-height:82px; padding:12px 8px; border-bottom:1px solid var(--line); cursor:pointer; }
.animation-choice:hover { background:var(--subtle-hover); }
.animation-choice:has(input:checked) { background:var(--surface); }
.animation-choice input { width:17px; height:17px; flex:0 0 17px; margin:0; accent-color:var(--ink); }
.animation-choice-icon { display:flex; flex:0 0 36px; }
.animation-choice-icon .search-animation * { animation:none !important; }
.animation-choice-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.animation-choice-name { font-size:14px; font-weight:550; line-height:1.5; }
.animation-choice-description { font-size:14px; line-height:1.5; color:var(--muted); }
.animation-feedback { min-height:21px; font-size:14px; color:var(--muted); margin-block:8px 0; }
@media(max-width:600px) {
  .animation-choices { grid-template-columns:minmax(0,1fr); }
  .animation-preview { padding:12px; gap:10px; }
  .animation-preview-toggle { padding-inline:6px; }
}
@media(prefers-reduced-motion:reduce) {
  .animation-preview-toggle { display:none; }
  .animation-reduced-note { display:block; }
}
@media(forced-colors:active) {
  .search-activity { color:CanvasText; }
  .animation-choice:has(input:checked) { outline:1px solid Highlight; outline-offset:-1px; }
}


@media (max-height: 400px) {
  html[data-theme] .is-chat .workspace-content { overflow-y: auto; }
  html[data-theme] .is-chat .chat-view { flex: 0 0 auto; overflow: visible; }
  html[data-theme] .is-chat .message-thread { flex: 0 0 auto; max-height: 60dvh; }
}

@media (prefers-contrast: more) {
  :root[data-theme=light] { --muted: #333333; --sidebar-muted: #333333; --edge: #565656; }
  :root[data-theme=dark] { --muted: #e0e0e0; --sidebar-muted: #e0e0e0; --edge: #b4b4b4; }
  html[data-theme] :is(.question-box, .source-list .source-title) { outline: 1px solid var(--edge); }
}

@media (forced-colors: active) {
  html[data-theme] .user-message h2 { outline: 1px solid CanvasText; }
  html[data-theme] .send-actions .send-button { border: 1px solid ButtonText; }
}
