* {
  box-sizing: border-box;
}
:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #e8e6e3;
  background: #131414;
  font-size: 14px;
  --muted: #969895;
  --line: #2c2e2c;
  --orange: #ef9457;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #242624;
  padding: 9px 13px;
}
button:hover {
  background: #30332f;
}
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
input,
textarea,
select {
  color: inherit;
  background: #171918;
  border: 1px solid #393c38;
  border-radius: 7px;
  padding: 10px;
  min-width: 0;
}
textarea {
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
}
h2 {
  font-size: 20px;
}
p {
  line-height: 1.6;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  margin: 8px 0;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.primary {
  background: var(--orange);
  color: #21170f;
  border-color: var(--orange);
  font-weight: 650;
}
.primary:hover {
  background: #ffab72;
}
.quiet,
.icon-button {
  background: transparent;
}
.icon-button {
  padding: 4px 9px;
  border-color: transparent;
  font-size: 20px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: var(--orange);
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: var(--orange);
  color: #21170f;
  border-radius: 8px;
  font:
    bold 28px Georgia,
    serif;
}
.workspace {
  height: 100dvh;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
}
.sidebar {
  background: #191b19;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  height: 64px;
  flex-shrink: 0;
}
.brand strong {
  font-size: 15px;
}
.brand strong .muted {
  font-weight: 400;
}
.new-thread {
  margin: 4px 18px 8px;
}
.tree-toggle {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.thread-dot {
  color: var(--muted);
}
.thread-dot.running {
  color: var(--orange);
}
a {
  color: var(--orange);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.7px;
}
.catalog {
  overflow: auto;
  flex: 1;
  padding: 0 10px 24px;
}
.machine {
  padding: 7px 0 15px;
}
.machine-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
}
.machine-heading strong {
  overflow-wrap: anywhere;
  flex: 1;
  font-size: 13px;
}
.dot {
  height: 7px;
  width: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #686c67;
}
.dot.online {
  background: #99b890;
  box-shadow: 0 0 8px #99b89026;
}
.machine-meta {
  font-size: 10px;
  color: var(--muted);
  padding: 0 10px 8px 25px;
}
.project {
  margin: 3px 0 6px 13px;
  border-left: 1px solid #343731;
  padding-left: 9px;
}
.project-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-heading strong {
  flex: 1;
  font-size: 12px;
  overflow-wrap: anywhere;
  color: #c7cac4;
}
.project-heading .icon-button {
  font-size: 17px;
}
.thread-link {
  display: block;
  text-align: left;
  border: 0;
  background: none;
  width: 100%;
  font-size: 12px;
  color: #a1a69d;
  padding: 9px 10px;
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-link.active {
  background: #353025;
  color: #f8ba8c;
  box-shadow: inset 2px 0 var(--orange);
}
.sidebar-footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 12px;
}
.sidebar-footer span {
  overflow-wrap: anywhere;
}
main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 32px;
}
.breadcrumbs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.breadcrumbs span {
  font-size: 11px;
  color: var(--muted);
}
.breadcrumbs strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.connection {
  color: #a7b99d;
  font-size: 11px;
  white-space: nowrap;
}
.connection.disconnected {
  color: #e2b075;
}
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.empty p {
  max-width: 410px;
}
.empty-symbol {
  font:
    80px Georgia,
    serif;
  color: #5b4b3b;
  margin-bottom: 24px;
}
.empty .quiet {
  color: var(--orange);
  border: 0;
}
.thread-view {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.thread-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 30px;
  border-bottom: 1px solid #222522;
  font-size: 11px;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.model-label {
  flex-direction: row;
  align-items: center;
  color: var(--muted);
}
.model-label select {
  max-width: 230px;
  font-size: 11px;
  padding: 6px;
}
.messages {
  overflow: auto;
  flex: 1;
  min-height: 120px;
  padding: 28px max(28px, calc((100% - 900px) / 2));
}
.message {
  margin: 0 0 27px;
}
.message-heading {
  font-size: 11px;
  font-weight: 650;
  color: var(--orange);
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
}
.message.user .message-heading {
  color: #b7c9ac;
}
.message-body {
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.user .message-body {
  padding: 14px 18px;
  background: #20231f;
  border: 1px solid #30352d;
  border-radius: 9px;
}
.message details {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0;
}
.message details summary {
  cursor: pointer;
}
.composer {
  margin: 0 28px 18px;
  border: 1px solid #45473e;
  background: #1c1e1b;
  border-radius: 11px;
  padding: 12px;
}
.composer textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  background: transparent;
  min-height: 65px;
  max-height: 220px;
  padding: 3px;
  line-height: 1.6;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 10px;
}
.composer-bottom > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.composer-bottom select {
  font-size: 11px;
  padding: 7px;
  background: transparent;
}
.composer-bottom button {
  font-size: 12px;
}
.drawer {
  border-top: 1px solid var(--line);
  background: #111311;
  flex-shrink: 0;
}
.drawer-header {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid #272a26;
  padding: 0 24px;
  align-items: center;
}
.drawer-header [role="tab"] {
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  padding: 13px 3px;
}
.drawer-header [aria-selected="true"] {
  color: var(--orange);
  box-shadow: inset 0 -2px var(--orange);
}
.drawer-header span {
  margin-left: 6px;
  color: var(--muted);
}
#drawer-toggle {
  margin-left: auto;
}
.activity-content {
  height: 155px;
  overflow: auto;
  padding: 8px 28px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #abb3a5;
}
.tool {
  border-bottom: 1px solid #252823;
  padding: 7px 0;
}
.tool summary {
  cursor: pointer;
}
.tool.error {
  color: #ef9e91;
}
.event {
  padding: 5px 0;
  border-bottom: 1px solid #242723;
  overflow-wrap: anywhere;
}
.notice {
  padding: 10px 28px;
  background: #41291d;
  color: #ffc79f;
  font-size: 12px;
}
.extension-dialogs {
  max-height: 240px;
  overflow: auto;
  padding: 0 28px;
}
.extension-card {
  border: 1px solid #705238;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #242019;
}
.extension-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.extension-card input,
.extension-card textarea,
.extension-card select {
  width: 100%;
  margin-bottom: 10px;
}
.extension-card button {
  margin-right: 7px;
}
.login-view {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, #32271f 0, transparent 65%);
}
.login-card {
  width: 100%;
  max-width: 370px;
}
.login-card .brand-mark {
  margin-bottom: 30px;
  width: 44px;
  height: 44px;
}
.login-card label {
  margin: 20px 0;
  font-size: 12px;
}
.login-card .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.error {
  color: #f0a396;
  font-size: 12px;
}
.error:empty {
  display: none;
}
.loading {
  height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
dialog {
  width: min(480px, calc(100% - 32px));
  background: #20221f;
  border: 1px solid #45483e;
  border-radius: 13px;
  color: inherit;
  padding: 24px;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(4px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-header h2 {
  margin: 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
#modal-body label {
  font-size: 12px;
  margin: 15px 0;
}
#modal-body p {
  color: var(--muted);
  font-size: 13px;
}
#modal-body pre {
  padding: 12px;
  background: #131512;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.mobile-only,
.scrim {
  display: none;
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, 85vw);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.18s;
  }
  .workspace.menu-open .sidebar {
    transform: translateX(0);
  }
  .workspace.menu-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: #0009;
    border: 0;
    border-radius: 0;
    z-index: 19;
  }
  .mobile-only {
    display: inline-block;
  }
  .brand .mobile-only {
    margin-left: auto;
  }
  .topbar {
    height: 72px;
    padding: 12px 16px;
    gap: 10px;
  }
  .breadcrumbs {
    flex: 1;
  }
  .connection {
    font-size: 10px;
  }
  .thread-toolbar {
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .toolbar-actions {
    flex-wrap: wrap;
  }
  .messages {
    padding: 22px 18px;
  }
  .composer {
    margin: 0 12px 12px;
  }
  .composer-bottom {
    align-items: flex-end;
  }
  .composer-bottom > span {
    max-width: 100px;
    line-height: 1.5;
  }
  .composer-bottom select {
    max-width: 95px;
  }
  .activity-content {
    height: 125px;
    padding: 8px 16px;
  }
  .drawer-header {
    padding: 0 16px;
  }
  .extension-dialogs {
    padding: 0 12px;
  }
  .empty h1 {
    font-size: 25px;
  }
  button {
    min-height: 36px;
  }
  .icon-button {
    min-width: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
