:root {
  --page: #f5f6f8;
  --surface: #fff;
  --ink: #202938;
  --muted: #758094;
  --line: #e2e6ed;
  --accent: #225ee8;
  --accent-soft: #edf3ff;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, [role=separator]:focus-visible { outline: 2px solid #8cafff; outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
.app-layout { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
.workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; margin: 0; }
.topbar { display: flex; flex: 0 0 52px; align-items: center; gap: 14px; height: 52px; min-height: 52px; padding: 0 14px; background: white; border-bottom: 1px solid var(--line); z-index: 25; }
.brand { display: flex; align-items: center; padding: 0; margin: 0; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: var(--accent); color: white; font-size: 10px; font-weight: 650; box-shadow: none; }
.computer-picker { display: flex; align-items: center; min-width: 0; max-width: 240px; gap: 0; }
.computer-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.computer-picker select { max-width: 240px; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 5px; padding: 4px 22px 4px 8px; background: white; font-size: 12px; }
.topbar nav { display: flex; align-items: center; align-self: stretch; gap: 3px; margin-left: 14px; }
.topbar nav a { display: flex; align-items: center; padding: 0 12px; color: #778194; font-size: 12px; font-weight: 550; border-bottom: 2px solid transparent; text-decoration: none; }
.topbar nav a:hover { color: var(--ink); background: #f8f9fb; }
.topbar nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.spacer { flex: 1; min-width: 0; }
.connection { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; white-space: nowrap; }
.connection:before { width: 5px; height: 5px; }
.connection.online { color: #4e7c64; }
#connection-notice:empty { display: none; }
#connection-notice .notice { margin: 0; border-radius: 0; padding: 7px 14px; font-size: 12px; }
#view { flex: 1; min-height: 0; min-width: 0; overflow: auto; max-width: none; width: 100%; margin: 0; padding: 20px; }
#view.workspace-view { display: flex; flex-direction: column; padding: 8px; overflow: hidden; }
.button { min-height: 30px; border: 1px solid #dde3ed; border-radius: 5px; padding: 5px 10px; background: white; color: #39465c; font-size: 12px; font-weight: 550; box-shadow: none; white-space: nowrap; }
.button:hover { background: #f4f7fb; border-color: #c0cee5; }
.button.small { min-height: 28px; padding: 4px 9px; font-size: 12px; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: #184fcf; }
.button.danger, .stop-button { border-color: #ebcdcd; color: #b54040; background: white; }
.button:disabled { opacity: .45; cursor: default; }
.button.quiet { background: transparent; border-color: transparent; }
.icon-button { width: 30px; font-size: 17px; padding: 0; }
.menu-popover { position: relative; margin: 0; padding: 0; border: 0; color: #7b8596; }
.menu-popover > summary { display: flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 7px; margin: 0; border-radius: 5px; cursor: pointer; font-size: 12px; list-style: none; white-space: nowrap; }
.menu-popover > summary::-webkit-details-marker { display: none; }
.menu-popover > summary:hover, .menu-popover[open] > summary { background: #eef2f8; color: var(--ink); }
.popover-content { position: absolute; right: 0; top: calc(100% + 7px); z-index: 60; width: 260px; max-width: calc(100vw - 24px); max-height: min(70vh, 500px); overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 8px 30px #24334b20; color: var(--ink); white-space: normal; }
.menu-popover .menu-item { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 10px; font-size: 12px; color: #3d4a60; text-decoration: none; }
.menu-popover .menu-item[aria-pressed=true] { color: var(--accent); background: var(--accent-soft); }
.menu-popover .menu-item:hover { background: #f2f5fa; border-radius: 4px; }
.app-menu .popover-content, .view-menu .popover-content { width: 220px; padding: 5px; }
.computer-layout { display: grid; height: 100%; min-height: 0; min-width: 0; width: 100%; gap: 0; align-items: stretch; }
.task-column, .desktop-column { min-width: 0; min-height: 0; height: 100%; }
.pane-divider { position: relative; cursor: col-resize; touch-action: none; outline-offset: -1px; }
.pane-divider:after { content: ""; position: absolute; width: 2px; height: 32px; top: 50%; left: 3px; margin-top: -16px; background: #cbd3df; border-radius: 2px; }
.pane-divider:hover:after, .resizing .pane-divider:after { background: var(--accent); height: 60px; margin-top: -30px; }
.resizing { user-select: none; }
.computer-layout[data-view=conversation], .computer-layout[data-view=desktop] { grid-template-columns: minmax(0, 1fr) !important; }
.computer-layout[data-view=conversation] > .desktop-column, .computer-layout[data-view=conversation] > .pane-divider,
.computer-layout[data-view=desktop] > .task-column, .computer-layout[data-view=desktop] > .pane-divider { display: none; }
.card { border: 1px solid var(--line); border-radius: 7px; box-shadow: none; }
.agent-workspace { display: flex; flex-direction: column; height: 100%; min-height: 0; margin: 0; padding: 0; overflow: visible; background: white; container-type: inline-size; }
.terminal-toolbar, .remote-toolbar, .controller-screen > .section-head { display: flex; flex: 0 0 43px; align-items: center; flex-wrap: nowrap; gap: 8px; min-width: 0; height: 43px; min-height: 43px; margin: 0; padding: 6px 10px; border-bottom: 1px solid #edf0f5; }
.agent-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #8a93a1; white-space: nowrap; }
.agent-state:before { content: ""; width: 6px; height: 6px; background: #a5adb9; border-radius: 50%; }
.agent-state.working { color: var(--accent); }.agent-state.working:before { background: var(--accent); }
.terminal-models { display: flex; align-items: center; gap: 3px; min-width: 0; padding: 0; margin: 0; border: 0; background: transparent; }
.terminal-models select { width: auto; min-width: 0; min-height: 28px; height: 28px; margin: 0; padding: 3px 18px 3px 5px; border: 0; border-radius: 4px; font-size: 12px; background-color: transparent; color: #3d4b63; }
.terminal-models select:hover { background-color: #f3f5f9; }
.terminal-models select[aria-label=Model] { max-width: 168px; }
.terminal-models select[aria-label="Reasoning effort"] { max-width: 86px; }
.model-name, .effort-name { font-size: 12px; color: #596579; white-space: nowrap; padding: 0 5px; }
.terminal-toolbar .voice-button { font-size: 12px; }
.conversation-menu > summary { padding: 3px 5px; }
.activity-view-options { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0; padding: 0; }
.activity-view-options .button { padding: 5px 8px; font-size: 11px; }
.activity-view-options .button[aria-pressed=true] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.activity-count { display: block; width: 100%; font-size: 10px; margin-top: 4px; }
.terminal-status { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 10px; font-size: 11px; }
.terminal-status .badge { justify-self: start; }
.clean-terminal.ai-output { flex: 1 1 0; min-height: 80px; max-height: none; height: auto; overflow: auto; margin: 0; padding: 12px 18px; border: 0; border-radius: 0; background: white; color: #29364b; font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; scrollbar-color: #d2d9e3 white; overscroll-behavior: contain; }
.terminal-line { display: block; padding: 4px 0; gap: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; border: 0; }
.terminal-line > span:last-child { display: inline; }
.terminal-time { display: none; }
.all-activity .terminal-time { display: block; font: 10px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #929bab; padding: 4px 0 1px; }
.terminal-prompt { padding: 8px 12px; margin: 15px 0 7px; border: 0; border-radius: 5px; font-size: 14px; line-height: 1.5; font-weight: 600; color: #24334c; background: #f2f5fa; }
.terminal-prompt:first-child { margin-top: 0; }
.terminal-response { display: block; margin: 5px 0 16px; padding: 4px 0; font: inherit; color: #29364b; border: 0; }
.terminal-blocked { color: var(--warning); }
.terminal-error { color: #b74949; font: inherit; border: 0; }
.terminal-empty { padding: 15vh 10px; text-align: center; color: #99a2b0; font-size: 14px; }
.clean-terminal a { color: var(--accent); }
.terminal-actions { flex: 0 0 auto; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.terminal-actions:not(:empty) { padding: 10px 0 4px; border: 0; }
.terminal-actions .button { font-size: 12px; }
.compact-prompt { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0; padding: 8px 10px 7px; margin: 0; border: 0; border-top: 1px solid var(--line); background: white; border-radius: 0 0 7px 7px; }
.compact-prompt > textarea { width: 100%; height: 52px; min-height: 52px; max-height: 150px; padding: 5px 7px; border: 0; box-shadow: none; background: white; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; resize: vertical; }
.compact-prompt > textarea:focus { outline: none; box-shadow: none; }
.compact-prompt:focus-within { border-top-color: #97b5f1; }
.task-composer-footer { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 3px 0 0; }
.task-composer-footer > .primary { min-width: 66px; padding: 5px 15px; }
.task-options > summary { font-size: 23px; font-weight: 400; width: auto; min-width: 28px; line-height: 1; padding: 2px 6px; }
.task-options > summary:not(:only-child) { white-space: nowrap; }
.task-options .popover-content { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: 350px; }
.task-options .field { margin: 12px 0 0; }.task-options .check-label { font-size: 12px; }
.usage-menu > summary { font-size: 11px; color: #8791a2; }
.usage-menu .popover-content { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: 300px; }
.terminal-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 0 12px; border: 0; background: transparent; font-size: 11px; }
.plan-usage { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; background: none; font-size: 11px; }.cache-hot { color: #347955; }
.task-mode-status { min-width: 0; max-width: 200px; font-size: 11px; }
.controller-screen { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0; margin: 0; overflow: visible; background: white; }
.remote-toolbar h2, .controller-screen .section-head h2 { margin: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.remote-toolbar select { width: auto; max-width: 225px; min-height: 27px; height: 27px; border: 0; border-radius: 4px; padding: 3px 20px 3px 5px; font-size: 11px; }
.controller-screen .section-head > div:first-child { margin-right: auto; }
.controller-screen .section-head p { display: none; }
.controller-screen .live-tools { display: flex; gap: 6px; }
.remote-surface, .live-screen { display: flex; flex: 1 1 0; align-items: center; justify-content: center; width: 100%; min-height: 0; height: auto; aspect-ratio: auto; padding: 0; border: 0; border-radius: 0 0 7px 7px; background: #edf0f4; overflow: hidden; }
.remote-surface canvas, .live-screen img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.remote-surface:fullscreen { width: 100vw; height: 100vh; border-radius: 0; background: #151b24; }
.remote-surface:fullscreen canvas { max-width: 100vw; max-height: 100vh; }
.desktop-waiting { color: #8b95a4; font-size: 13px; }
.screen-empty { color: #8b95a4; font-size: 13px; }
.remote-manual .popover-content, .manual-controls .popover-content { width: 370px; }
.manual-controls.menu-popover { margin: 0; padding: 0; border: 0; }
.remote-manual .inline-command { display: flex; flex-wrap: wrap; margin: 12px 0; }
.desktop-diagnostics { display: grid; gap: 5px; font-size: 11px; color: #8792a3; border-top: 1px solid var(--line); padding-top: 10px; }
.remote-manual small { display: block; font-size: 11px; color: #8792a3; margin-top: 5px; }
.remote-manual .quick-keys { flex-wrap: wrap; }.remote-manual .quick-keys .button { min-width: 0; }
.voice-panel { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; padding: 8px 12px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.voice-panel audio { display: none; }.voice-pulse { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.voice-button[aria-pressed=true] { border-color: #b5cbfa; background: var(--accent-soft); color: var(--accent); }
.network-notice { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: 90vw; padding: 10px 16px; border-radius: 7px; background: #25354f; color: white; font-size: 12px; box-shadow: 0 5px 25px #25354f25; }
.tools-grid { display: grid; grid-template-columns: 1fr; gap: 9px; padding: 0; }
.tools-grid .computer-panel { padding: 12px 14px; margin: 0; }.tools-grid summary { font-size: 13px; }
#modal:has(.tools-grid) { width: min(960px, calc(100vw - 24px)); max-width: none; }
#modal .popover-content { position: static; border: 0; box-shadow: none; width: auto; padding: 0; }
#modal .table-scroll { max-height: 50vh; }
.reconnect-screen { padding: 15vh 25px; text-align: center; }.reconnect-screen h1 { font-size: 23px; }.reconnect-screen p { color: #8994a5; margin: 15px; }
.login-layout { min-height: 100dvh; background: #f6f8fc; grid-template-columns: 1fr 1fr; gap: 8vw; padding: 10vh 12vw; align-items: center; }
.login-brand { background: transparent; color: #263650; padding: 0; }.login-brand h1 { font-size: 42px; line-height: 1.18; letter-spacing: -1.8px; max-width: 470px; }.login-brand > p { color: #7c889d; max-width: 370px; line-height: 1.7; }.login-brand .eyebrow { color: var(--accent); letter-spacing: 2px; font-size: 10px; margin-top: 26px; }.login-feature-list { color: #7c889d; font-size: 11px; line-height: 2.4; }
.login-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 35px; max-width: 390px; box-shadow: 0 12px 70px #18325b06; }.login-card h2 { font-size: 20px; }.login-card > .muted { font-size: 12px; line-height: 1.6; }.login-card .field { margin: 25px 0 15px; }.login-card input { padding: 12px; border-radius: 7px; }.login-card form > .primary { width: 100%; padding: 12px; }.login-card > a { display: block; margin-top: 20px; color: #8a94a4; font-size: 11px; }
@container (max-width: 440px) {
  .terminal-toolbar { gap: 5px; padding: 6px; }.terminal-toolbar .agent-state { font-size: 0; gap: 0; }
  .terminal-models select[aria-label=Model] { max-width: 130px; }.terminal-models select[aria-label="Reasoning effort"] { max-width: 65px; }
  .terminal-toolbar .button { padding: 4px 6px; }
}
@media (max-width: 860px) {
  .topbar { gap: 8px; padding: 0 10px; }.topbar nav { margin-left: 0; }.topbar nav a { padding: 0 8px; }.computer-picker { max-width: 185px; }
}
@media (max-width: 700px) {
  .topbar { flex: 0 0 auto; height: 85px; min-height: 85px; flex-wrap: wrap; align-content: center; row-gap: 0; column-gap: 7px; padding: 7px 10px 0; }
  .topbar nav { order: 3; flex: 0 0 100%; height: 35px; align-self: auto; margin-top: 2px; }.topbar nav a { padding: 0 12px; font-size: 12px; }
  .topbar .computer-picker { width: auto; max-width: 170px; order: 0; display: flex; }.computer-picker select { max-width: 170px; width: auto; }.computer-name { font-size: 11px; }
  .connection { font-size: 0; gap: 0; }.connection:before { width: 6px; height: 6px; }.topbar > .spacer { display: block; }
  #view.workspace-view { overflow: auto; padding: 6px; }.computer-layout { display: flex; flex-direction: column; height: auto; gap: 10px; }
  .pane-divider { display: none; }.task-column { height: calc(100dvh - 97px); min-height: 280px; flex: 0 0 auto; }.desktop-column { height: 65dvh; min-height: 290px; flex: 0 0 auto; }
  .computer-layout[data-view=conversation] > .task-column, .computer-layout[data-view=desktop] > .desktop-column { height: calc(100dvh - 97px); }
  .clean-terminal.ai-output { padding: 10px 13px; font-size: 14px; }.terminal-prompt { padding: 7px 10px; }.remote-toolbar { padding: 6px 8px; }
  .remote-toolbar select { max-width: 155px; }.remote-toolbar .button { font-size: 11px; padding: 4px 7px; }
  .terminal-toolbar .popover-content { right: -1px; }.compact-prompt { padding: 7px 8px 6px; }.task-mode-status { max-width: 145px; }
  .login-layout { display: flex; flex-direction: column; align-items: stretch; padding: 38px 22px; gap: 30px; }.login-brand h1 { font-size: 34px; max-width: 340px; }.login-brand > .login-feature-list { display: none; }.login-card { padding: 25px; max-width: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* The session toolbar belongs to the terminal pane. */
.session-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; min-height: 43px; padding: 6px 8px; background: white; border-bottom: 1px solid var(--line); border-radius: 7px 7px 0 0; position: relative; z-index: 10; }
.session-controls .terminal-toolbar { display: contents; }
.session-controls > .connection { margin-left: auto; }
.session-controls .terminal-models select[aria-label=Model] { max-width: 140px; }
.session-controls .terminal-models select[aria-label="Reasoning effort"] { max-width: 60px; }
.session-controls .usage-menu .popover-content { top: calc(100% + 7px); bottom: auto; left: auto; right: 0; }
.session-controls .usage-menu > summary::after { content: '▾'; }
@container (max-width: 700px) {
  .session-controls { gap: 4px; }
  .session-controls .agent-state, .session-controls > .connection { font-size: 0; gap: 0; }
  .session-controls .terminal-models select[aria-label=Model] { max-width: 130px; }
  .session-controls .terminal-models select[aria-label="Reasoning effort"] { max-width: 65px; }
  .session-controls .usage-menu > summary { font-size: 10px; padding: 3px; }
}
.history-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.history-prompt, .result-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.badge.blocked { background: var(--warning-soft); color: var(--warning); }
@media (max-width: 700px) { .topbar > .brand { display: none; } }
@container (max-width: 540px) {
  .session-controls { gap: 3px 7px; padding: 5px 8px; }
  .session-controls::before { content: ''; flex-basis: 100%; order: 4; }
  .session-controls .terminal-models { order: 1; }
  .session-controls .voice-button { order: 2; margin-left: auto; }
  .session-controls .stop-button { order: 3; }
  .session-controls > .connection { order: 5; font-size: 11px; gap: 5px; margin: 0 auto 0 0; }
  .session-controls .usage-menu { order: 6; }
  .session-controls .conversation-menu { order: 7; }
  .session-controls .view-menu { order: 8; }
  .session-controls .popover-content, .session-controls .usage-menu .popover-content { position: absolute; top: calc(100% + 4px); left: 5px; right: 5px; width: auto; max-width: none; }
  .session-controls .menu-popover { position: static; }
}

#view.workspace-view > .computer-layout { flex: 1; height: auto; }
@media (max-width: 700px) {
  #view.workspace-view { overflow: hidden; }
  .computer-layout { min-height: 0; }
  .computer-layout > .task-column, .computer-layout > .desktop-column,
  .computer-layout[data-view=conversation] > .task-column, .computer-layout[data-view=desktop] > .desktop-column { height: 100%; min-height: 0; flex: 1; }
}
.view-menu > summary::after, .session-controls .conversation-menu > summary::after { content: '▾'; margin-left: 4px; font-size: 9px; }
.usage-menu > summary::after { content: '▴'; margin-left: 4px; font-size: 9px; }
