:root {
  color-scheme: dark;
  --canvas: oklch(0.145 0.006 275);
  --sidebar: oklch(0.165 0.007 275);
  --surface-1: oklch(0.19 0.008 275);
  --surface-2: oklch(0.225 0.01 275);
  --surface-3: oklch(0.265 0.012 275);
  --surface-hover: oklch(0.24 0.012 275);
  --text-1: oklch(0.94 0.006 275);
  --text-2: oklch(0.72 0.012 275);
  --text-3: oklch(0.56 0.012 275);
  --border-subtle: oklch(0.98 0.004 275 / 0.06);
  --border-standard: oklch(0.98 0.004 275 / 0.1);
  --accent: oklch(0.67 0.17 286);
  --accent-soft: oklch(0.29 0.055 286);
  --accent-muted: oklch(0.37 0.08 286);
  --success: oklch(0.74 0.13 164);
  --warning: oklch(0.78 0.12 82);
  --danger: oklch(0.68 0.18 25);
  --display-scale: 1;
  --display-scale-inverse: 1;
  --sidebar-width: 256px;
  --header-height: 64px;
  --content-width: 820px;
  --composer-width: 800px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text-1);
}

body {
  min-width: 320px;
  line-height: 1.5;
}

button,
textarea,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 1000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  clip: auto;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100%;
  height: calc(100dvh * var(--display-scale-inverse));
  background: var(--canvas);
  zoom: var(--display-scale);
}

@supports not (zoom: 1) {
  .app-shell {
    width: calc(100% * var(--display-scale-inverse));
    transform: scale(var(--display-scale));
    transform-origin: left top;
  }
}

.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  background: var(--sidebar);
  padding: 8px 10px 10px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 4px;
}

.brand,
.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
}

.brand {
  color: var(--text-1);
}

.brand-mark,
.empty-mark {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 22px;
  font-weight: 760;
  font-style: italic;
  letter-spacing: -0.08em;
}

.icon-button:active,
.nav-row:active,
.history-row:active,
.project-row:active,
.account-row:active,
.context-chip:active,
.tool-button:active,
.mode-button:active,
.send-button:active,
.stop-button:active {
  transform: scale(0.96);
}

.primary-nav {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.nav-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 0 10px;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: background-color 140ms var(--ease-out), transform 100ms var(--ease-out);
}

.nav-row svg {
  width: 18px;
  height: 18px;
}

.nav-row kbd {
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}

.nav-row-active {
  background: var(--surface-2);
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.sidebar-bottom {
  flex: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.display-settings-row {
  width: 100%;
}

.display-settings-row output {
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.nav-section {
  margin-top: 20px;
}

.section-heading {
  display: flex;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.section-toggle {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.section-toggle svg {
  width: 14px;
  height: 14px;
}

.project-list {
  display: grid;
  gap: 3px;
}

.project-group {
  min-width: 0;
}

.project-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 16px;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0 10px;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
}

.project-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-count {
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.project-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-3);
  transition: transform 200ms var(--ease-out);
}

.project-group-open .project-chevron {
  transform: rotate(90deg);
}

.project-conversations {
  display: none;
  gap: 2px;
  margin: 2px 0 5px 19px;
  border-left: 1px solid var(--border-subtle);
  padding-left: 5px;
}

.project-group-open .project-conversations {
  display: grid;
}

.project-row-active {
  background: var(--surface-1);
  color: var(--text-1);
}

.project-dot {
  width: 8px;
  height: 8px;
  justify-self: center;
  border-radius: 50%;
  background: var(--text-3);
}

.project-general { background: oklch(0.72 0.01 275); }
.project-nvda { background: oklch(0.72 0.13 145); }
.project-monad { background: var(--accent); }
.project-ava { background: oklch(0.76 0.12 78); }

.project-add svg {
  width: 16px;
  height: 16px;
  justify-self: center;
}

.project-add {
  grid-template-columns: 20px minmax(0, 1fr);
  margin-top: 5px;
}

.date-label {
  margin: 12px 10px 4px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 580;
}

.history-row {
  display: grid;
  width: 100%;
  min-height: 52px;
  align-content: center;
  gap: 2px;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 7px 10px;
  color: var(--text-2);
  text-align: left;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
}

.project-chat {
  min-height: 48px;
  border-radius: 10px;
  padding: 6px 8px 6px 10px;
}

.history-row-active {
  background: var(--surface-2);
  color: var(--text-1);
}

.history-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-complete { background: var(--success); }
.status-running { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }

.account-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 7px 8px;
  color: var(--text-2);
  text-align: left;
  transition: background-color 140ms var(--ease-out), transform 100ms var(--ease-out);
}

.account-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 700;
}

.account-copy {
  display: grid;
  min-width: 0;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong { color: var(--text-1); font-size: 12px; font-weight: 600; }
.account-copy small { color: var(--text-3); font-size: 10px; }
.account-row > svg { width: 16px; height: 16px; }

.workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas);
}

.workspace-header {
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  height: var(--header-height);
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--canvas);
  padding: 0 20px;
}

.conversation-identity {
  min-width: 0;
}

.conversation-title-line,
.scope-line {
  display: flex;
  min-width: 0;
  align-items: center;
}

.conversation-title-line {
  gap: 9px;
}

.conversation-title-line h1 {
  overflow: hidden;
  margin: 0;
  color: var(--text-1);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-status {
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  padding: 2px 7px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 620;
}

.title-status.status-live {
  background: var(--accent-soft);
  color: oklch(0.83 0.09 286);
}

.scope-line {
  gap: 5px;
  margin-top: 2px;
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.scope-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.header-actions {
  display: flex;
  gap: 2px;
}

.header-actions .icon-button {
  width: 36px;
  height: 36px;
}

.header-actions svg {
  width: 17px;
  height: 17px;
}

.mobile-menu,
.mobile-backdrop {
  display: none;
}

.view {
  position: absolute;
  inset: var(--header-height) 0 0;
  min-height: 0;
}

.conversation-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 34px 24px 220px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.conversation-column {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.user-message {
  width: fit-content;
  max-width: min(84%, 720px);
  margin-left: auto;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg);
  background: var(--accent-soft);
  padding: 18px 22px;
  color: oklch(0.92 0.018 286);
  font-size: 16px;
  line-height: 1.78;
  text-wrap: pretty;
}

.agent-turn {
  margin-top: 32px;
}

.process-card {
  overflow: hidden;
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.process-header {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 0 16px;
  color: var(--text-2);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.process-header svg {
  width: 17px;
  height: 17px;
  transition: transform 240ms var(--ease-out);
}

.process-open .process-header svg {
  transform: rotate(90deg);
}

.process-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.process-state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.process-done { background: var(--success); }
.process-live { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }

.process-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms var(--ease-out);
}

.process-open .process-body {
  grid-template-rows: 1fr;
}

.process-log {
  min-height: 0;
  max-height: min(52vh, 520px);
  overflow: hidden auto;
  border-top: 1px solid transparent;
  padding: 0 16px;
  color: var(--text-2);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.process-open .process-log {
  border-top-color: var(--border-subtle);
  padding-top: 12px;
  padding-bottom: 12px;
}

.process-event {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
}

.process-event + .process-event {
  border-top: 1px solid var(--border-subtle);
}

.event-index {
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.process-event p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

.process-event code,
.final-answer code {
  border: 1px solid var(--border-standard);
  border-radius: 5px;
  background: var(--surface-3);
  padding: 2px 6px;
  color: oklch(0.82 0.1 286);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 0.9em;
}

.event-active {
  color: var(--text-1);
}

.event-active .event-index {
  color: var(--accent);
}

.final-answer {
  margin-top: 30px;
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.78;
}

.answer-kicker {
  margin: 0 0 8px;
  color: var(--success);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.final-answer h2,
.final-answer h3 {
  color: var(--text-1);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  text-wrap: balance;
}

.final-answer h2 {
  margin: 0 0 18px;
  font-size: clamp(23px, 2.1vw, 30px);
  font-weight: 680;
  line-height: 1.28;
  letter-spacing: -0.018em;
}

.final-answer h3 {
  margin: 30px 0 8px;
  font-size: 17px;
  font-weight: 680;
}

.final-answer p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.final-answer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--text-2);
}

.final-answer li::marker {
  color: var(--accent);
}

.answer-callout {
  margin-top: 30px;
  border-top: 1px solid var(--border-standard);
  border-bottom: 1px solid var(--border-standard);
  padding: 18px 0;
}

.answer-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.answer-callout p {
  margin: 0;
  color: var(--text-2);
}

.source-line {
  margin-top: 24px !important;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
}

.stream-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--text-3);
  font-size: 12px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: typing 1.25s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 120ms; }
.typing-dot:nth-child(3) { animation-delay: 240ms; margin-right: 3px; }

.composer-dock {
  position: absolute;
  z-index: 12;
  inset: auto 0 0;
  padding: 16px 24px max(14px, env(safe-area-inset-bottom));
  background: var(--canvas);
  pointer-events: none;
}

.composer-column {
  width: min(100%, var(--composer-width));
  margin: 0 auto;
  pointer-events: auto;
}

.context-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  padding: 5px 9px;
  color: var(--text-3);
  font-size: 11px;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
}

.context-chip svg {
  width: 15px;
  height: 15px;
}

.context-chip[aria-pressed="true"] {
  border-color: oklch(0.67 0.17 286 / 0.52);
  background: var(--accent-soft);
  color: oklch(0.84 0.08 286);
}

.context-chip:disabled {
  cursor: default;
  opacity: 0.76;
}

.composer {
  min-height: 116px;
  overflow: hidden;
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 60px;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 15px 17px 8px;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: var(--text-3);
}

.composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 10px 8px;
}

.composer-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.tool-button,
.mode-button,
.send-button {
  display: inline-grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out), opacity 140ms var(--ease-out);
}

.tool-button svg,
.send-button svg {
  width: 17px;
  height: 17px;
}

.mode-button {
  display: inline-flex;
  gap: 4px;
  padding: 0 8px;
  font-size: 11px;
}

.mode-button svg {
  width: 13px;
  height: 13px;
}

.composer-model {
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
}

.send-button {
  border-radius: var(--radius-pill);
  background: var(--text-1);
  color: var(--canvas);
}

.send-button:disabled {
  background: var(--surface-3);
  color: var(--text-3);
  cursor: default;
  opacity: 0.7;
}

.disclaimer {
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 10px;
  text-align: center;
}

.composer-running {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  min-height: 92px;
  align-items: center;
  padding: 14px 14px 14px 17px;
}

.running-copy {
  display: grid;
  gap: 5px;
}

.running-copy strong {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 560;
}

.running-copy span {
  color: var(--text-3);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 11px;
}

.stop-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  transition: transform 100ms var(--ease-out), opacity 140ms var(--ease-out);
}

.stop-button span {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: oklch(0.98 0 0);
}

.empty-stage {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  justify-items: center;
  gap: 28px;
  padding: 24px 24px 12vh;
}

.empty-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.empty-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border: 1px solid var(--border-standard);
  border-radius: 50%;
  background: var(--surface-1);
  font-size: 26px;
}

.empty-copy h2 {
  margin: 0;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 680;
  line-height: 1;
  letter-spacing: -0.028em;
}

.empty-copy p {
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 13px;
}

.empty-composer-wrap {
  display: grid;
  width: min(800px, calc(100vw - var(--sidebar-width) - 96px));
  justify-items: center;
}

.composer-empty {
  width: 100%;
  min-height: 104px;
}

.empty-context {
  margin-top: 10px;
  margin-bottom: 0;
}

.search-panel {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: start center;
  background: rgba(3, 4, 5, 0.72);
  padding-top: min(14vh, 120px);
}

.search-dialog {
  width: min(620px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.48);
}

.search-input-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  color: var(--text-3);
}

.search-input-row input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-1);
  font-size: 15px;
}

.search-input-row input::placeholder { color: var(--text-3); }
.search-input-row kbd { font-family: "SF Mono", monospace; font-size: 10px; }

.search-results {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.search-results > p {
  margin: 4px 8px;
  color: var(--text-3);
  font-size: 11px;
}

.search-results button {
  display: grid;
  min-height: 54px;
  align-content: center;
  gap: 2px;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 8px 10px;
  color: var(--text-1);
  text-align: left;
}

.search-results button small { color: var(--text-3); font-size: 10px; }

@media (hover: hover) {
  .icon-button:hover,
  .nav-row:hover,
  .project-row:hover,
  .history-row:hover,
  .account-row:hover,
  .tool-button:hover,
  .mode-button:hover {
    background: var(--surface-hover);
    color: var(--text-1);
  }

  .process-header:hover,
  .search-results button:hover {
    background: var(--surface-2);
    color: var(--text-1);
  }

  .context-chip:hover {
    border-color: oklch(0.98 0.004 275 / 0.16);
    color: var(--text-2);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 760px) {
  :root {
    --header-height: 58px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 304px);
    transform: translateX(-102%);
    transition: transform 300ms var(--ease-out);
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease-out);
  }

  .sidebar-open .mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace {
    width: 100%;
    height: calc(100dvh * var(--display-scale-inverse));
  }

  .workspace-header {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding: 0 10px;
  }

  .mobile-menu {
    display: inline-grid;
    width: 40px;
    height: 40px;
  }

  .header-actions .icon-button:nth-child(-n+2) {
    display: none;
  }

  .conversation-title-line h1 {
    font-size: 14px;
  }

  .scope-line {
    font-size: 9px;
  }

  .conversation-scroll {
    padding: 22px 14px 205px;
  }

  .user-message {
    max-width: 94%;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.72;
  }

  .agent-turn {
    margin-top: 24px;
  }

  .process-header {
    min-height: 50px;
    padding: 0 13px;
    font-size: 12px;
  }

  .process-log {
    max-height: 44vh;
    padding-inline: 13px;
  }

  .process-event {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 7px;
  }

  .process-event p {
    font-size: 12px;
  }

  .final-answer {
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.78;
  }

  .final-answer h2 {
    font-size: 24px;
  }

  .composer-dock {
    padding: 12px 10px max(10px, env(safe-area-inset-bottom));
  }

  .composer {
    min-height: 108px;
    border-radius: 16px;
  }

  .composer textarea {
    min-height: 55px;
    padding: 13px 14px 6px;
    font-size: 16px;
  }

  .composer-footer {
    grid-template-columns: minmax(0, 1fr) auto 38px;
    padding-inline: 7px;
  }

  .send-button {
    min-width: 38px;
    height: 38px;
  }

  .composer-model {
    display: none;
  }

  .disclaimer {
    display: none;
  }

  .context-chip {
    max-width: calc(100vw - 20px);
    overflow: hidden;
  }

  .context-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .empty-stage {
    align-content: center;
    padding: 18px 10px 18vh;
  }

  .empty-copy h2 {
    font-size: 36px;
  }

  .empty-copy p {
    max-width: 28ch;
    font-size: 12px;
  }

  .empty-composer-wrap {
    width: 100%;
  }

  .search-panel {
    padding-top: 10px;
    padding-inline: 10px;
  }

  .search-dialog {
    width: 100%;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
