/* White surfaces, neutral navigation, and readable text. Color is reserved for identity and status. */
:root {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  font-synthesis: none;
  --paper: #ffffff;
  --canvas: #ffffff;
  --sidebar: #fafafa;
  --line: #e8e8e8;
  --line-strong: #d2d2d2;
  --muted: #666666;
  --ink: #262626;
  --accent: #303030;
  --accent-hover: #171717;
  --hover: #f2f2f2;
  --selected: #eaeaea;
  --soft: #f7f7f7;
  --focus: #858585;
  --danger: #a33d32;
  --danger-soft: #fff2f0;
  --success: #35704a;
  --success-soft: #edf6ef;
  --warning: #795c26;
  --warning-soft: #fbf5e7;
  --page-header-height: 52px;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
input,
textarea,
select {
  color: inherit;
}
button {
  transition:
    background 0.16s,
    color 0.16s,
    box-shadow 0.16s;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.015em;
}
h2 {
  font-size: 21px;
  font-weight: 550;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 13px;
  font-weight: 600;
}
a {
  color: var(--accent);
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--muted);
  font-weight: 600;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  font-weight: 550;
}
.button .icon {
  width: 15px;
  height: 15px;
}
.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 2px #0000000d;
}
.button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.button.secondary {
  background: var(--canvas);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px #00000003;
}
.button.secondary:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--line-strong);
}
.button.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.button.compact {
  min-height: 29px;
  padding: 4px 10px;
}
.full-width {
  width: 100%;
}
.icon-button {
  height: 30px;
  min-width: 30px;
  padding: 6px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon-button:hover,
.icon-button.is-active {
  background: var(--hover);
  color: var(--ink);
}
.icon-button .icon {
  width: 17px;
  height: 17px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 550;
  padding: 6px 0;
}
.text-button:hover {
  color: var(--ink);
}
.text-button .icon {
  width: 15px;
  height: 15px;
}
.badge {
  font-size: 10px;
  line-height: 1.5;
  padding: 3px 7px;
  background: var(--hover);
  border-radius: 5px;
  color: var(--muted);
  font-weight: 550;
  white-space: nowrap;
}
.badge.success {
  background: var(--success-soft);
  color: var(--success);
}
.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.quiet-tag {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.quiet-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.app-shell {
  --sidebar-default-width: 224px;
  display: flex;
  height: 100%;
  overflow: hidden;
}
.sidebar {
  width: var(--sidebar-width, var(--sidebar-default-width));
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 0 13px;
  position: relative;
  z-index: 3;
}
.sidebar-resizer {
  position: absolute;
  inset: 0 -3px 0 auto;
  z-index: 5;
  width: 7px;
  cursor: col-resize;
  touch-action: none;
  -webkit-app-region: no-drag;
}
.sidebar-resizer:hover,
.sidebar-resizer:focus-visible {
  background: #85858526;
}
.sidebar-resizing,
.sidebar-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
.window-drag {
  height: 44px;
  flex-shrink: 0;
  -webkit-app-region: drag;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.header-update {
  -webkit-app-region: no-drag;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 7px;
  color: #fff;
  background: #4662f6;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-update:hover:not(:disabled) {
  background: #3552e8;
}
.header-update:disabled {
  opacity: 0.8;
  cursor: default;
}
.header-update .spinner {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
  border-color: #ffffff66;
  border-top-color: currentColor;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 10px 22px;
  letter-spacing: 0.03em;
}
.brand-mark {
  font-size: 25px;
  line-height: 1;
  color: var(--ink);
}
.version-tag {
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}
.scope-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  min-height: 52px;
  padding: 7px 8px;
  border-radius: 8px;
}
.scope-switch:hover,
.scope-switch[aria-expanded="true"] {
  background: var(--hover);
}
.scope-switch > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.scope-switch strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scope-switch small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scope-switch > .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  transform: rotate(180deg);
}
.scope-switch[aria-expanded="true"] > .icon {
  transform: none;
}
.scope-switch .scope-identity-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}
.scope-avatar {
  height: 31px;
  width: 31px;
  display: grid;
  place-items: center;
  background: #e4e9dc;
  border: 1px solid #dbe2d3;
  border-radius: 8px;
  color: #536149;
  font-size: 13px;
  font-weight: 600;
}
.scope-avatar.team {
  background: #dee9db;
  color: #5d7952;
}
.scope-avatar .icon {
  width: 17px;
  height: 17px;
}
.scope-menu {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  background: var(--canvas);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px #00000019;
  border-radius: 10px;
  padding: 6px;
  animation: appear 0.12s ease-out;
}
.scope-menu > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 9px;
  text-align: left;
  border-radius: 6px;
  font-size: 12px;
}
.scope-menu > button:hover {
  background: var(--hover);
}
.scope-menu .icon {
  width: 15px;
  height: 15px;
}
.scope-menu > button .icon:last-child:not(:first-child) {
  margin-left: auto;
}
.scope-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px;
}
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 35px;
  border-radius: 7px;
  padding: 0 11px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
}
.nav-item.selected {
  background: var(--selected);
  color: var(--ink);
  font-weight: 600;
}
.nav-item:hover:not(.selected) {
  background: var(--hover);
}
.nav-item .icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.6;
}
.nav-item small {
  margin-left: auto;
  font-size: 10px;
  background: var(--hover);
  border-radius: 4px;
  padding: 0 5px;
}
.sidebar-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding-top: 10px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  font-weight: 550;
  letter-spacing: 0.035em;
  padding: 15px 11px 8px;
  min-height: 30px;
}
.section-heading .icon-button {
  height: 20px;
  min-width: 20px;
  padding: 2px;
}
.section-heading .icon {
  width: 13px;
  height: 13px;
}
.chat-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11px;
  text-align: left;
  color: var(--muted);
}
.chat-row > span:not(.assistant-glyph) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.chat-row .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.chat-row .quiet-icon {
  width: 11px;
  height: 11px;
}
.chat-row.selected {
  background: var(--selected);
  color: var(--ink);
}
.chat-row:hover:not(.selected) {
  background: var(--hover);
}
.assistant-glyph {
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  width: 14px;
}
.sidebar-empty {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  padding: 0 11px 10px;
}
.sidebar-footer {
  position: relative;
  flex-shrink: 0;
  padding: 8px 0 12px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.sidebar-footer.scope-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
}
.scope-switcher .scope-switch {
  flex: 1;
  width: auto;
  min-width: 0;
}
.user-avatar,
.member-avatar {
  background: #e2e4d6;
  border: 1px solid #d7dccb;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #5b614e;
  flex-shrink: 0;
}
.main-pane {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.browser-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--browser-panel-width, clamp(380px, 42vw, 640px));
  width: var(--browser-panel-width, clamp(380px, 42vw, 640px));
  max-width: calc(100% - var(--sidebar-width, var(--sidebar-default-width)) - 340px);
  min-width: 320px;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
}
.browser-resizer {
  position: absolute;
  inset: 0 auto 0 -4px;
  z-index: 5;
  width: 7px;
  cursor: col-resize;
  touch-action: none;
}
.browser-resizer:hover,
.browser-resizer:focus-visible {
  background: #85858526;
}
.browser-resizing,
.browser-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
.browser-tabbar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: var(--page-header-height);
  min-height: var(--page-header-height);
  flex-shrink: 0;
  padding: 5px 6px 0;
  background: var(--sidebar);
  border-bottom: 1px solid var(--line);
  -webkit-app-region: drag;
}
.browser-tabbar button,
.browser-tabs,
.browser-toolbar {
  -webkit-app-region: no-drag;
}
.browser-tabs {
  display: flex;
  min-width: 0;
  flex: 1;
  align-self: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.browser-tabs::-webkit-scrollbar {
  display: none;
}
.browser-tab {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 156px;
  max-width: 190px;
  min-width: 90px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 0 3px 0 7px;
  color: var(--muted);
}
.browser-tab.is-active {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.browser-tab.is-suspended > [role="tab"] > .icon {
  opacity: 0.45;
}
.browser-tab > [role="tab"] {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  height: 30px;
  padding: 0;
  text-align: left;
  font-size: 11px;
}
.browser-tab > [role="tab"] > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-tab .icon,
.browser-tab .spinner {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.browser-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 5px;
  color: var(--muted);
}
.browser-tool:hover:not(:disabled),
.browser-address-go:hover {
  background: var(--hover);
  color: var(--ink);
}
.browser-tool .icon {
  width: 16px;
  height: 16px;
}
.browser-tab > .browser-tool {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
}
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  min-height: 42px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
}
.browser-toolbar form {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  margin: 0 4px;
}
.browser-toolbar input {
  width: 100%;
  min-width: 0;
  height: 27px;
  padding: 0 8px;
  border: 0;
  outline-offset: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 11px;
  text-overflow: ellipsis;
}
.browser-address-go {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  height: 25px;
  padding: 5px;
  margin-right: 1px;
  border-radius: 4px;
}
.browser-address-go .icon,
.browser-file-icon {
  width: 15px;
  height: 15px;
}
.browser-file-icon {
  margin: 0 6px;
  color: var(--muted);
}
.browser-content {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
#browser-panel-host {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.browser-page-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.browser-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--danger);
  background: var(--danger-soft);
  overflow-wrap: anywhere;
}
.browser-error > button {
  flex-shrink: 0;
}
.browser-file-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.browser-newtab {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 7vh, 72px) 24px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
  container-type: inline-size;
  background: radial-gradient(ellipse at 50% 28%, #f7f8f780, transparent 62%);
}
.browser-start-inner {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.browser-start-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 27px;
}
.browser-start-art {
  display: block;
  width: 172px;
  height: 124px;
}
.browser-start-window {
  filter: drop-shadow(0 6px 7px #22352b0b);
}
.browser-start-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 550;
  letter-spacing: 0.03em;
  line-height: 1.35;
}
#browser-newtab-form {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 50px;
  padding: 6px 7px 6px 15px;
  border: 1px solid #dfe3e0;
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 3px 10px #25372b05, 0 1px 2px #25372b04;
  transition: border-color 150ms, box-shadow 150ms;
}
#browser-newtab-form:focus-within {
  border-color: #9ca9a1;
  box-shadow: 0 0 0 3px #7c988b0d, 0 3px 12px #25372b05;
}
#browser-newtab-form > .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #7a837e;
}
.browser-newtab input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
}
.browser-newtab input:focus-visible {
  outline: none;
}
.browser-start-go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 8px;
  border-radius: 9px;
  color: white;
  background: #343b37;
}
.browser-start-go:hover {
  background: #202823;
}
.browser-search-provider {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.browser-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 364px;
  margin: 28px auto 0;
}
.browser-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 1px;
  border-radius: 11px;
  font-size: 11px;
  color: #555e58;
}
.browser-shortcut:hover {
  color: var(--ink);
  background: #f0f3f080;
}
.browser-shortcut-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 1px solid #e8ebe9;
  border-radius: 13px;
  background: white;
  box-shadow: 0 2px 4px #25372b04;
  color: #303733;
}
.browser-shortcut-mark > svg {
  width: 22px;
  height: 22px;
}
.browser-shortcut-figma > svg {
  width: 16px;
  height: 24px;
}
.browser-mark-google {
  font-family: "Avenir Next", sans-serif;
  font-weight: 650;
  font-size: 26px;
  color: #4285f4;
}
.browser-mark-wiki {
  font-family: Georgia, serif;
  font-size: 27px;
  line-height: 1;
}
.browser-continue {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #e9ecea;
}
.browser-continue h3 {
  margin: 0 0 9px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.browser-continue-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.browser-continue-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 7px;
  border-radius: 9px;
  text-align: left;
}
.browser-continue-tab:hover {
  background: #f0f3f080;
}
.browser-continue-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid #e5e9e6;
  border-radius: 8px;
  background: white;
  color: #758079;
}
.browser-continue-mark .icon {
  width: 15px;
  height: 15px;
}
.browser-continue-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.browser-continue-title strong,
.browser-continue-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-continue-title strong {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.browser-continue-title small {
  font-size: 10px;
  color: var(--muted);
}
.browser-continue-tab > .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--muted);
}
@container (max-width: 330px) {
  .browser-start-hero {
    margin-bottom: 23px;
  }
  .browser-start-art {
    width: 148px;
    height: 107px;
  }
  .browser-start-hero h2 {
    font-size: 20px;
  }
  .browser-shortcuts {
    gap: 3px;
  }
  .browser-shortcut {
    font-size: 10px;
  }
  #browser-newtab-form {
    gap: 8px;
    padding-left: 12px;
  }
}
@media (max-height: 640px) {
  .browser-newtab {
    padding-top: 20px;
  }
  .browser-start-art {
    width: 120px;
    height: 87px;
  }
}
.app-shell:has(.browser-panel) .header-actions .button:not(.new-child-entry) > span {
  display: none;
}
.app-shell:has(.browser-panel) .header-actions .button {
  padding: 6px;
}
.app-shell:has(.browser-panel) .page-header {
  padding-left: 16px;
  padding-right: 16px;
}
.app-shell:has(.browser-panel) .context-panel {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 4;
  box-shadow: -8px 0 24px #00000008;
}
.chat-page,
.standard-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.page-header {
  height: var(--page-header-height);
  min-height: var(--page-header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  -webkit-app-region: drag;
  background: var(--paper);
}
.page-header button,
.page-header input {
  -webkit-app-region: no-drag;
}
.page-header h1 {
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.page-header-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.header-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-avatar {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #648359;
  font-size: 28px;
  background: #e5edde;
  border: 1px solid #dce6d6;
  border-radius: 10px;
}
.header-avatar.human {
  color: #615b4b;
  background: #eeeade;
  border-color: #e5e1d4;
}
.header-avatar .icon {
  width: 21px;
  height: 21px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-actions .button {
  font-size: 10px;
  min-height: 29px;
  padding: 6px 10px;
}
.chat-layout {
  display: flex;
  min-height: 0;
  flex: 1;
  position: relative;
}
.conversation-column {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  position: relative;
}
.message-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 24px 36px 30px;
  scroll-behavior: auto;
}
.message {
  display: flex;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto 26px;
}
.message-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  color: #68865c;
  background: #e7eedd;
  font-size: 23px;
  margin-top: 1px;
}
.message-avatar.human {
  font-size: 10px;
  color: #615b4b;
  background: #e9e5da;
  border-radius: 50%;
}
.message-content {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  min-height: 20px;
}
.message-meta strong {
  font-size: 11px;
  font-weight: 550;
  color: var(--ink);
}
.message-meta time {
  font-size: 9px;
  color: var(--muted);
}
.message-meta .badge {
  font-size: 8px;
}
.message-text {
  font-size: 12px;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.message-text > p + p,
.message-text > .code-block + p {
  margin-top: 8px;
}
.message-text strong {
  font-weight: 650;
  color: var(--ink);
}
.message.mine .message-text {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 11px 15px;
  border-radius: 0 9px 9px 9px;
  color: var(--ink);
  max-width: 100%;
}
.code-block {
  white-space: pre-wrap;
  overflow: auto;
  font:
    11px/1.7 "SFMono-Regular",
    Consolas,
    monospace;
  background: var(--hover);
  border: 1px solid var(--line);
  padding: 13px 15px;
  border-radius: 8px;
  margin: 8px 0;
}
.message-text > code {
  background: var(--hover);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
}
.tool-message {
  max-width: 700px;
  margin: 8px auto 18px 40px;
  font-size: 10px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.tool-message summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
}
.tool-message summary .icon {
  width: 13px;
  height: 13px;
}
.tool-message summary .icon:last-child {
  margin-left: auto;
}
.tool-message pre {
  white-space: pre-wrap;
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font:
    10px/1.7 "SFMono-Regular",
    monospace;
  overflow-wrap: anywhere;
}
.artifact-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--canvas);
  font-size: 11px;
  margin-top: 12px;
  min-width: 180px;
}
.artifact-card {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--canvas);
  overflow: hidden;
  font-size: 11px;
}
.conversation-reference {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 290px;
  max-width: 100%;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--canvas);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.conversation-reference > .icon:first-child { color: var(--muted); }
.conversation-reference > span { flex: 1; min-width: 0; }
.conversation-reference strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
}
.conversation-reference small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.conversation-reference > .icon:last-child { width: 13px; height: 13px; transform: rotate(-90deg); }
.conversation-reference:hover:not(:disabled) { background: var(--soft); }
.shared-conversation-preview { max-height: min(58vh, 520px); overflow: auto; padding: 3px 12px 3px 0; }
.shared-conversation-preview > .message { margin-bottom: 22px; }
.shared-conversation-preview .message-text { white-space: normal; }
.artifact-open,
.artifact-download {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px 12px;
  cursor: pointer;
}
.artifact-open {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: left;
}
.artifact-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-preview-label,
.artifact-download {
  flex-shrink: 0;
  color: var(--muted);
}
.artifact-download {
  border-left: 1px solid var(--line);
}
.artifact-chip .icon:last-child {
  margin-left: auto;
  width: 12px;
  height: 12px;
}
.conversation-welcome {
  min-height: 100%;
  max-width: 550px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 45px 20px 70px;
}
.welcome-mark {
  font-size: 69px;
  color: var(--muted);
  line-height: 1.15;
  margin-bottom: 25px;
  position: relative;
}
.welcome-mark:after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  background: var(--soft);
  border-radius: 50%;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}
.welcome-mark > .icon {
  width: 48px;
  height: 48px;
}
.conversation-welcome .eyebrow {
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-bottom: 13px;
  color: var(--muted);
}
.conversation-welcome h2 {
  font-size: 27px;
  letter-spacing: -0.04em;
  font-weight: 450;
  color: var(--ink);
}
.conversation-welcome p {
  font-size: 11px;
  max-width: 340px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 15px;
}
.suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
  min-width: 268px;
}
.suggestions > button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--canvas);
  color: var(--muted);
  text-align: left;
}
.suggestions > button:hover {
  background: var(--hover);
  border-color: var(--line);
  color: var(--ink);
}
.suggestions .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.composer {
  position: relative;
  margin: 0 30px 23px;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
  border-radius: 12px;
  padding: 13px 15px 9px;
  box-shadow: 0 2px 8px #00000004;
  flex-shrink: 0;
}
.composer:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px #00000004;
}
.composer textarea {
  display: block;
  resize: none;
  outline: 0;
  border: 0;
  background: none;
  width: 100%;
  min-height: 51px;
  max-height: 170px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.8;
  padding: 0;
}
.composer textarea::placeholder {
  color: var(--muted);
}
.composer textarea:focus-visible {
  outline: 0;
}
.mention-picker {
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--canvas);
  box-shadow: 0 12px 32px #0000001c;
}
.mention-picker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.mention-picker-head .icon {
  width: 14px;
  height: 14px;
}
.mention-picker-head kbd {
  margin-left: auto;
  font: inherit;
  font-size: 10px;
}
.mention-picker-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 5px;
}
.mention-kind {
  padding: 7px 8px 4px;
  color: var(--muted);
  font-size: 10px;
}
.mention-option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 8px;
  border-radius: 7px;
  color: var(--ink);
  text-align: left;
}
.mention-option:hover,
.mention-option.is-selected {
  background: var(--hover);
}
.mention-option .icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--muted);
}
.mention-option span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mention-option strong,
.mention-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mention-option strong {
  font-size: 12px;
  font-weight: 550;
}
.mention-option small {
  font-size: 10px;
  color: var(--muted);
}
.mention-empty {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.mention-more {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.message-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.message-resource {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
}
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.composer-footer > span {
  font-size: 9px;
  color: var(--muted);
}
.send-button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 7px;
}
.send-button:hover {
  background: var(--accent-hover);
}
.send-button .icon {
  width: 17px;
  height: 17px;
}
.join-prompt {
  margin: 0 28px 24px;
  padding: 17px;
  background: var(--hover);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.join-prompt strong {
  font-size: 12px;
}
.join-prompt p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.context-panel {
  width: 248px;
  flex-shrink: 0;
  background: var(--canvas);
  border-left: 1px solid var(--line);
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
}
.panel-heading .icon {
  width: 13px;
  height: 13px;
}
.context-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.mini-heading h3 {
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
}
.mini-heading > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.mini-heading .icon-button {
  height: 20px;
  min-width: 20px;
}
.task-card {
  display: block;
  text-align: left;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  margin-bottom: 9px;
  box-shadow: 0 1px 2px #00000003;
}
.task-card:hover {
  border-color: var(--line-strong);
  background: var(--canvas);
  box-shadow: 0 2px 8px #00000008;
}
.task-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.task-card > div > .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
}
.task-card strong {
  font-size: 11px;
  font-weight: 550;
  display: block;
  color: var(--ink);
}
.task-card p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.task-card .badge {
  font-size: 8px;
  padding: 2px 5px;
}
.environment-art {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.monitor-frame {
  width: 76px;
  height: 46px;
  display: block;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--soft);
  position: relative;
  box-shadow: 0 4px 12px #00000004;
}
.monitor-frame:after {
  content: "";
  position: absolute;
  width: 25px;
  height: 4px;
  bottom: -7px;
  left: calc(50% - 12px);
  border-bottom: 1.5px solid var(--line-strong);
  border-top: 1.5px solid var(--line-strong);
}
.monitor-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--muted);
  border-radius: 50%;
  bottom: 4px;
  right: 5px;
}
.monitor-frame:before {
  content: "✳";
  font-size: 22px;
  line-height: 1;
  position: absolute;
  top: 9px;
  left: 27px;
  color: var(--muted);
}
.error-banner,
.inline-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 25px;
  font-size: 11px;
  line-height: 1.7;
  flex-shrink: 0;
}
.error-banner {
  background: var(--danger-soft);
  color: var(--danger);
  border-bottom: 1px solid #efd9d5;
  min-height: 39px;
}
.error-banner > .icon-button {
  color: var(--danger);
}
.inline-notice {
  background: var(--soft);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  justify-content: flex-start;
}
.inline-notice > .icon {
  width: 13px;
  height: 13px;
}
.inline-notice > .text-button {
  font-size: 10px;
  margin-left: auto;
}
.page-content {
  overflow: auto;
  padding: 30px 34px;
  flex: 1;
  min-height: 0;
}
.narrow-content {
  max-width: 1100px;
  width: 100%;
  align-self: center;
}
.work-summary {
  display: flex;
  gap: 60px;
  margin: 3px 0 33px;
  padding: 3px 0 26px;
  border-bottom: 1px solid var(--line);
}
.work-summary > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.work-summary strong {
  font-size: 28px;
  font-weight: 450;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.work-summary span {
  font-size: 10px;
  color: var(--muted);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 15px;
}
.work-grid .task-card {
  padding: 18px;
  margin: 0;
  min-height: 125px;
}
.work-grid .task-card strong {
  font-size: 13px;
}
.work-grid .task-card p {
  font-size: 11px;
}
.work-grid .task-card .badge {
  font-size: 9px;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  min-height: 290px;
  height: 100%;
  padding: 35px 25px;
}
.empty-state .empty-icon {
  width: 34px;
  height: 34px;
  color: var(--muted);
  stroke-width: 1.1;
  margin-bottom: 20px;
}
.empty-state h2 {
  font-size: 18px;
  color: var(--ink);
  font-weight: 450;
}
.empty-state p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 10px;
  max-width: 355px;
}
.empty-state > .button {
  margin-top: 22px;
}
.loading-state {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  min-height: 140px;
}
.inbox-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
  overflow: hidden;
}
.inbox-row {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  padding: 21px;
  border-bottom: 1px solid var(--line);
}
.inbox-row:last-child {
  border: 0;
}
.inbox-row:hover {
  background: var(--soft);
}
.inbox-row > div {
  flex: 1;
}
.inbox-row strong {
  font-size: 12px;
  font-weight: 550;
}
.inbox-row p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.inbox-icon {
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  background: var(--hover);
  color: var(--muted);
  border-radius: 9px;
}
.inbox-row > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.space-layout {
  display: flex;
  min-height: 0;
  flex: 1;
}
.directory-tree {
  width: 215px;
  flex-shrink: 0;
  padding: 12px 14px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.directory-tree .section-heading {
  padding-bottom: 15px;
}
.directory-row {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  font-size: 11px;
  color: var(--muted);
  border-radius: 6px;
}
.directory-row.nested {
  padding-left: 23px;
}
.directory-row .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.directory-row.selected {
  background: var(--selected);
  color: var(--ink);
}
.directory-row:hover:not(.selected) {
  background: var(--hover);
}
.directory-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-note {
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted);
  padding: 25px 9px;
}
.space-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 29px 32px 15px;
}
.directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 32px 18px;
}
.directory-toolbar .button {
  flex-shrink: 0;
}
.directory-header .text-button {
  margin-bottom: 10px;
}
.folder-row .file-name > .icon {
  color: var(--accent);
}
.directory-header h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.directory-header p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.file-list {
  padding: 0 32px 30px;
}
.file-table-head,
.file-row {
  display: grid;
  grid-template-columns: 1fr 90px 20px;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
}
.file-table-head {
  font-size: 9px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 15px 7px 11px;
}
.file-row {
  padding: 15px 7px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.file-row:hover {
  background: var(--soft);
}
.file-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
}
.file-name > .icon {
  width: 21px;
  height: 21px;
  color: var(--muted);
  stroke-width: 1.3;
}
.file-name small {
  font-size: 9px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.file-row > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.app-shell:has(.browser-panel) .space-layout {
  flex-direction: column;
  min-width: 0;
}
.app-shell:has(.browser-panel) .directory-tree {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 7px 12px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
}
.app-shell:has(.browser-panel) .directory-tree .section-heading,
.app-shell:has(.browser-panel) .directory-tree .tree-note {
  display: none;
}
.app-shell:has(.browser-panel) .directory-row {
  flex: 0 0 auto;
  width: auto;
  max-width: 220px;
  min-height: 30px;
  padding: 6px 9px;
}
.app-shell:has(.browser-panel) .directory-header {
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 20px 12px;
  padding: 0;
}
.app-shell:has(.browser-panel) .directory-header > div:first-child {
  flex: 1 1 160px;
  min-width: 100px;
  max-width: 100%;
}
.app-shell:has(.browser-panel) .directory-header h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-shell:has(.browser-panel) .directory-actions {
  flex-wrap: wrap;
  max-width: 100%;
  gap: 6px;
}
.app-shell:has(.browser-panel) .file-list {
  padding: 0 20px 24px;
}
.app-shell:has(.browser-panel) .file-table-head,
.app-shell:has(.browser-panel) .file-row {
  grid-template-columns: minmax(0, 1fr) minmax(42px, 64px) 16px;
  gap: 8px;
}
.app-shell:has(.browser-panel) .file-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-shell:has(.browser-panel) .file-name small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 30px;
  gap: 15px;
}
.editor-actions {
  display: flex;
  gap: 8px;
}
.editor-title {
  padding: 13px 40px 17px;
  border-bottom: 1px solid var(--line);
}
.editor-title h2 {
  font-size: 23px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 8px;
}
.editor-save-state {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 8px;
}
.document-editor {
  width: 100%;
  flex: 1;
  min-height: 280px;
  resize: none;
  padding: 25px 40px 50px;
  background: transparent;
  border: 0;
  outline: 0;
  font:
    12px/2 "Avenir Next",
    "PingFang SC",
    sans-serif;
  color: var(--ink);
  tab-size: 2;
}
.document-editor:focus-visible {
  outline: 0;
}
.document-editor::placeholder {
  color: var(--muted);
}
.document-editor[readonly] {
  background: var(--soft);
  color: var(--muted);
}
.editor-bottom {
  padding: 11px 30px;
  font-size: 9px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
}
.editor-bottom .icon {
  width: 12px;
  height: 12px;
}
.settings-content {
  max-width: 1040px;
  width: 100%;
  align-self: center;
}
.settings-section {
  padding: 10px 0 28px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 15px;
}
.section-title h2 {
  font-size: 14px;
  font-weight: 550;
  color: var(--ink);
}
.section-title p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.9;
  max-width: 550px;
}
.member-list {
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: 9px;
  overflow: hidden;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child {
  border: 0;
}
.member-row > div {
  flex: 1;
  min-width: 0;
}
.member-row strong {
  font-size: 11px;
  font-weight: 550;
  color: var(--ink);
}
.member-row p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.member-row .text-button {
  font-size: 10px;
}
.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}
.privacy-note .icon {
  width: 15px;
  height: 15px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #00000030;
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: appear 0.14s ease-out;
}
.dialog {
  width: 470px;
  max-width: 100%;
  max-height: calc(100vh - 80px);
  overflow: auto;
  border-radius: 15px;
  background: var(--canvas);
  box-shadow:
    0 24px 80px #00000026,
    0 2px 8px #00000008;
  border: 1px solid var(--line);
}
.dialog.wide {
  width: 760px;
}
.dialog-heading {
  padding: 24px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.dialog-heading h2 {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 550;
  color: var(--ink);
}
.dialog-heading p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 6px;
  max-width: 350px;
}
.dialog-heading > .icon-button {
  margin: -5px -5px 0 0;
  color: var(--muted);
}
.dialog-body {
  padding: 5px 24px 18px;
}
.form-field {
  display: block;
  margin-bottom: 17px;
}
.form-field > span {
  display: block;
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 7px;
}
.form-field input,
.form-field textarea,
.form-field select {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 12px;
  color: var(--ink);
  min-height: 38px;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
}
.form-field textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.7;
}
.form-field input[readonly] {
  color: var(--muted);
  font:
    10px/1.7 "SFMono-Regular",
    monospace;
}
.form-field small,
.form-note {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.85;
  margin-top: 8px;
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 24px 21px;
  border-top: 1px solid var(--line);
}
.dialog-body > .dialog-actions {
  padding: 16px 0 0;
  margin-top: 20px;
}
.form-error {
  color: var(--danger);
  font-size: 11px;
  line-height: 1.8;
  background: var(--danger-soft);
  border: 1px solid #efd9d5;
  padding: 10px 12px;
  border-radius: 7px;
  margin: 12px 0 0;
}
.share-explanation {
  display: flex;
  gap: 13px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.share-explanation > .icon {
  width: 21px;
  height: 21px;
  margin-top: 2px;
}
.share-explanation strong {
  font-size: 11px;
  font-weight: 550;
  color: var(--ink);
}
.share-explanation p {
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 6px;
}
.environment-dialog {
  width: 460px;
}
.environment-dialog .dialog-heading {
  padding-bottom: 19px;
}
.environment-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}
.environment-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
  color: var(--muted);
}
.environment-symbol .icon {
  width: 22px;
  height: 22px;
}
.environment-summary.verified .environment-symbol {
  color: var(--success);
  background: var(--success-soft);
}
.environment-summary.attention .environment-symbol {
  color: var(--warning);
  background: var(--warning-soft);
}
.environment-status-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}
.environment-summary p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}
.environment-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 19px 0 15px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.environment-capabilities span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.environment-capabilities .icon {
  width: 14px;
  height: 14px;
}
.environment-facts {
  margin: 13px 0 10px;
  font-size: 12px;
}
.environment-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
}
.environment-facts dt,
.environment-note {
  color: var(--muted);
}
.environment-facts dd {
  margin: 0;
  text-align: right;
}
.environment-note {
  font-size: 11px;
  line-height: 1.8;
}
.environment-details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.environment-details summary {
  cursor: pointer;
  width: fit-content;
}
.environment-details dl {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--soft);
}
.environment-details dd {
  margin: 0 0 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.environment-actions {
  flex-wrap: wrap;
}
.environment-actions .button {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.fact-list {
  margin: 5px 0 0;
  border-top: 1px solid var(--line);
}
.fact-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.fact-list dt {
  color: var(--muted);
}
.fact-list dd {
  color: var(--ink);
}
.work-detail-meta {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  padding: 0 0 15px;
  border-bottom: 1px solid var(--line);
}
.work-detail-task {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.work-detail-task .mini-heading h3 {
  font-size: 14px;
  color: var(--ink);
}
.task-goal {
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
}
.work-task-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.assignment-select {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  margin-right: auto;
}
.assignment-select select {
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--ink);
  max-width: 180px;
}
.result-card {
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  margin-top: 17px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink);
}
.result-card .eyebrow {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 7px;
}
.confirmation-heading {
  margin: 20px 0 12px;
  font-size: 12px;
  color: var(--ink);
}
.confirmation-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.confirmation-row > div {
  flex: 1;
}
.confirmation-row strong {
  font-size: 11px;
  color: var(--ink);
}
.confirmation-row p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.version-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.version-list > button > span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.version-list strong {
  font-weight: 450;
  font-size: 10px;
  word-break: break-all;
}
.version-list .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.conflict-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.conflict-comparison h3 {
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 10px;
}
.conflict-comparison pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 140px;
  max-height: 300px;
  overflow: auto;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font:
    11px/1.9 "Avenir Next",
    "PingFang SC",
    sans-serif;
  color: var(--ink);
}
.budget-display {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 15px 0 25px;
}
.budget-display > span {
  font-size: 10px;
  color: var(--muted);
}
.budget-display strong {
  font-size: 35px;
  font-weight: 450;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin: 7px 0;
}
.budget-display small {
  font-size: 9px;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 27px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--canvas);
  box-shadow: 0 7px 24px #00000014;
  border-radius: 10px;
  color: var(--ink);
  font-size: 11px;
  animation: appear 0.18s ease-out;
  max-width: calc(100% - 60px);
}
.toast > .icon {
  width: 16px;
  height: 16px;
  color: var(--success);
}
.boot-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  background: var(--paper);
}
.assistant-mark {
  font-size: 58px;
  color: var(--muted);
  line-height: 1.1;
}
.boot-screen .loading-state {
  min-height: 75px;
}
.login-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 40px;
  background: var(--canvas);
  -webkit-app-region: drag;
}
.login-screen button {
  -webkit-app-region: no-drag;
}
.login-art {
  height: 80px;
  width: 80px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 88px;
  line-height: 1;
  margin-bottom: 24px;
}
.login-screen .eyebrow {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 0.08em;
}
.login-screen h1 {
  font-size: 30px;
  line-height: 1.45;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-weight: 500;
}
.login-screen > p {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 26px;
  line-height: 1.9;
  max-width: 390px;
}
.login-screen > .button {
  min-width: 180px;
  min-height: 40px;
  font-size: 12px;
  background: var(--accent);
}
.login-screen > small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 28px;
}
.login-screen .login-error {
  font-size: 11px;
  color: var(--danger);
  max-width: 470px;
  margin: 20px 0 0;
}
@keyframes appear {
  from {
    opacity: 0;
    translate: 0 4px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: #d1d1d1;
  border-radius: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
@media (min-width: 1450px) {
  .app-shell {
    --sidebar-default-width: 246px;
  }
  .sidebar {
    padding: 0 17px;
  }
  .context-panel {
    width: 264px;
    padding: 0 18px;
  }
  .message-scroll {
    padding-left: 60px;
    padding-right: 60px;
  }
  .composer {
    margin-left: 50px;
    margin-right: 50px;
  }
}
@media (max-width: 1100px) {
  .app-shell {
    --sidebar-default-width: 205px;
  }
  .app-shell:has(.browser-panel) {
    --sidebar-default-width: 64px;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar {
    padding: 0 8px;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .window-drag:has(.header-update) {
    height: 76px;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .header-update {
    gap: 4px;
    padding-inline: 6px;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .nav-item {
    justify-content: center;
    padding: 0;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .nav-item > span,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .nav-item > small,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .chat-label,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .chat-row > .quiet-icon,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .quiet-tag,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .section-heading,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .sidebar-empty,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .conversation-children,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .conversation-toggle,
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .scope-switch > span:nth-child(2),
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .scope-switch > .icon {
    display: none;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .chat-row {
    justify-content: center;
    padding: 7px;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .sidebar-footer {
    flex-direction: column;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .sidebar .scope-switch {
    padding: 5px;
    flex: none;
    min-height: 42px;
  }
  html:not([data-sidebar-custom]) .app-shell:has(.browser-panel) .scope-menu {
    width: 220px;
    right: auto;
  }
  .browser-panel {
    flex-basis: var(--browser-panel-width, 46vw);
    width: var(--browser-panel-width, 46vw);
  }
  .context-panel {
    width: 238px;
    padding: 0 14px;
  }
  .sidebar {
    padding: 0 10px;
  }
  .message-scroll {
    padding-left: 24px;
    padding-right: 24px;
  }
  .composer {
    margin-left: 20px;
    margin-right: 20px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions .button {
    font-size: 9px;
    padding: 5px 8px;
  }
  .directory-tree {
    width: 180px;
  }
  .work-summary {
    gap: 25px;
  }
}
@media (max-width: 900px) {
  .app-shell:not(:has(.browser-panel)) {
    --sidebar-default-width: 191px;
  }
  .context-panel {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 4;
    width: 248px;
    max-width: calc(100% - 32px);
    box-shadow: -8px 0 24px #00000008;
  }
  .brand {
    font-size: 12px;
  }
  .page-content {
    padding: 24px;
  }
  .header-actions .button:not(.new-child-entry) > span {
    display: none;
  }
  .header-actions .button {
    padding: 6px;
  }
  .directory-tree {
    width: 165px;
    padding: 10px;
  }
  .directory-header,
  .file-list {
    margin-left: 0;
    margin-right: 0;
    padding-left: 22px;
    padding-right: 22px;
  }
  .directory-header {
    margin-top: 24px;
  }
  .work-summary {
    gap: 24px;
  }
  .work-summary > div {
    flex-direction: column;
    gap: 0;
  }
  .work-task-actions {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
html[data-reduce-motion] *,
html[data-reduce-motion] *::before,
html[data-reduce-motion] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
.runtime-notices {
  background: var(--warning-soft);
  border-bottom: 1px solid #e9ddc0;
  max-height: 180px;
  overflow: auto;
  flex-shrink: 0;
}
.runtime-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  color: var(--warning);
}
.runtime-notice > .icon {
  width: 16px;
  height: 16px;
}
.runtime-notice > div {
  flex: 1;
  min-width: 0;
}
.runtime-notice strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
}
.runtime-notice p {
  font-size: 10px;
  margin-top: 3px;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.message.reply-indicator:not(.has-identity),
.message.runtime-message-status {
  padding-left: 40px;
}
.reply-indicator .message-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 72px;
  height: 40px;
  border-radius: 22px;
  background: var(--soft);
}
.reply-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  opacity: .45;
  animation: reply-dot 1.4s ease-in-out infinite;
}
.reply-dot:nth-child(2) { animation-delay: .16s; }
.reply-dot:nth-child(3) { animation-delay: .32s; }
@keyframes reply-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .reply-dot { animation: none; }
}
.runtime-message-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.history-more {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px auto;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
}
.binary-file-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px;
  text-align: center;
}
.binary-file-detail > .icon {
  width: 55px;
  height: 55px;
  color: var(--muted);
  stroke-width: 1.1;
  margin-bottom: 25px;
}
.binary-file-detail h2 {
  font-size: 21px;
  color: var(--ink);
  margin-bottom: 13px;
}
.binary-file-detail p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 20px 0;
}
.binary-file-detail > .button {
  margin-top: 9px;
}
.chat-row > .quiet-tag {
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-environment {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.task-environment strong {
  font-size: 12px;
}
.task-environment p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.grant-task-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.grant-task-summary span {
  font-size: 11px;
  color: var(--muted);
}
.grant-resource {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.grant-resource > span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.grant-operations {
  margin: 20px 0;
  padding: 0;
  border: 0;
}
.grant-operations legend {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}
.grant-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  margin: 10px 0;
  cursor: pointer;
}
.grant-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.grant-exec {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
}
.grant-exec .form-field {
  margin-top: 16px;
}
.grant-warning {
  font-size: 11px;
  line-height: 1.65;
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: 7px;
  padding: 10px;
}
.preview-notice {
  flex-shrink: 0;
  padding: 7px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--hover);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.group-member-list .member-row {
  gap: 10px;
}
.group-member-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.group-member-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.group-member-summary > strong {
  font-size: 12px;
  color: var(--accent);
}
.group-assistant-row {
  background: var(--hover);
  border-radius: 9px;
  padding-left: 12px;
  padding-right: 12px;
}
.group-assistant-row .assistant-glyph {
  font-size: 23px;
  background: var(--selected);
  color: var(--accent);
}
.group-assistant-row strong {
  overflow-wrap: anywhere;
}
.group-add-section + .group-add-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.group-add-section h3 {
  margin-bottom: 10px;
}
.group-add-section > .button {
  margin-top: 12px;
}
.group-member-empty {
  background: var(--soft);
  border-radius: 8px;
  padding: 13px 15px;
}
.group-add-member {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 18px 0 10px;
}
.group-add-member .form-field {
  flex: 1;
  margin: 0;
}
.chat-header .social-avatar.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.chat-header .social-avatar.header-avatar.avatar-person {
  border-radius: 50%;
}
.chat-header .social-avatar.header-avatar.avatar-assistant {
  border-radius: 0;
}
.chat-header .social-avatar.header-avatar > .icon {
  width: 22px;
  height: 22px;
}
.chat-header .header-privacy {
  width: 12px;
  height: 12px;
  color: var(--muted);
}
.chat-header .header-actions .button {
  min-height: 28px;
  font-size: 11px;
  padding: 5px 8px;
}
.context-tasks .mini-heading {
  margin-bottom: 5px;
}
.context-tasks .task-card {
  padding: 9px 8px;
  margin-bottom: 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 6px;
}
.context-tasks .task-card:hover {
  background: var(--hover);
}
.context-tasks .task-card > div {
  margin-bottom: 5px;
}
.context-tasks .task-card p {
  display: none;
}
.context-shortcuts {
  padding: 8px 0;
  border-bottom: 0;
}
.context-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
  color: var(--ink);
}
.context-link:hover:not(:disabled) {
  background: var(--hover);
}
.context-link > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.context-link > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repository-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 8px 0;
  background: var(--paper);
}
.repository-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.repository-heading strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.repository-heading > .icon {
  flex-shrink: 0;
}
.repository-branch,
.repository-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.repository-branch {
  margin-top: 5px;
}
.repository-card p {
  margin: 8px 0;
}
.repository-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.space-main > .repository-card {
  margin: 0 24px 12px;
}
.directory-row > .repository-marker {
  width: 13px;
  flex-shrink: 0;
  margin-left: auto;
}
.chat-header .header-identity {
  flex: 1;
  min-width: 0;
  gap: 8px;
}
.chat-header .header-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-header h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.chat-header .header-actions {
  margin-left: auto;
  gap: 6px;
}
.group-header .header-actions .group-member-entry > span {
  display: inline;
}
.text-button.danger {
  color: var(--danger);
}
.confirmation-evidence {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 12px 0;
  padding: 14px;
}
.confirmation-evidence .confirmation-row {
  padding: 0;
  border: 0;
}
.confirmation-snapshot {
  padding-top: 14px;
  color: var(--ink);
}
.confirmation-snapshot h4 {
  font-size: 14px;
  margin: 10px 0 8px;
}
.confirmation-snapshot p,
.confirmation-snapshot dd {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 12px;
}
.confirmation-snapshot dl {
  margin: 12px 0;
}
.confirmation-snapshot dt {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 12px;
}
.confirmation-snapshot dd {
  margin: 5px 0 0;
}
.result-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.execution-evidence {
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  background: var(--soft);
  color: var(--ink);
  border-radius: 8px;
}
.directory-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.conversation-branch {
  margin-bottom: 2px;
}
.conversation-parent {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 6px;
  transition: background 0.16s;
}
.conversation-parent:hover {
  background: var(--hover);
}
/* Only the parent's own conversation selects this row; an active child does not. */
.conversation-parent:has(> .chat-row.selected) {
  background: var(--selected);
}
.conversation-parent > .chat-row {
  flex: 1;
  min-width: 0;
}
.conversation-parent > .chat-row.selected,
.conversation-parent > .chat-row:hover:not(.selected) {
  background: transparent;
}
.conversation-toggle {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 5px;
  color: var(--muted);
}
.conversation-toggle:hover {
  background: #00000006;
  color: var(--accent);
}
.conversation-toggle .icon {
  width: 12px;
  height: 12px;
}
.conversation-toggle[aria-expanded="false"] .icon {
  transform: rotate(-90deg);
}
.conversation-children {
  margin: 2px 0 5px 18px;
  padding-left: 7px;
  border-left: 1px solid var(--line);
}
.conversation-children .chat-row {
  min-height: 31px;
  padding: 5px 7px;
  gap: 7px;
}
.conversation-children .chat-row .icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.social-avatar {
  --avatar-bg: #dce9df;
  --avatar-ink: #436751;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid #00000006;
  border-radius: 10px;
  background: var(--avatar-bg);
  color: var(--avatar-ink);
  overflow: hidden;
}
.social-avatar.avatar-blue {
  --avatar-bg: #dde8f1;
  --avatar-ink: #496981;
}
.social-avatar.avatar-clay {
  --avatar-bg: #f0e0d7;
  --avatar-ink: #916751;
}
.social-avatar.avatar-plum {
  --avatar-bg: #e9e1ee;
  --avatar-ink: #7b648b;
}
.social-avatar.avatar-amber {
  --avatar-bg: #efe7cf;
  --avatar-ink: #756138;
}
.social-avatar.avatar-person {
  border-radius: 50%;
}
.social-avatar.avatar-assistant {
  border-radius: 0;
  background: transparent;
  color: #426b50;
  border: 0;
}
.social-avatar .avatar-initial {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.social-avatar > .icon {
  width: 22px;
  height: 22px;
  color: inherit;
  stroke-width: 1.7;
}
.chat-row > span.social-avatar {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  overflow: hidden;
}
.chat-row .social-avatar > .icon {
  width: 21px;
  height: 21px;
  color: inherit;
}
.chat-row:has(> .social-avatar) {
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.chat-row > .chat-label {
  min-width: 0;
}
.social-avatar.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.social-avatar.header-avatar.avatar-person {
  border-radius: 50%;
}
.social-avatar.header-avatar.avatar-assistant {
  border-radius: 0;
}
.social-avatar.header-avatar > .icon {
  width: 26px;
  height: 26px;
}
.social-avatar.header-avatar .avatar-initial {
  font-size: 17px;
}
.social-avatar.message-avatar {
  width: 28px;
  height: 28px;
  margin-top: 1px;
}
.social-avatar.message-avatar > .icon {
  width: 20px;
  height: 20px;
}
.social-avatar.message-avatar .avatar-initial {
  font-size: 11px;
}
.work-group-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
}
.group-heading .work-group-tools > .icon-button {
  height: 24px;
  min-width: 24px;
  padding: 4px;
}
.group-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 164px;
  padding: 5px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 8px 24px #0000001b;
  z-index: 12;
}
.group-menu > button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 8px 9px;
  border-radius: 5px;
  color: var(--ink);
  text-align: left;
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0;
}
.group-menu > button:hover:not(:disabled) {
  background: var(--hover);
}
.group-menu > button > .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24%;
}
.brand .brand-mark {
  display: block;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
}
.assistant-mark {
  width: 68px;
  height: 68px;
}
.social-avatar > .agent-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.personal-avatar-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  flex: none;
  pointer-events: none;
}
.personal-avatar-art > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.personal-avatar-pupil {
  position: absolute;
  top: 52.25%;
  width: 3.5%;
  height: 7%;
  border-radius: 50%;
  background: #493c36;
  transform: translate(-50%, -50%);
}
.personal-avatar-pupil.pupil-left {
  left: 38.8%;
}
.personal-avatar-pupil.pupil-right {
  left: 61.2%;
}
.personal-avatar-pupil::after {
  content: '';
  position: absolute;
  left: 24%;
  top: 14%;
  width: 26%;
  height: 24%;
  border-radius: 50%;
  background: #fff9;
}
.social-avatar.welcome-avatar {
  width: 78px;
  height: 78px;
  border-radius: 0;
}
.conversation-welcome .welcome-mark {
  height: auto;
}
.social-avatar.group-avatar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 2px;
  background: var(--hover);
  border-radius: 8px;
}
.group-avatar-row {
  display: flex;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-height: 0;
}
.group-avatar-row > .social-avatar.group-avatar-tile {
  width: calc((100% - 2px) / 3);
  height: auto;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 0;
  border-radius: 2px;
}
.group-avatar-tile .avatar-initial {
  font-size: 6px;
}
.group-avatar-tile > .agent-portrait {
  object-fit: contain;
}
.group-avatar-1 .group-avatar-tile {
  width: 100% !important;
}
.group-avatar-2 .group-avatar-tile,
.group-avatar-3 .group-avatar-tile,
.group-avatar-4 .group-avatar-tile {
  width: calc((100% - 1px) / 2) !important;
}
.group-avatar-1 .avatar-initial {
  font-size: 14px;
}
.group-avatar-2 .avatar-initial,
.group-avatar-3 .avatar-initial,
.group-avatar-4 .avatar-initial {
  font-size: 9px;
}
.header-avatar.group-avatar .avatar-initial {
  font-size: 8px;
}

.personal-contact-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
#personal-contact-host {
  flex: 1;
  min-height: 0;
  position: relative;
}
.personal-contact-error {
  color: var(--muted);
  padding: 28px;
  font-size: 12px;
}
.scope-menu > button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scope-menu-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 10px 9px 3px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.scope-menu-brand .brand-logo {
  width: 18px;
  height: 18px;
}
.scope-menu-brand small {
  margin-left: auto;
}

/* Transparent character art sits directly on the surrounding UI. */
.welcome-mark:has(.avatar-assistant)::after {
  content: none;
}

/* Compact assistant tools share the same quiet surfaces as chat. */
.assistant-tool-tabs { display:flex; gap:8px; padding:0 0 18px; border-bottom:1px solid #eaeaea; }
.assistant-tool-tabs button { display:flex; align-items:center; gap:8px; border:0; border-radius:8px; padding:9px 14px; background:transparent; color:#656565; font:inherit; cursor:pointer; }
.assistant-tool-tabs button[aria-selected="true"] { background:#f1f1f1; color:#262626; }
.assistant-tool-tabs button:hover { background:#f6f6f6; }
.assistant-tool-list { display:flex; flex-direction:column; }
.assistant-tool-row { display:flex; align-items:center; gap:14px; padding:16px 2px; border-bottom:1px solid #efefef; }
.assistant-tool-row>div { flex:1; min-width:0; }
.assistant-tool-row strong { display:block; font-size:14px; font-weight:550; overflow-wrap:anywhere; }
.assistant-tool-row p { margin:5px 0 0; color:#656565; font-size:12px; overflow:hidden; text-overflow:ellipsis; }
.assistant-tool-row small,.assistant-tool-row>span { color:#656565; font-size:12px; }
.assistant-tool-row>.badge,.assistant-tool-row>.text-button,.tool-message-row>span { flex-shrink:0; }
.tool-message-row { text-align:left; width:100%; background:transparent; border-left:0; border-right:0; border-top:0; cursor:pointer; }
.tool-message-row:hover { background:#fafafa; }
.tool-address { display:flex; align-items:center; gap:10px; padding:18px 0 4px; color:#5f5f5f; overflow-wrap:anywhere; }
.tool-empty { display:grid; justify-items:center; gap:16px; color:#656565; padding:52px 12px; font-size:14px; }
.tool-bottom-actions { display:flex; justify-content:flex-end; padding:20px 0 0; }
.tool-mail h3 { margin:18px 0 6px; }
.tool-mail>p { font-size:12px; color:#656565; }
.tool-mail-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; padding-top:20px; }
.resource-settings { display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.resource-settings h3,.resource-members h3 { margin:0 0 18px; font-size:14px; font-weight:600; }
.resource-check { display:flex; gap:10px; align-items:center; font-size:13px; margin-bottom:18px; }
.resource-members { margin-top:28px; padding-top:22px; border-top:1px solid #eaeaea; }
.resource-permission-header,.resource-permission-row { display:grid; grid-template-columns:minmax(110px,1fr) repeat(4,65px); align-items:center; gap:8px; padding:11px 0; font-size:12px; text-align:center; }
.resource-permission-header { color:#656565; }
.resource-permission-row>span:first-child,.resource-permission-header>span:first-child { text-align:left; overflow-wrap:anywhere; }
.resource-permission-row input { justify-self:center; }
@media(max-width:600px) { .resource-settings { grid-template-columns:1fr; } .resource-permission-header,.resource-permission-row { grid-template-columns:minmax(70px,1fr) repeat(4,50px); } }

.team-voice-bar { display:flex; align-items:center; gap:10px; min-height:46px; padding:6px 24px; border-bottom:1px solid #e8ede9; background:#f7faf8; color:#425e4b; font-size:13px; }
.team-voice-actions { margin-left:auto; display:flex; gap:14px; align-items:center; }
.team-voice-actions .voice-end { background:#fff; color:#a64747; border-color:#eedcdc; padding:6px 10px; font-size:12px; }
.voice-indicator { width:7px; height:7px; border-radius:50%; background:#4a8d63; }
.team-voice-bar.voice-error { background:#fff8f7; color:#a64747; }
.team-voice-bar.voice-error .icon-button { margin-left:auto; }
