:root {
  --bg: #f4f4f1;
  --panel: #fafaf8;
  --panel-solid: #ffffff;
  --sidebar: #efefeb;
  --raised: #ffffff;
  --subtle: #eeeeea;
  --hover: #e6e6e1;
  --text: #20201e;
  --text-soft: #62625c;
  --text-faint: #91918a;
  --muted: var(--text-soft);
  --line: #deded8;
  --line-strong: #c8c8c0;
  --accent: #5f7fc8;
  --accent-soft: #e4eaf8;
  --accent-ink: #405f9e;
  --success: #527a62;
  --success-soft: #e5eee8;
  --warning: #9a672f;
  --warning-soft: #f3eadc;
  --danger: #a44940;
  --danger-soft: #f4e1de;
  --surface: var(--panel-solid);
  --surface-soft: var(--subtle);
  --sidebar-width: 236px;
  --content-width: 760px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-menu: 0 18px 48px rgb(28 28 25 / 14%), 0 2px 8px rgb(28 28 25 / 6%);
  --shadow-composer: none;
}

:root[data-theme="dark"] {
  --bg: #121210;
  --panel: #171715;
  --panel-solid: #1d1d1a;
  --sidebar: #0e0e0c;
  --raised: #22221f;
  --subtle: #23231f;
  --hover: #292925;
  --text: #f0f0eb;
  --text-soft: #aaa9a1;
  --text-faint: #74746d;
  --line: #2b2b27;
  --line-strong: #41413a;
  --accent: #8ba9ff;
  --accent-soft: #1c263d;
  --accent-ink: #adc0ff;
  --success: #7aa58a;
  --success-soft: #1c2b21;
  --warning: #d2a067;
  --warning-soft: #33271b;
  --danger: #e0877e;
  --danger-soft: #38211f;
  --shadow-menu: 0 20px 54px rgb(0 0 0 / 42%), 0 2px 9px rgb(0 0 0 / 28%);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #121210;
    --panel: #171715;
    --panel-solid: #1d1d1a;
    --sidebar: #0e0e0c;
    --raised: #22221f;
    --subtle: #23231f;
    --hover: #292925;
    --text: #f0f0eb;
    --text-soft: #aaa9a1;
    --text-faint: #74746d;
    --line: #2b2b27;
    --line-strong: #41413a;
    --accent: #8ba9ff;
    --accent-soft: #1c263d;
    --accent-ink: #adc0ff;
    --success: #7aa58a;
    --success-soft: #1c2b21;
    --warning: #d2a067;
    --warning-soft: #33271b;
    --danger: #e0877e;
    --danger-soft: #38211f;
    --shadow-menu: 0 20px 54px rgb(0 0 0 / 42%), 0 2px 9px rgb(0 0 0 / 28%);
  }
}

html,
body {
  background: var(--panel);
}

body {
  font-feature-settings: "kern" 1, "ss01" 1;
}

button,
input,
textarea,
select {
  letter-spacing: inherit;
}

/* Shell */
.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand-row {
  min-height: 52px;
  padding: 0 11px 0 14px;
}

.brand {
  gap: 8px;
  font-size: .86rem;
  font-weight: 680;
  letter-spacing: -.018em;
}

.brand-mark.brand-mark--astra {
  width: 22px;
  height: 22px;
}

.brand-mark.brand-mark--astra svg {
  width: 22px;
  height: 22px;
}

.brand-mark.brand-mark--astra svg .astra-spark {
  stroke: var(--accent);
}

.icon-button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.icon-button:hover {
  background: var(--hover);
}

.new-chat-button {
  min-height: 36px;
  margin: 3px 8px 10px;
  padding: 0 9px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-solid) 45%, transparent);
  font-size: .75rem;
  font-weight: 610;
}

.new-chat-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-solid);
  transform: none;
}

.new-chat-button svg {
  width: 15px;
  height: 15px;
}

.new-chat-button kbd {
  font-family: var(--font);
  font-size: .6rem;
}

.workspace-nav {
  gap: 1px;
  padding: 2px 8px 9px;
  border-bottom: 0;
}

.workspace-nav-item {
  min-height: 34px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: .73rem;
  font-weight: 540;
}

.workspace-nav-item:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--hover) 70%, transparent);
}

.workspace-nav-item.is-active {
  color: var(--text);
  background: var(--hover);
  font-weight: 620;
}

.workspace-nav-item svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.65;
}

.workspace-nav-item small {
  display: none;
}

.history-heading {
  min-height: 31px;
  margin-top: 5px;
  padding: 0 9px 0 16px;
  color: var(--text-faint);
  font-size: .59rem;
  font-weight: 650;
  letter-spacing: .07em;
}

.history-heading .icon-button {
  width: 27px;
  height: 27px;
}

.history-search {
  margin: 1px 8px 7px;
}

.history-search input {
  height: 32px;
  border-radius: 6px;
  background: var(--panel-solid);
  font-size: .72rem;
}

.history-list {
  padding: 0 7px 10px;
}

.history-group + .history-group {
  margin-top: 9px;
}

.history-group-title {
  padding: 6px 8px 4px;
  font-size: .61rem;
}

.history-item {
  min-height: 34px;
  border-radius: 6px;
}

.history-open {
  padding: 8px 31px 8px 8px;
  font-size: .71rem;
}

.history-delete {
  right: 3px;
  width: 27px;
  height: 27px;
  border-radius: 5px;
}

.sidebar-footer {
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.account-card {
  margin: 0 0 5px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.account-card:hover {
  background: color-mix(in srgb, var(--hover) 55%, transparent);
}

.account-card-head {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
}

.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  font-family: var(--font);
  font-size: .62rem;
}

.account-card-head strong {
  font-size: .68rem;
  font-weight: 620;
}

.account-card-head small {
  font-size: .55rem;
}

.account-card-head b {
  color: var(--accent);
  font-size: .48rem;
}

.credit-row {
  margin-top: 9px;
  font-size: .53rem;
}

.credit-meter {
  height: 2px;
  margin-top: 5px;
  border-radius: 1px;
}

.credit-meter i {
  background: var(--accent);
}

.account-card-actions {
  margin-top: 8px;
}

.account-card-actions a,
.account-card-actions button {
  color: var(--text-faint);
  font-size: .54rem;
}

.local-note {
  display: none;
}

.sidebar-action {
  height: 31px;
  gap: 8px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text-faint);
  font-size: .68rem;
}

.sidebar-action > svg,
.theme-icon,
.theme-icon svg {
  width: 14px;
  height: 14px;
}

/* Main frame */
.main-panel {
  grid-template-rows: 52px minmax(0, 1fr) auto;
  background: var(--panel);
}

.topbar {
  min-height: 52px;
  padding: 0 17px 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: none;
}

.topbar-leading {
  gap: 8px;
}

.conversation-identity h1 {
  margin: 0;
  font-size: .76rem;
  font-weight: 620;
  letter-spacing: -.008em;
}

.route-line,
.topbar .mode-picker {
  display: none;
}

.topbar-actions {
  gap: 5px;
}

.status-pill {
  height: 27px;
  gap: 6px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  color: var(--text-faint);
  background: transparent;
  font-size: .61rem;
  font-weight: 520;
}

.status-pill:hover {
  border: 0;
  background: var(--subtle);
}

.status-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

/* Empty conversation */
.conversation {
  padding-inline: max(22px, calc((100% - var(--content-width)) / 2));
  scroll-behavior: smooth;
}

.empty-state {
  width: min(100%, 620px);
  min-height: 100%;
  justify-content: center;
  align-items: flex-start;
  padding: 52px 0 96px;
}

.empty-status {
  display: none;
}

.empty-state h2 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.55rem, 2.7vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.empty-copy {
  margin: 9px 0 26px;
  color: var(--text-faint);
  font-size: .78rem;
  line-height: 1.5;
}

.prompt-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.prompt-card {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 0 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text-soft);
  background: transparent;
  transform: none;
}

.prompt-card:nth-child(odd) {
  padding-right: 14px;
}

.prompt-card:nth-child(even) {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.prompt-card::before {
  content: none;
}

.prompt-card:hover {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
  transform: none;
}

.prompt-card span {
  font-size: .71rem;
  font-weight: 560;
}

.prompt-card small {
  display: none;
}

.prompt-card svg {
  position: static;
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--text-faint);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.prompt-card:hover svg,
.prompt-card:focus-visible svg {
  opacity: 1;
  transform: translateX(0);
}

/* Messages */
.message-list {
  width: min(100%, var(--content-width));
  padding: 20px 0 18px;
}

.message {
  display: block;
  padding: 19px 0 23px;
}

.message + .message {
  border-top: 0;
}

.message-avatar {
  display: none;
}

.message-column {
  min-width: 0;
}

.message-meta {
  min-height: 20px;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--text-faint);
  font-family: var(--font);
  font-size: .59rem;
  letter-spacing: 0;
  text-transform: none;
}

.message-meta strong {
  color: var(--text-soft);
  font-size: .64rem;
  font-weight: 640;
}

.message-meta time {
  opacity: .7;
}

.model-tag {
  max-width: 260px;
  padding: 0;
  color: var(--text-faint);
  background: transparent;
  font-size: .58rem;
  font-weight: 500;
}

.message-actions {
  gap: 1px;
  opacity: 0;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
}

.message-action {
  width: 26px;
  height: 26px;
  border-radius: 5px;
}

.message-action--text {
  width: auto;
  padding-inline: 6px;
  font-size: .57rem;
}

.message-body {
  max-width: 740px;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.72;
}

.message--user {
  display: flex;
  justify-content: flex-end;
  margin: 5px 0 7px;
  padding: 11px 0;
  border: 0 !important;
}

.message--user .message-column {
  max-width: min(82%, 620px);
  padding: 10px 13px 11px;
  border: 0;
  border-radius: 13px;
  background: var(--subtle);
}

.message--user .message-meta {
  min-height: 0;
  margin-bottom: 4px;
}

.message--user .message-meta strong {
  color: var(--text-faint);
  font-size: .57rem;
  font-weight: 560;
}

.message--user .message-body {
  font-size: .85rem;
  line-height: 1.55;
}

.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4 {
  margin-top: 1.35em;
  font-family: var(--font);
  font-weight: 650;
  letter-spacing: -.02em;
}

.message-body h1 { font-size: 1.25rem; }
.message-body h2 { font-size: 1.08rem; }
.message-body h3,
.message-body h4 { font-size: .94rem; }

.message-body code {
  border: 0;
  border-radius: 4px;
  background: var(--subtle);
}

.message-body pre {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--sidebar);
}

.code-head {
  color: var(--text-faint);
  background: color-mix(in srgb, var(--panel-solid) 20%, transparent);
}

.message-body blockquote {
  border-left-color: var(--line-strong);
}

.message-attachment,
.research-sources a {
  border-radius: 6px;
}

.route-activity {
  width: min(100%, var(--content-width));
  padding: 1px 0 22px;
  color: var(--text-faint);
  font-size: .62rem;
}

.route-spinner {
  width: 10px;
  height: 10px;
  border-width: 1px;
}

.scroll-anchor {
  height: 12px;
}

/* Composer */
.composer-dock {
  padding: 8px max(22px, calc((100% - var(--content-width)) / 2)) max(12px, env(safe-area-inset-bottom));
  border-top: 0;
  background: var(--panel);
}

.backend-notice {
  min-height: 34px;
  margin-bottom: 6px;
  border-radius: 7px;
}

.attachment-tray {
  margin-bottom: 6px;
}

.attachment-chip {
  border-radius: 7px;
  box-shadow: none;
}

.composer {
  padding: 9px 9px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: none;
}

.composer:focus-within {
  border-color: color-mix(in srgb, var(--text-faint) 70%, var(--line-strong));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line-strong) 55%, transparent);
}

.composer.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.composer textarea {
  min-height: 41px;
  max-height: 190px;
  padding: 8px 2px 7px 0;
  color: var(--text);
  font-size: .86rem;
  line-height: 1.5;
}

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

.composer-toolbar {
  min-height: 31px;
  gap: 9px;
}

.composer-tools {
  gap: 3px;
}

.composer-icon-button,
.composer-control-button,
.composer-tool-toggle,
.composer-model-trigger,
.composer-model-control {
  height: 29px;
  border: 0;
  border-radius: 6px;
  color: var(--text-faint);
  background: transparent;
  font-size: .61rem;
  font-weight: 560;
}

.composer-icon-button {
  width: 29px;
}

.composer-icon-button:hover,
.composer-control-button:hover,
.composer-tool-toggle:hover,
.composer-model-trigger:hover,
.composer-model-trigger[aria-expanded="true"],
.composer-model-control:hover {
  border: 0;
  color: var(--text);
  background: var(--subtle);
}

.composer-control-button,
.composer-tool-toggle {
  padding: 0 7px;
}

.composer-control-button svg,
.composer-tool-toggle svg {
  width: 14px;
  height: 14px;
}

.composer-tool-toggle.is-active {
  border: 0;
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.composer-model-picker {
  max-width: min(230px, 34vw);
}

.composer-model-trigger {
  max-width: 100%;
  padding: 0 7px;
}

.composer-model-trigger > span:not(.route-pulse) {
  color: var(--text-soft);
}

.route-pulse {
  display: none;
}

.composer-model-control {
  max-width: 95px;
  padding: 0 7px;
}

.composer-model-control select {
  max-width: 68px;
  color: var(--text-soft);
  font-size: .61rem;
  font-weight: 560;
}

.composer-model-control .chevron {
  right: 5px;
}

.active-route {
  font-size: .58rem;
}

.send-button {
  width: 31px;
  height: 31px;
  border-radius: 7px;
  color: var(--panel-solid);
  background: var(--text);
}

.send-button:disabled {
  color: var(--text-faint);
  background: var(--subtle);
  opacity: 1;
}

.send-button:not(:disabled):hover {
  transform: none;
  opacity: .82;
}

.send-button svg {
  width: 16px;
  height: 16px;
}

.composer-caption {
  margin: 6px 3px 0;
  color: var(--text-faint);
  font-size: .54rem;
}

/* Menus and supporting chat surfaces */
.mode-menu,
.composer-model-menu,
.model-catalog-dialog,
.toolbox-dialog,
.fleet-dialog,
.usage-dialog,
.compare-dialog {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-menu);
}

.composer-model-menu {
  bottom: calc(100% + 8px);
  width: min(360px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 10px;
}

.composer-model-menu-head {
  padding: 7px 8px 8px;
}

.composer-model-menu-head span,
.composer-model-section {
  font-size: .56rem;
  letter-spacing: .055em;
}

.composer-model-option {
  min-height: 45px;
  padding: 5px 7px;
  border-radius: 6px;
}

.composer-model-option[aria-selected="true"] {
  background: var(--subtle);
}

.composer-model-glyph {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  background: transparent;
}

.model-catalog-open {
  border-radius: 6px;
}

.toolbox-head,
.fleet-head,
.model-catalog-head {
  border-bottom-color: var(--line);
}

.tool-card,
.tool-card--ready {
  border-radius: 0;
  background: transparent;
}

.tool-card--ready {
  border-color: var(--line);
}

.tool-card:hover,
.tool-card--ready:hover {
  background: var(--subtle);
}

.toast {
  border-radius: 7px;
  box-shadow: var(--shadow-menu);
}

/* Tablet and mobile */
@media (max-width: 900px) {
  .sidebar {
    width: min(254px, calc(100vw - 48px));
    max-width: 254px;
  }

  body.sidebar-open .sidebar {
    box-shadow: 16px 0 42px rgb(0 0 0 / 28%);
  }

  .sidebar-scrim {
    background: rgb(12 12 10 / 52%);
    backdrop-filter: blur(2px);
  }

  .main-panel {
    grid-template-rows: 50px minmax(0, 1fr) auto;
  }

  .topbar {
    min-height: 50px;
    padding-left: 9px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 50px;
    padding: 0 8px;
  }

  .conversation-identity {
    max-width: min(52vw, 240px);
  }

  .conversation-identity h1 {
    font-size: .72rem;
  }

  .status-pill {
    width: 28px;
    height: 28px;
    justify-content: center;
    padding: 0;
  }

  .conversation {
    padding-inline: 14px;
  }

  .empty-state {
    width: 100%;
    justify-content: flex-start;
    padding: clamp(54px, 12vh, 92px) 2px 50px;
  }

  .empty-state h2 {
    font-size: 1.55rem;
  }

  .empty-copy {
    margin-bottom: 22px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card,
  .prompt-card:nth-child(odd),
  .prompt-card:nth-child(even) {
    min-height: 43px;
    padding: 0 4px 0 0;
    border-left: 0;
  }

  .message-list {
    padding-top: 12px;
  }

  .message {
    padding: 17px 0 20px;
  }

  .message--user {
    padding: 8px 0;
  }

  .message--user .message-column {
    max-width: 90%;
  }

  .message-body {
    font-size: .86rem;
  }

  .model-tag {
    max-width: 130px;
  }

  .message-actions {
    opacity: .65;
  }

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

  .composer {
    padding: 7px 7px 6px 10px;
    border-radius: 10px;
  }

  .composer textarea {
    min-height: 38px;
    padding-top: 7px;
  }

  .composer-control-button {
    width: 29px;
    justify-content: center;
    padding: 0;
  }

  .composer-control-button span,
  .composer-tool-toggle span {
    display: none;
  }

  .composer-tool-toggle {
    width: 29px;
    justify-content: center;
    padding: 0;
  }

  .composer-model-picker {
    max-width: min(150px, 38vw);
  }

  .composer-reasoning-control {
    display: none;
  }

  .active-route {
    display: none;
  }

  .composer-caption {
    display: none;
  }

  .composer-model-menu {
    position: fixed;
    right: 8px;
    bottom: 74px;
    left: 8px;
    width: auto;
    max-height: calc(100dvh - 96px);
  }
}

@media (max-width: 390px) {
  .composer-model-picker {
    max-width: 120px;
  }

  .composer-model-trigger {
    padding-inline: 5px;
  }

  .composer-tool-toggle {
    display: none;
  }
}

@media (hover: none) {
  .prompt-card svg,
  .message-actions {
    opacity: .65;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prompt-card svg {
    transition: none;
  }
}

/* 2026-09 chat and document editor refresh. Keep interface text readable. */
:root {
  --sidebar-width: 264px;
  --content-width: 880px;
}

body {
  font-size: 16px;
}

.brand { font-size: 15px; }
.brand em {
  margin-left: 2px;
  color: var(--accent-ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  letter-spacing: .08em;
}
.new-chat-button { min-height: 40px; font-size: 13px; }
.new-chat-button kbd { font-size: 11px; }
.workspace-nav-item { min-height: 38px; font-size: 13px; }
.history-heading { min-height: 36px; font-size: 11px; }
.history-search input,
.history-open { font-size: 12px; }
.history-group-title { font-size: 11px; }
.account-card { padding: 10px 9px; }
.account-card-head strong { font-size: 12px; }
.account-card-head small,
.credit-row,
.account-card-actions a,
.account-card-actions button { font-size: 11px; }
.account-card-head b { font-size: 10px; }
.sidebar-action { height: 35px; font-size: 12px; }

.main-panel {
  grid-template-rows: 58px minmax(0, 1fr) auto;
}

.topbar {
  min-height: 58px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.conversation-identity h1 { font-size: 13px; }
.status-pill { height: 32px; padding: 0 10px; font-size: 11px; }

.conversation {
  padding-inline: max(24px, calc((100% - var(--content-width)) / 2));
}

.empty-state {
  width: min(100%, 720px);
  padding: clamp(64px, 12vh, 120px) 0 110px;
}

.empty-state-mark {
  width: 38px;
  height: 38px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.empty-state-mark svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.empty-state-mark svg path:last-child {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.empty-state h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -.045em;
}

.empty-copy {
  max-width: 520px;
  margin: 12px 0 32px;
  font-size: 14px;
}

.prompt-grid {
  gap: 10px;
  border: 0;
}

.prompt-card,
.prompt-card:nth-child(odd),
.prompt-card:nth-child(even) {
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr) 16px;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 12px;
  row-gap: 4px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-solid) 58%, transparent);
}

.prompt-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-solid);
}

.prompt-card span,
.prompt-card strong {
  grid-column: 1;
  grid-row: 1;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  text-align: left;
}

.prompt-card small {
  display: block;
  width: 100%;
  grid-column: 1;
  grid-row: 2;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 450;
  text-align: left;
}

.prompt-card svg {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.message-list { padding: 26px 0 20px; }
.message { padding: 22px 0 26px; }
.message-meta { margin-bottom: 8px; font-size: 11px; }
.message-meta strong { font-size: 12px; }
.model-tag { font-size: 11px; }
.message-action--text { font-size: 11px; }
.message-body {
  max-width: 820px;
  font-size: 15px;
  line-height: 1.72;
}
.message--user .message-column {
  max-width: min(84%, 690px);
  padding: 12px 15px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: var(--subtle);
}
.message--user .message-meta strong { font-size: 11px; }
.message--user .message-body { font-size: 14px; }
.route-activity { font-size: 12px; }

.composer-dock {
  padding: 12px max(24px, calc((100% - var(--content-width)) / 2)) max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--panel) 24px);
}

.backend-notice { min-height: 40px; font-size: 12px; }
.composer {
  padding: 12px 12px 10px 15px;
  border-radius: 16px;
  background: var(--panel-solid);
  box-shadow: 0 14px 42px rgb(0 0 0 / 10%);
}
:root[data-theme="dark"] .composer { box-shadow: 0 18px 48px rgb(0 0 0 / 30%); }
.composer textarea {
  min-height: 52px;
  max-height: 240px;
  padding: 7px 3px 10px 0;
  font-size: 15px;
  line-height: 1.55;
}
.composer-toolbar { min-height: 36px; }
.composer-tools { gap: 5px; }
.composer-icon-button,
.composer-control-button,
.composer-tool-toggle,
.composer-model-trigger,
.composer-model-control {
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
}
.composer-icon-button { width: 34px; }
.composer-control-button,
.composer-tool-toggle,
.composer-model-trigger,
.composer-model-control { padding-inline: 9px; }
.composer-model-picker { max-width: min(290px, 38vw); }
.composer-model-trigger {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--subtle) 52%, transparent);
}
.composer-model-control {
  max-width: 120px;
  border: 1px solid transparent;
}
.composer-model-control select {
  max-width: 92px;
  font-size: 12px;
}
.active-route { font-size: 11px; }
.send-button { width: 36px; height: 36px; border-radius: 9px; }
.composer-caption { margin-top: 8px; font-size: 11px; }

.composer-model-menu {
  bottom: calc(100% + 12px);
  width: min(440px, calc(100vw - 28px));
  max-height: min(600px, calc(100dvh - 120px));
  padding: 8px;
  border-radius: 14px;
}
.composer-model-menu-head {
  padding: 12px 12px 14px;
  border-bottom: 1px solid var(--line);
}
.composer-model-menu-head span { color: var(--text); font-size: 14px; letter-spacing: 0; text-transform: none; }
.composer-model-menu-head small { margin-top: 4px; display: block; color: var(--text-faint); font-size: 11px; }
.composer-model-section {
  padding: 13px 10px 7px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: .06em;
}
.composer-model-option {
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
}
.composer-model-option:hover,
.composer-model-option:focus-visible,
.composer-model-option[aria-selected="true"] { background: var(--subtle); }
.composer-model-glyph {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
}
.composer-model-option strong { font-size: 13px; }
.composer-model-option small { margin-top: 3px; font-size: 11px; line-height: 1.35; }
.composer-model-option.is-locked::after { font-size: 10px; }
.model-catalog-open--composer { min-height: 52px; padding: 8px 10px; }
.model-catalog-open--composer strong { font-size: 12px; }
.model-catalog-open--composer small { font-size: 11px; }

@media (max-width: 860px) {
  :root { --sidebar-width: 264px; }
}

@media (max-width: 680px) {
  .conversation { padding-inline: 14px; }
  .empty-state { padding-top: 44px; }
  .empty-state-mark { margin-bottom: 17px; }
  .empty-copy { font-size: 13px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .prompt-card,
  .prompt-card:nth-child(odd),
  .prompt-card:nth-child(even) { min-height: 62px; padding: 11px 13px; border: 1px solid var(--line); }
  .prompt-card strong,
  .prompt-card small { display: block; }
  .message-body { font-size: 14px; }
  .composer-dock { padding: 8px 8px max(9px, env(safe-area-inset-bottom)); }
  .composer { padding: 9px 8px 8px 12px; border-radius: 14px; }
  .composer textarea { min-height: 46px; font-size: 14px; }
  .composer-tools { min-width: 0; flex: 1; }
  #composer-toolbox-button,
  #research-toggle { display: none; }
  .composer-model-picker { min-width: 0; max-width: min(230px, calc(100vw - 112px)); }
  .composer-model-trigger { min-width: 0; }
  .composer-model-trigger > span:not(.route-pulse) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .composer-model-menu { right: 8px; bottom: 82px; left: 8px; }
}

/* Projects, generated files and the quieter 2026 workspace surface. */
.sidebar-projects {
  margin: 10px 8px 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.sidebar-section-head {
  min-height: 28px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-section-head button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 6px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
}

.sidebar-section-head button:hover { color: var(--text); background: var(--hover); }

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

.project-row,
.project-manager-row {
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.project-row {
  min-height: 40px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 7px;
}

.project-row:hover,
.project-row.is-active { color: var(--text); background: var(--hover); }

.project-glyph {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-soft);
  background: var(--panel-solid);
  font-size: 11px;
  font-weight: 650;
}

.project-row > span:last-child,
.project-manager-row > span:last-child { min-width: 0; }
.project-row strong,
.project-manager-row strong { display: block; overflow: hidden; font-size: 12px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.project-row small,
.project-manager-row small { display: block; margin-top: 2px; color: var(--text-faint); font-size: 10px; }

.project-dialog {
  width: min(860px, calc(100vw - 32px));
  height: min(650px, calc(100dvh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel-solid);
  box-shadow: var(--shadow-menu);
}

.project-dialog::backdrop { background: rgb(0 0 0 / 54%); backdrop-filter: blur(2px); }

.project-dialog-head {
  min-height: 68px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.project-dialog-head span { color: var(--text-faint); font-size: 11px; }
.project-dialog-head h2 { margin: 3px 0 0; font-size: 17px; font-weight: 620; letter-spacing: -.015em; }

.project-dialog-body {
  height: calc(100% - 68px);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.project-dialog-body > aside {
  padding: 12px 9px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.project-create {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-solid);
  font-size: 12px;
  font-weight: 570;
  text-align: left;
  cursor: pointer;
}

.project-manager-list { margin-top: 9px; display: grid; gap: 3px; }
.project-manager-row {
  min-height: 46px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-radius: 7px;
}
.project-manager-row:hover,
.project-manager-row.is-active { color: var(--text); background: var(--hover); }

.project-form {
  min-width: 0;
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-form > label { display: grid; gap: 8px; }
.project-form > label > span { color: var(--text-soft); font-size: 12px; font-weight: 580; }
.project-form input,
.project-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.project-form input:focus,
.project-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }

.project-files { padding-top: 2px; }
.project-files > div:first-child { min-height: 34px; display: flex; align-items: center; justify-content: space-between; }
.project-files strong { font-size: 12px; font-weight: 580; }
.project-files button,
.project-form-actions button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-soft);
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.project-files button:hover,
.project-form-actions button:hover { color: var(--text); background: var(--hover); }
.project-files-empty { margin: 12px 0; color: var(--text-faint); font-size: 12px; }
.project-file-row {
  min-height: 48px;
  padding: 7px 4px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}
.project-file-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.project-file-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-file-row small { display: block; margin-top: 2px; color: var(--text-faint); font-size: 10px; }
.project-file-row button { width: 28px; min-height: 28px; padding: 0; border: 0; }

.project-form-actions {
  margin-top: auto;
  padding-top: 17px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.project-form-actions .project-delete { color: var(--danger); }
.project-form-actions .project-save { color: var(--panel-solid); border-color: var(--text); background: var(--text); }

.generated-files {
  margin: 18px 0 3px;
  display: grid;
  gap: 7px;
}

.generated-file {
  width: min(100%, 540px);
  min-height: 58px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-solid);
}

.generated-file-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .03em;
}
.generated-file > span:nth-child(2) { min-width: 0; }
.generated-file strong { display: block; overflow: hidden; font-size: 13px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.generated-file small { display: block; margin-top: 3px; color: var(--text-faint); font-size: 11px; }
.generated-file button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.generated-file button:hover { background: var(--hover); }
.generated-file button:disabled { opacity: .45; cursor: wait; }

.route-line,
.topbar .mode-picker,
.message--user .message-meta,
.model-tag { display: none; }

.conversation-identity h1 { max-width: min(60vw, 620px); font-size: 14px; font-weight: 580; }
.message-list { padding-top: 20px; }
.message { padding: 17px 0 22px; }
.message-meta { margin-bottom: 9px; }
.message-meta strong { color: var(--text-soft); font-size: 12px; font-weight: 580; }
.message-meta time { display: none; }
.message-body { max-width: 800px; font-size: 16px; line-height: 1.68; }
.message-body p { margin-block: 0 1em; }
.message-body strong { font-weight: 650; }
.message--user .message-column { max-width: min(76%, 650px); padding: 11px 14px; border: 0; border-radius: 15px; }
.message--user .message-body { font-size: 15px; line-height: 1.55; }
.message-actions { width: max-content; margin-top: 7px; opacity: .46; }
.message:hover .message-actions,
.message:focus-within .message-actions { opacity: 1; }
.message-action--text { font-size: 11px; }
.message-error {
  padding: 8px 0 8px 13px;
  border: 0;
  border-left: 2px solid var(--danger);
  border-radius: 0;
  color: var(--text-soft);
  background: transparent;
  font-size: 13px;
}
.message-error button { min-height: 30px; margin-top: 8px; padding: 0 10px; border-radius: 6px; font-size: 11px; }
.composer-dock { background: var(--panel); }
.composer { border-radius: 13px; box-shadow: none; }
:root[data-theme="dark"] .composer { box-shadow: none; }
.composer-model-glyph,
.mode-symbol,
.option-glyph { display: none; }
.composer-model-option { grid-template-columns: minmax(0, 1fr) 18px; }
.composer-model-option.composer-model-family-option {
  grid-template-columns: minmax(0, 1fr) max-content;
}
.composer-model-family-count { justify-self: end; }
.composer-model-menu { scrollbar-gutter: stable; }
.mode-option { grid-template-columns: minmax(0, 1fr) 18px; }

@media (max-width: 680px) {
  .composer-model-menu { width: auto; }
  .project-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .project-dialog-body { grid-template-columns: 1fr; }
  .project-dialog-body > aside { max-height: 154px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-form { padding: 16px; }
  .project-form-actions { grid-template-columns: auto 1fr auto; }
  .project-form-actions span { display: none; }
  .project-form-actions .project-save { grid-column: 1 / -1; }
  .message-body { font-size: 15px; }
  .message--user .message-column { max-width: 88%; }
}
