/* Paseo 0.18.2 geometry: 14px interface, 15px content, 820px chat column. */
:root {
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --chat-width: 820px;
  --sidebar-width: 280px;
  --control-size: 32px;
  --toolbar-size: 28px;
  --disc-size: 28px;
  --chat-inset: max(24px, calc((100% - var(--chat-width)) / 2));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--p-bg); color: var(--p-text); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--p-border); border-radius: 999px; min-height: var(--control-size); padding: 5px 14px; background: transparent; }
button:hover:not(:disabled) { background: var(--p-soft); }
button:disabled { cursor: default; opacity: 0.4; }
button.primary { color: var(--p-accent-ink); background: var(--p-accent-strong); border-color: transparent; font-weight: 500; }
button.primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--p-accent-strong); }
button.ghost { border: 0; color: var(--p-muted); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid var(--p-border); border-radius: 8px; background: var(--p-raised); padding: 8px 12px; }
label, small { color: var(--p-muted); font-size: 12px; }
h1, h2, h3, p { margin: 0; }
.icon { display: block; width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.iconButton { display: inline-flex; align-items: center; justify-content: center; width: var(--control-size); height: var(--control-size); padding: 0; border: 0; color: var(--p-muted); position: relative; flex: 0 0 auto; }
.iconButton:hover:not(:disabled) { color: var(--p-text); }
.iconButton.small { width: 24px; height: 24px; min-height: 24px; }
.chevron { width: 12px; height: 12px; color: var(--p-muted); }
.providerIcon { width: 16px; height: 16px; flex-shrink: 0; }
html[data-theme='dark'] .providerIcon { filter: invert(1); }
.spacer { flex: 1; min-width: 0; }
.srOnly { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; border: 0 !important; }
.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); height: var(--app-height, 100dvh); overflow: hidden; }
.app.sidebarClosed { grid-template-columns: minmax(0, 1fr); }
.app.sidebarClosed .sidebar { display: none; }
.sidebar { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--p-sidebar); border-right: 1px solid var(--p-border); }
.sidebarChrome { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.sidebarBrand { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sidebarBrand img { width: 20px; height: 20px; }
.sidebarNav { padding: 0 8px 8px; flex-shrink: 0; }
.navRow { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 8px; border: 0; border-radius: 6px; color: var(--p-muted); text-align: left; }
.navRow:hover, .navRow.selected { color: var(--p-text); }
.navRow.selected { background: var(--p-soft); }
.navRow kbd { margin-left: auto; opacity: 0; font-size: 11px; font-family: inherit; }
.navRow:hover kbd { opacity: 1; }
.sidebarSearch { padding: 6px 0; }
.sidebarSearch input { background: var(--p-bg); }
.sectionLabel { display: flex; justify-content: space-between; align-items: center; color: var(--p-muted); font-size: 12px; padding: 8px 16px 4px; flex-shrink: 0; }
.projectList { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 16px; scrollbar-width: thin; }
.project { margin-bottom: 12px; }
.projectHeading { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 6px; text-align: left; }
.projectHeading > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projectHeading .chevron { transition: transform 0.15s; }
.project.collapsed .projectHeading .chevron { transform: rotate(-90deg); }
.project.collapsed .projectThreads { display: none; }
.thread { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 6px; min-height: 32px; padding: 4px 8px 4px 28px; color: var(--p-muted); background: transparent; text-align: left; }
.thread.selected { background: var(--p-soft); color: var(--p-text); }
.thread:hover { color: var(--p-text); }
.threadTitle { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 400; }
.thread .providerIcon { width: 14px; height: 14px; opacity: 0.7; }
.thread .statusDot { margin: 0 2px; }
.thread .threadTime { flex-shrink: 0; font-size: 11px; color: var(--p-muted); }
.sidebarFooter { flex-shrink: 0; display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--p-border); padding: 6px 8px; }
.statusDot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--p-muted); flex: 0 0 auto; }
.statusDot[data-state='running'] { background: #268ae0; animation: breathe 2s ease-in-out infinite; }
.statusDot[data-state='completed'], #hostDot[data-state='running'] { background: #299f51; }
.statusDot[data-state='failed'], .statusDot[data-state='interrupted'], .statusDot[data-state='offline'] { background: #f12e2f; }
.statusDot[data-state='waiting'] { background: #b37824; }
html[data-theme='dark'] .statusDot[data-state='running'] { background: #5caaf6; }
html[data-theme='dark'] .statusDot[data-state='completed'], html[data-theme='dark'] #hostDot[data-state='running'] { background: #35c264; }
html[data-theme='dark'] .statusDot[data-state='failed'], html[data-theme='dark'] .statusDot[data-state='interrupted'], html[data-theme='dark'] .statusDot[data-state='offline'] { background: #f7796d; }
#hostDot { position: absolute; right: 4px; bottom: 4px; }
main { min-width: 0; min-height: 0; position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; grid-template-areas: 'header' 'messages' 'requests' 'progress' 'composer'; }
main > * { min-width: 0; max-width: 100%; }
.chatHeader { grid-area: header; background: var(--p-bg); }
.workspaceHeader { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--p-border); }
.projectBreadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; border: 0; padding: 4px 8px; border-radius: 6px; font-weight: 400; }
.projectBreadcrumb > span { overflow: hidden; text-overflow: ellipsis; }
.workspacePath { color: var(--p-muted); min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.agentTabs { display: flex; align-items: center; min-height: 38px; padding: 0 16px; gap: 8px; border-bottom: 1px solid var(--p-border); }
.agentTab { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.agentTab h1 { min-width: 0; max-width: 44ch; font-size: 14px; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.taskState { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 4px; font-size: 12px; font-weight: 400; color: var(--p-muted); }
.agentTab .taskState { width: 6px; height: 6px; overflow: hidden; border-radius: 50%; background: var(--p-muted); }
.agentTab .taskState .stateText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.taskState[data-state='running'] { color: var(--p-text); }
.agentTab .taskState[data-state='running'] { background: #268ae0; animation: breathe 2s ease-in-out infinite; }
.agentTab .taskState[data-state='completed'] { background: var(--p-success); }
.taskState[data-state='failed'], .taskState[data-state='interrupted'], .taskState[data-state='offline'] { color: var(--p-error); }
.agentTab .taskState[data-state='failed'], .agentTab .taskState[data-state='interrupted'], .agentTab .taskState[data-state='offline'] { background: var(--p-error); }
.modeBadge { font-size: 11px; border-radius: 999px; padding: 1px 7px; color: var(--p-muted); background: var(--p-raised); }
.messages { grid-area: messages; overflow: auto; overflow-wrap: anywhere; padding: 24px var(--chat-inset) 16px; min-height: 0; scrollbar-gutter: stable; overscroll-behavior: contain; }
#items { min-width: 0; }
.item { min-width: 0; margin: 0; font-size: 15px; }
.item > header { font-size: 12px; color: var(--p-muted); }
.item[data-type='agentMessage'] { padding: 12px 0; }
.item[data-type='agentMessage'] > header, .item[data-type='userMessage'] > header, .item[data-type='plan'] > header { display: none; }
.item[data-type='userMessage'] { width: fit-content; max-width: 100%; margin: 16px 0 16px auto; padding: 16px; border-radius: 16px 2px 16px 16px; background: var(--p-user); font-size: 15px; line-height: 1.4; }
.item pre { font: inherit; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.messageContent { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.messageContent > :first-child { margin-top: 0; }
.messageContent > :last-child { margin-bottom: 0; }
.messageContent p, .messageContent ul, .messageContent ol { margin: 0.65em 0; }
.messageContent ul, .messageContent ol { padding-left: 1.5em; }
.messageContent h1, .messageContent h2, .messageContent h3, .messageContent h4 { font-size: 1em; font-weight: 600; margin: 16px 0 8px; }
.messageContent a { color: var(--p-link); text-decoration: none; }
.messageContent a:hover { text-decoration: underline; }
.messageContent blockquote { margin: 12px 0; padding-left: 12px; border-left: 2px solid var(--p-border); color: var(--p-muted); }
.messageContent code, .toolDescription, .toolItem pre, .diffLines, .rawView { font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace; font-size: 12px; }
.messageContent :not(pre) > code { padding: 1px 4px; background: var(--p-raised); border-radius: 4px; }
.messageContent pre { padding: 12px 16px; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 8px; overflow-x: auto; white-space: pre; }
.tableScroller { overflow-x: auto; max-width: 100%; margin: 12px 0; }
.messageContent table { width: 100%; border-collapse: collapse; font-size: 14px; }
.messageContent th, .messageContent td { padding: 8px 12px; border-bottom: 1px solid var(--p-border); text-align: left; min-width: 100px; vertical-align: top; }
.messageContent th { font-weight: 500; background: var(--p-surface); }
.toolItem, .thinking, .fileChanges { margin: 0 -12px 4px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.toolItem > summary, .thinking > summary, .fileChanges > summary { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 8px; color: var(--p-muted); }
.toolItem > summary::after, .thinking > summary::after, .fileChanges > summary::after, .fileDiff > summary::after { content: ''; width: 6px; height: 6px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-left: auto; }
.toolItem[open] > summary::after, .thinking[open] > summary::after, .fileChanges[open] > summary::after, .fileDiff[open] > summary::after { transform: rotate(45deg); }
.toolItem > summary:hover, .thinking > summary:hover, .fileChanges > summary:hover { background: var(--p-soft); border-radius: 8px; color: var(--p-text); }
.toolItem > summary .icon, .thinking > summary .icon { width: 16px; height: 16px; margin: 0 3px; }
.toolLabel { font-size: 14px; white-space: nowrap; }
.toolDescription, .thinkingPreview { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--p-muted); font: inherit; }
.toolPreview { display: none; }
.toolItem[open], .thinking[open] { border-color: var(--p-border); background: var(--p-surface); }
.toolItem > pre, .thinkingCurrent { padding: 12px 16px; border-top: 1px solid var(--p-border); }
.thinking > summary .taskState { white-space: nowrap; }
.thinking > details { padding: 4px 16px 12px; }
.thinking > details > summary { color: var(--p-muted); font-size: 12px; }
.thinking > details pre { margin-top: 8px; }
.thinking[data-running='true'] > summary .stateText { color: transparent; background: linear-gradient(100deg, var(--p-muted) 30%, var(--p-text) 50%, var(--p-muted) 70%); background-size: 250% 100%; background-clip: text; animation: shimmer 2s linear infinite; }
.thinking[data-running='true'] > summary > .icon { animation: breathe 2s ease-in-out infinite; }
.failedItem > summary, .failedItem .toolLabel { color: var(--p-error); }
.item[data-type='taskStatus'] { font-size: 12px; color: var(--p-muted); padding: 8px 0 16px; }
.item[data-type='taskStatus'] > header { display: none; }
.item[data-type='taskError'], #notice, .error, #nativeError, #accountError, #modelError, #loginError { color: var(--p-error); font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.item[data-type='taskError'] { padding: 8px 0 16px; }
.item[data-type='taskError'] > header { display: none; }
.item[data-type='contextCompaction'] { border-block: 1px solid var(--p-border); margin: 16px 0; padding: 12px 0; color: var(--p-muted); font-size: 12px; }
.empty { height: 100%; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 12px; color: var(--p-muted); text-align: center; }
.empty h2 { color: var(--p-text); font-size: 20px; font-weight: 500; }
.empty p { font-size: 14px; }
.latest { grid-area: messages; z-index: 3; justify-self: center; align-self: end; margin-bottom: 16px; color: var(--p-text); background: var(--p-raised); border: 1px solid var(--p-border); box-shadow: 0 2px 6px #0001; }
.requests { grid-area: requests; max-height: 30vh; overflow-y: auto; padding-inline: var(--chat-inset); }
.request { padding: 12px; border: 1px solid var(--p-border); border-radius: 12px; background: var(--p-surface); }
.request p, .request pre { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.request button { margin: 4px; }
.conversationStatus { grid-area: progress; padding: 4px var(--chat-inset); display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--p-muted); font-size: 12px; }
.taskTime { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sendStatus[data-kind='error'] { color: var(--p-error); }
.composerDock { grid-area: composer; padding: 4px var(--chat-inset) max(16px, env(safe-area-inset-bottom)); }
.composer { position: relative; display: flex; flex-direction: column; border: 1px solid var(--p-border); border-radius: 16px; padding: 16px 16px 12px; background: var(--p-surface); min-width: 0; gap: 8px; }
.composer:focus-within { border-color: var(--p-border); }
.composer textarea { padding: 0; margin: 0; min-height: 48px; max-height: min(30vh, 220px); font-size: 15px; line-height: 1.5; resize: none; outline: 0; border: 0; border-radius: 0; background: transparent; }
.composer textarea::placeholder { color: var(--p-extra-muted, var(--p-muted)); }
.composerTools { display: flex; align-items: center; gap: 4px; margin: 0 -6px -6px; min-width: 0; }
.composerTools > .iconButton { width: var(--toolbar-size); height: var(--toolbar-size); min-height: var(--toolbar-size); }
.modelPicker, .effortPicker { display: flex; align-items: center; gap: 6px; border: 0; min-height: var(--toolbar-size); padding: 4px 8px; color: var(--p-muted); font-size: 12px; }
.modelPicker { min-width: 0; max-width: 45%; }
.modelPicker > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modelPicker .providerIcon { width: 14px; height: 14px; }
.effortPicker .icon { width: 14px; height: 14px; }
.sendDisc { display: flex; align-items: center; justify-content: center; width: var(--disc-size); height: var(--disc-size); min-height: var(--disc-size); padding: 0; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--p-text); color: var(--p-bg); }
.sendDisc:hover:not(:disabled) { background: var(--p-text); opacity: 0.85; }
.sendDisc:disabled { background: var(--p-raised); color: var(--p-muted); opacity: 1; }
.sendDisc .icon { width: 16px; height: 16px; stroke-width: 2; }
#send[aria-busy='true'] .icon { animation: spin 1s linear infinite; }
.contextRing { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--p-muted) calc(var(--context-used, 0) * 1%), var(--p-border) 0); mask: radial-gradient(circle, transparent 6px, #000 6.2px); }
#contextMeter { display: none; }
.references { display: flex; flex-wrap: wrap; gap: 4px; }
.references button { padding: 4px 8px; min-height: 24px; font-size: 12px; border-radius: 6px; background: var(--p-raised); max-width: 100%; overflow-wrap: anywhere; }
.commandMenu { position: absolute; bottom: calc(100% + 8px); inset-inline: 0; z-index: 10; padding: 4px; border: 1px solid var(--p-border); border-radius: 12px; background: var(--p-raised); box-shadow: 0 8px 24px #0002; max-height: min(42vh, 360px); overflow-y: auto; }
.commandOption { display: grid; grid-template-columns: minmax(100px, 30%) minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 6px; padding: 8px; text-align: left; }
.commandOption code { color: var(--p-text); font: inherit; }
.commandOption small { overflow-wrap: anywhere; }
.commandOption.selected { background: var(--p-soft); }
.commandOption[aria-disabled='true'] { opacity: 0.5; }
.commandOptionLabel, .commandCategory { color: var(--p-muted); padding: 8px; font-size: 12px; }
#checkSend { align-self: flex-start; min-height: 28px; font-size: 12px; padding: 4px 0; }
.menuSurface { padding: 4px; border: 1px solid var(--p-border); border-radius: 12px; background: var(--p-raised); color: var(--p-text); box-shadow: 0 8px 24px #0002; width: 240px; }
.menuSurface > button { display: flex; align-items: center; gap: 8px; border: 0; width: 100%; text-align: left; border-radius: 6px; padding: 8px; font-size: 14px; }
.menuSurface label, .menuSurface p { display: block; padding: 8px; font-size: 12px; }
.menuSurface select { margin-top: 8px; }
#sessionMenu { inset: 52px 16px auto auto; margin: 0; }
#composerMenu { inset: auto 24px 110px auto; margin: 0; }
#attachmentMenu { inset: auto auto 110px max(24px, calc((100vw - var(--chat-width) + var(--sidebar-width)) / 2)); margin: 0; }
#powerMenu { inset: auto auto 110px 16px; margin: 0; }
dialog { width: min(480px, calc(100% - 32px)); max-height: min(85dvh, 860px); padding: 0; border: 1px solid var(--p-border); border-radius: 16px; background: var(--p-raised); color: var(--p-text); overflow-y: auto; }
dialog::backdrop { background: #0005; }
dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; position: sticky; top: 0; z-index: 2; background: var(--p-raised); border-bottom: 1px solid var(--p-border); }
dialog h2 { font-size: 16px; font-weight: 500; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
dialog > header > button:not(.iconButton) { min-height: 28px; font-size: 12px; padding: 4px 10px; }
.settingsSection { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; }
.settingsSection + .settingsSection { border-top: 1px solid var(--p-border); }
.settingsSection h3 { font-size: 14px; font-weight: 500; }
.settingsSection input, .settingsSection select { margin-top: 4px; }
.checkboxLabel { display: flex; align-items: flex-start; gap: 8px; }
.checkboxLabel input { width: 16px; height: 16px; margin-top: 2px; }
.sessionDetails { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.sessionDetails dt { color: var(--p-muted); font-size: 12px; }
.sessionDetails dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.nativeSection { gap: 12px; }
.nativeSection pre, .rawView pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, monospace; }
.nativeChoices { display: flex; flex-direction: column; gap: 4px; }
.nativeChoice { width: 100%; border: 0; text-align: left; border-radius: 8px; }
.nativeChoice strong, .nativeChoice small { display: block; overflow-wrap: anywhere; }
.nativeActions { display: flex; flex-wrap: wrap; gap: 8px; }
.nativeForm { display: grid; gap: 12px; }
.nativeForm label { display: grid; gap: 4px; }
.nativeForm input[type='checkbox'] { width: auto; }
.hostDialog { width: min(380px, calc(100% - 32px)); }
.engineBar { padding: 8px; }
.hostRow { display: flex; align-items: center; gap: 12px; padding: 12px 8px; }
.hostAvatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #4377a8; color: white; }
.hostDescription { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.hostDescription strong { font-size: 14px; font-weight: 500; }
#engineStatus, #connection { color: var(--p-muted); font-size: 12px; }
#engineStatus { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#connection { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#connection::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--p-warning); }
#connection[data-connected='true']::before { background: #299f51; }
#connection[data-state='offline']::before { background: var(--p-error); }
.attention { margin: 4px 12px; padding: 6px 8px; font-size: 12px; color: var(--p-warning); }
.fileChanges[open] { padding-bottom: 4px; }
.fileChanges > .diffNote { font-size: 12px; color: var(--p-muted); padding: 4px 12px; }
.fileDiff { border: 1px solid var(--p-border); border-radius: 8px; margin: 4px 12px; overflow: hidden; }
.fileDiff > summary { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; background: var(--p-surface); font-size: 12px; }
.filePath { min-width: 0; flex: 1; overflow-wrap: anywhere; font: 12px ui-monospace, monospace; }
.fileKind, .diffNote { color: var(--p-muted); font-size: 12px; }
.diffCounts { display: inline-flex; gap: 8px; flex-shrink: 0; font: 12px ui-monospace, monospace; }
.diffAdded { color: var(--p-success); }
.diffRemoved { color: var(--p-error); }
.diffScroller { max-width: 100%; overflow-x: auto; touch-action: pan-x pan-y; border-top: 1px solid var(--p-border); }
.diffLines { display: table; width: max-content; min-width: 100%; line-height: 22px; font-size: 12px; }
.diffLine { display: table-row; }
.diffLine > * { display: table-cell; padding: 0 8px; white-space: pre; }
.diffLine .lineNumber { color: var(--p-muted); min-width: 44px; text-align: right; user-select: none; border-right: 1px solid var(--p-border); }
.diffLine[data-kind='add'] { background: #15803d13; color: #15803d; }
.diffLine[data-kind='delete'] { background: #b91c1c13; color: #b91c1c; }
.diffLine[data-kind='hunk'], .diffHeading { color: var(--p-muted); background: var(--p-raised); }
html[data-theme='dark'] .diffLine[data-kind='add'] { background: #4ade8012; color: #a6e9ba; }
html[data-theme='dark'] .diffLine[data-kind='delete'] { background: #ef444418; color: #f6b0aa; }
.login { height: var(--app-height, 100dvh); display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.loginCard { width: min(100%, 340px); display: grid; gap: 12px; }
.loginCard h1 { font-size: 20px; font-weight: 500; }
.loginCard > p { margin-bottom: 12px; color: var(--p-muted); }
.loginCard input { background: var(--p-surface); }
.loginCard > label { margin-bottom: -8px; }
.loginCard > button { margin-top: 4px; }
.sidebarBackdrop { position: fixed; inset: 0; z-index: 20; border: 0; border-radius: 0; background: #0006; padding: 0; }
@keyframes breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 960px), (max-height: 540px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(340px, calc(100vw - 48px)); z-index: 21; border: 0; transform: translateX(-100%); transition: transform 0.18s ease; padding-top: env(safe-area-inset-top); }
  .app.sidebarOpen .sidebar { transform: translateX(0); }
  .app.sidebarClosed .sidebar { display: flex; }
  .workspacePath { display: none; }
  .workspaceHeader { border-bottom: 0; }
  .agentTabs { min-height: 32px; }
  .messages { padding: 16px 20px; }
  .composerDock { padding-inline: 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .conversationStatus, .requests { padding-inline: 20px; }
  .taskTime, .sendStatus { font-size: 12px; }
  .commandMenu { inset-inline: 0; }
  #attachmentMenu { left: 12px; bottom: 120px; }
  dialog { max-height: 85dvh; }
}
@media (max-width: 640px), (pointer: coarse) {
  :root { --control-size: 44px; --toolbar-size: 36px; --disc-size: 36px; }
  .iconButton > .icon { width: 20px; height: 20px; }
  .sidebarChrome { height: 56px; }
  .sidebarNav .navRow { min-height: 40px; }
  .projectHeading, .thread { min-height: 40px; }
  .sidebarFooter { padding: 6px 8px; gap: 0; }
  .workspaceHeader { min-height: 48px; gap: 4px; padding: 0 8px; }
  .agentTab { padding-block: 4px; }
  .projectBreadcrumb { gap: 6px; }
  .composer { padding: 12px 16px 4px; border-radius: 26px; }
  .composerTools { min-height: 44px; margin: 0 -6px; gap: 0; }
  .composerTools .iconButton { width: 36px; height: 36px; min-height: 36px; }
  .composerTools .icon { width: 20px; height: 20px; }
  .composer textarea { min-height: 44px; font-size: 16px; }
  .modelPicker { font-size: 13px; gap: 6px; max-width: 43%; padding-inline: 6px; }
  .modelPicker .providerIcon { width: 16px; height: 16px; }
  .effortPicker { width: 36px; min-width: 36px; height: 36px; padding: 0; justify-content: center; }
  .effortPicker span { display: none; }
  .effortPicker .icon { width: 20px; height: 20px; }
  .sendDisc { margin-left: 6px; }
  .sendDisc .icon { width: 20px; height: 20px; }
  .menuSurface { max-width: calc(100vw - 24px); }
  dialog.hostDialog { margin: auto 8px 8px; width: calc(100% - 16px); border-radius: 20px; }
}
@media (max-height: 540px) {
  .agentTabs { display: none; }
  .messages { padding-block: 8px; }
  .composerDock { padding-bottom: 4px; }
  .composer textarea { min-height: 32px; max-height: 24vh; }
  .composer { padding-top: 8px; }
  .empty { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Settings use one navigation rail and one page, as in the original client. */
.settingsDialog { width: min(900px, calc(100vw - 64px)); height: min(680px, calc(100dvh - 64px)); max-height: none; overflow: hidden; background: var(--p-bg); }
.settingsDialog > header { height: 56px; border-bottom: 1px solid var(--p-border); background: var(--p-bg); padding: 8px 16px 8px 24px; }
.settingsLayout { height: calc(100% - 56px); display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.settingsNav { background: var(--p-sidebar); padding: 12px 8px; border-right: 1px solid var(--p-border); }
.settingsNav button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 6px; padding: 8px 12px; margin-bottom: 4px; color: var(--p-muted); text-align: left; }
.settingsNav button[aria-selected='true'] { color: var(--p-text); background: var(--p-soft); }
.settingsContent { min-height: 0; min-width: 0; overflow-y: auto; padding: 28px 32px; }
.settingsPage { display: flex; flex-direction: column; gap: 16px; }
.settingsPage h3 { font-size: 16px; font-weight: 500; }
.sectionDescription { color: var(--p-muted); font-size: 12px; line-height: 1.6; }
.settingsCard { border: 1px solid var(--p-border); border-radius: 12px; overflow: hidden; }
.settingRow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; min-width: 0; }
.settingRow + .settingRow { border-top: 1px solid var(--p-border); }
.settingRow > div { min-width: 0; flex: 1; }
.settingRow strong { display: block; font-size: 14px; font-weight: 400; }
.settingRow small { display: block; margin-top: 4px; }
.settingRow > select { width: auto; max-width: 52%; font-size: 12px; min-height: 32px; border-radius: 999px; background: transparent; }
.settingRow > button { flex-shrink: 0; }
.settingRow > label { font-size: 14px; color: var(--p-text); }
.fieldCard { display: grid; gap: 8px; padding: 16px; }
.fieldCard > label:not(:first-child) { margin-top: 8px; }
.fieldCard input { background: var(--p-bg); min-height: 36px; }
.fieldCard .checkboxLabel { line-height: 1.5; margin-top: 12px; }
.formActions { display: flex; justify-content: flex-end; }
.formResult:empty { display: none; }
.formResult { font-size: 12px; color: var(--p-muted); }
.themePreview { height: 150px; display: grid; grid-template-columns: 26% minmax(0, 1fr); background: var(--p-bg); border: 1px solid var(--p-border); border-radius: 12px; overflow: hidden; }
.previewSide { background: var(--p-sidebar); border-right: 1px solid var(--p-border); padding: 24px 12px; }
.previewSide i { display: block; height: 6px; background: var(--p-hover); border-radius: 4px; margin-bottom: 12px; }
.previewSide i:last-child { width: 70%; }
.previewChat { padding: 20px 24px; }
.previewChat span { display: block; width: 50%; height: 18px; background: var(--p-user); margin: 0 0 16px auto; border-radius: 8px 2px 8px 8px; }
.previewChat p { width: 75%; height: 5px; background: var(--p-hover); border-radius: 4px; margin-bottom: 6px; }
.previewChat p:last-of-type { width: 50%; }
.previewChat > div { border: 1px solid var(--p-border); border-radius: 12px; height: 24px; margin-top: 16px; background: var(--p-surface); }
.modelDialog { width: min(480px, calc(100vw - 32px)); background: var(--p-bg); }
.modelDialog > header, .effortDialog > header { background: var(--p-bg); border-bottom: 0; padding: 12px 16px; }
.modelSearch { margin: 0 16px 12px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 10px; }
.modelSearch input { border: 0; outline: 0; background: transparent; padding-inline: 0; min-height: 36px; font-size: 14px; }
.modelProviderHeading { display: flex; align-items: center; gap: 8px; padding: 8px 20px; color: var(--p-muted); font-size: 12px; }
.modelProviderHeading small { margin-left: auto; }
.modelChoices { padding: 0 8px; max-height: 35vh; overflow-y: auto; }
.choiceRow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; border: 0; border-radius: 8px; color: var(--p-text); }
.choiceRow > span { flex: 1; min-width: 0; }
.choiceRow strong { display: block; font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.choiceRow small { display: block; font-size: 12px; color: var(--p-muted); line-height: 1.5; margin-top: 3px; }
.choiceRow > .icon:last-child { color: transparent; }
.choiceRow[aria-selected='true'], .choiceRow[aria-pressed='true'] { background: var(--p-soft); }
.choiceRow[aria-selected='true'] > .icon:last-child, .choiceRow[aria-pressed='true'] > .icon:last-child { color: var(--p-text); }
.customModel { padding: 12px 20px; font-size: 12px; color: var(--p-muted); border-bottom: 1px solid var(--p-border); }
.customModel input { margin-top: 8px; font-size: 14px; color: var(--p-text); background: var(--p-bg); }
.modelAdvanced { padding-inline: 4px; }
.modelAdvanced .settingRow { padding: 12px 16px; }
.modelAdvanced .settingRow label { font-size: 12px; color: var(--p-muted); }
.modelFooter { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--p-border); }
.modelFooter > span { color: var(--p-muted); font-size: 12px; }
.modelDialog .formResult, .effortDialog .formResult { margin: 8px 20px; }
.noResults { color: var(--p-muted); padding: 16px 12px; font-size: 12px; }
.effortDialog { width: min(380px, calc(100vw - 32px)); background: var(--p-bg); }
.effortChoices { padding: 0 8px 12px; max-height: 40vh; overflow-y: auto; }
.effortCustom { padding: 12px 20px; border-top: 1px solid var(--p-border); }
.effortCustom input { margin-top: 8px; }
@media (max-width: 640px) {
  .settingsDialog { width: 100%; height: var(--app-height, 100dvh); max-height: none; max-width: none; border: 0; border-radius: 0; margin: 0; }
  .settingsLayout { display: flex; flex-direction: column; }
  .settingsNav { display: flex; padding: 8px 12px; gap: 4px; background: var(--p-bg); border-right: 0; border-bottom: 1px solid var(--p-border); }
  .settingsNav button { width: auto; flex: 1; justify-content: center; gap: 6px; margin: 0; min-height: 36px; font-size: 12px; }
  .settingsNav button > .icon { width: 16px; height: 16px; }
  .settingsContent { flex: 1; padding: 20px 16px; }
  .settingRow { gap: 12px; padding: 16px; }
  .themePreview { height: 160px; }
  .modelDialog, .effortDialog, #nativeDialog { margin: auto 8px 8px; width: calc(100% - 16px); border-radius: 20px; max-height: 85dvh; }
  .modelSearch input { font-size: 16px; min-height: 40px; }
  .choiceRow { padding: 12px; }
  .modelFooter { padding: 12px 20px; }
  .modelFooter .primary { min-height: 36px; }
  .modelFooter > span { max-width: 55%; }
}
