:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  --shell: #f6f7f4;
  --paper: #fff;
  --ink: #282e29;
  --muted: #797f79;
  --line: #e5e8e2;
  --soft: #eef1eb;
  --accent: #365f49;
  --accent-soft: #e4ede3;
  --hover: #ecefe9;
  --terminal: #fff;
  --terminal-ink: #39433b;
  --shadow: 0 16px 50px #24332316;
  color: var(--ink);
  background: var(--shell);
  font-size: 13px;
}
.workspace.work-area {
  gap: 0;
  padding: 0;
}
.console.session {
  border-radius: 0;
  overflow: hidden;
  background: var(--terminal);
}
.project-layout .sidebar {
  gap: 0;
}
.project-layout #tabs {
  margin: 0 -5px;
  padding: 0 5px;
}
.project-layout #tabs button {
  display: flex;
  margin: 3px 0;
  border: 0;
  padding: 13px 11px;
  white-space: normal;
}
.project-layout #tabs button[aria-selected='true'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.project-layout #tabs button:hover {
  background: var(--hover);
}
.project-layout #tabs button svg {
  margin-top: 3px;
}
.project-layout .list-label {
  letter-spacing: 0.8px;
  font-size: 9px;
  text-transform: uppercase;
  margin: 17px 10px 9px;
  color: var(--muted);
}
.project-layout .provider-menu {
  position: relative;
  margin-left: auto;
}
.project-layout .provider-menu summary,
.project-layout .chat-actions summary {
  list-style: none;
  padding: 7px;
  cursor: pointer;
  color: var(--muted);
}
.project-layout .provider-menu > div,
.project-layout .chat-actions > div {
  position: absolute;
  right: 0;
  left: auto;
  top: 34px;
  min-width: 190px;
  padding: 6px;
  z-index: 20;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  display: grid;
}
.project-layout .provider-menu > div {
  top: auto;
  bottom: 34px;
}
.project-layout .chat-actions {
  position: relative;
}
.project-layout .provider-menu button,
.project-layout .chat-actions button {
  border: 0;
  border-radius: 5px;
  text-align: left;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  padding: 10px;
}
.project-layout .chat-actions button:hover,
.project-layout .provider-menu button:hover {
  background: var(--hover);
}
.project-layout .file-root {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}
.project-layout #file-root {
  background: none;
  color: var(--muted);
  border: 0;
  padding: 5px 3px;
  font-size: 10px;
}
.project-layout #folder {
  color: var(--muted);
  font-size: 9px;
  padding: 0 3px;
  margin: 0 0 13px;
  overflow-wrap: anywhere;
}
.project-layout #files {
  flex: 1;
  overflow: auto;
  padding: 0;
  margin: 0;
}
.project-layout .file {
  border: 0;
  border-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  background: none;
  padding: 5px 3px;
  margin: 1px 0;
}
.project-layout .file:hover,
.project-layout .folder-row:hover {
  background: var(--hover);
}
.project-layout .file strong {
  font-size: 11px;
  font-weight: 400;
  width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.project-layout .file button {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 3px 4px;
  font-size: 9px;
}
.project-layout .file button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.project-layout .tree-children {
  border-color: var(--line);
  margin-left: 8px;
  padding-left: 9px;
}
.project-layout .folder-row {
  margin: 1px 0;
  padding: 4px 0;
}
.project-layout .folder-row button {
  background: none;
  border: 0;
  color: var(--ink);
  padding: 4px;
  font-size: 11px;
}
/* Pair selection colors from the theme; legacy styles use a pale blue fill. */
.project-layout #files [role='treeitem'][aria-selected='true'] > .folder-row .folder-toggle,
.project-layout #file-root[aria-pressed='true'] {
  color: var(--ink);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.project-layout #files .folder-toggle:focus-visible,
.project-layout #file-root:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.project-layout .folder-row button[data-zip] {
  font-size: 9px;
  color: var(--muted);
}
.project-layout #message {
  min-height: 0;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-layout .statusbar > span:first-child {
  min-width: 0;
}
.project-layout .statusbar > span:last-child {
  white-space: nowrap;
  margin-left: 15px;
}
.project-layout .empty {
  color: var(--muted);
  margin: 12vh auto;
  max-width: 430px;
  text-align: center;
}
.project-layout .empty h2 {
  color: var(--ink);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.8px;
}
.project-layout .project-meta svg {
  width: 13px;
  height: 13px;
}
.project-layout .file-panel .upload-button {
  cursor: pointer;
}
.card {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
input,
select,
textarea {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
dialog {
  max-height: 90dvh;
  overflow: auto;
}
.browser-desk {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 72px);
}
.browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: 11px;
  color: var(--muted);
  gap: 10px;
}
.browser-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-toolbar button,
.browser-toolbar select {
  font-size: 11px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.browser-toolbar label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
#screen {
  flex: 1;
  min-height: 0;
}
#screen iframe {
  display: block;
  border: 0;
  width: 100%;
  height: 100%;
}
.starting {
  text-align: center;
  margin: 16vh auto;
  color: var(--muted);
  padding: 24px;
}
.starting h2 {
  color: var(--ink);
  font-weight: 500;
}
.pause-panel {
  width: min(540px, calc(100vw - 40px));
  margin: 16vh auto;
  padding: 32px;
  text-align: center;
}
.pause-panel h1 {
  font-size: 28px;
}
.pause-panel p {
  color: var(--muted);
  line-height: 1.7;
  margin: 20px 0;
}
.pause-panel .button-primary {
  margin: 8px;
}
.pause-panel #message {
  line-height: 1.6;
  white-space: normal;
}
@media (max-width: 720px) {
  .project-layout .sidebar {
    display: flex;
    position: static;
    width: 180px;
    padding: 16px 8px;
    box-shadow: none;
  }
  .project-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-width: 590px;
  }
  .project-layout .main-panel {
    min-width: 0;
  }
  .appbar .appbar-end #pause span {
    display: none;
  }
  .browser-desk {
    height: calc(100dvh - 64px);
  }
  .browser-toolbar {
    flex-wrap: wrap;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #568266;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
kbd,
.keycap {
  font-family: inherit;
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  line-height: 18px;
  padding: 0 5px;
  white-space: nowrap;
  font-weight: 400;
}
.appbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  background: var(--paper);
  padding: 0 24px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 225px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.25px;
}
.brand small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.1px;
}
.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  transform: rotate(-5deg);
}
.brand-mark i {
  display: block;
  background: var(--accent);
  border-radius: 3px;
}
.brand-mark i:nth-child(2) {
  border-radius: 3px 10px 3px 3px;
  opacity: 0.6;
}
.brand-mark i:nth-child(3) {
  opacity: 0.32;
}
.app-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--shell);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 10px;
}
.app-switch a {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}
.app-switch a svg {
  width: 16px;
  height: 16px;
}
.app-switch a[aria-current='page'] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 4px #24332312;
}
.app-switch a:hover {
  color: var(--ink);
}
.appbar-end {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.concept-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-right: 6px;
}
.appbar-divider {
  height: 22px;
  width: 1px;
  background: var(--line);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9e5dc;
  color: #736554;
  font-size: 10px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-button {
  padding: 7px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--hover);
  color: var(--ink);
}
.icon-button.compact {
  width: 27px;
  height: 27px;
  padding: 5px;
}
.project-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: calc(100dvh - 72px);
  min-height: 560px;
}
.sidebar {
  padding: 26px 16px 14px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 0;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.2px;
  font-weight: 650;
  padding: 0 10px;
  margin: 0 0 16px;
  min-height: 12px;
}
#sidebar-close {
  display: none;
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  padding: 11px 12px;
  font-weight: 550;
  box-shadow: 0 2px 3px #223d2510;
}
.new-chat:hover {
  filter: brightness(1.09);
}
.new-chat .keycap {
  margin-left: auto;
  color: #d1dfd5;
  border-color: #ffffff30;
  line-height: 17px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 3px 20px;
  color: var(--muted);
}
.search svg {
  width: 15px;
  height: 15px;
}
.search input {
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  outline-offset: 4px;
}
.search input::placeholder {
  color: var(--muted);
}
.search kbd {
  font-size: 9px;
  padding: 0 3px;
  border-color: transparent;
}
.chat-list {
  min-height: 0;
  overflow: auto;
  flex: 1;
  margin: 0 -5px;
  padding: 0 5px;
}
.list-heading {
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  margin: 17px 10px 9px;
}
.list-heading:first-child {
  margin-top: 2px;
}
.chat-item {
  position: relative;
  width: 100%;
  display: flex;
  text-align: left;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 11px;
  border-radius: 7px;
  margin: 3px 0;
}
.chat-item:hover {
  background: var(--hover);
}
.chat-item[aria-current='true'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.chat-item[aria-current='true']::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: var(--accent);
  border-radius: 3px;
}
.chat-item > [data-icon] {
  margin-top: 2px;
  opacity: 0.6;
}
.chat-item svg {
  width: 16px;
  height: 16px;
}
.chat-copy {
  min-width: 0;
  flex: 1;
}
.chat-process {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--muted, #859184);
  align-self: center;
}
.chat-process[data-state='running'] {
  background: #37934e;
}
.chat-process[data-state='changing'] {
  background: #b98727;
}
.chat-process[data-state='unknown'] {
  background: #b98727;
}
.chat-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
  line-height: 18px;
}
.chat-copy small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 15px;
}
.chat-state {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #829887;
  margin-top: 8px;
}
.no-chats {
  padding: 15px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.sidebar-bottom {
  padding-top: 16px;
}
.history-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  border-radius: 7px;
  margin-bottom: 16px;
}
.history-toggle:hover,
.history-toggle[aria-expanded='true'] {
  background: var(--hover);
  color: var(--ink);
}
.history-toggle .count {
  margin-left: auto;
}
.history-chevron svg {
  width: 13px;
  height: 13px;
}
.account-card {
  border-top: 1px solid var(--line);
  padding: 19px 6px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.provider-mark {
  width: 30px;
  height: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
}
.account-card strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.account-card div > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.account-card button {
  margin-left: auto;
}
.sidebar-footnote {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 7px;
}
.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #76997c;
  border-radius: 50%;
  flex-shrink: 0;
}
.main-panel {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  min-width: 0;
  min-height: 0;
}
.project-heading {
  padding: 24px 32px 25px;
}
.heading-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  height: 24px;
}
.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}
.breadcrumb svg {
  width: 11px;
  height: 11px;
  opacity: 0.7;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.8px;
  font-weight: 550;
}
.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 10px;
}
#saved-label {
  display: flex;
  align-items: center;
  gap: 5px;
}
#saved-label svg {
  width: 13px;
  height: 13px;
}
.meta-separator {
  opacity: 0.5;
}
.subtle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.subtle-button svg {
  width: 15px;
  height: 15px;
}
.subtle-button:hover {
  background: var(--hover);
  color: var(--ink);
}
.menu-anchor {
  position: relative;
}
.popup-menu {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 12;
  width: 205px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 5px;
  border-radius: 9px;
}
.popup-menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 9px;
  width: 100%;
  text-align: left;
  font-size: 12px;
  border-radius: 5px;
}
.popup-menu button:hover {
  background: var(--hover);
}
.popup-menu svg {
  width: 15px;
  height: 15px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}
.danger-text {
  color: #a95045;
}
.session-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 49px;
  padding: 0 25px 0 32px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.session-tab {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 550;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}
.session-tab svg {
  width: 16px;
  height: 16px;
}
.session-tab .dot {
  margin: 0 6px 0 2px;
}
.toolbar-end {
  display: flex;
  gap: 10px;
  align-items: center;
}
.file-toggle[aria-expanded='true'] {
  background: var(--soft);
  color: var(--ink);
}
.count {
  font-size: 10px;
  min-width: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--soft);
  padding: 0 4px;
}
.file-toggle .count {
  background: var(--paper);
}
.work-area {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  min-height: 0;
  position: relative;
}
.work-area.files-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.session {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--terminal);
}
.terminal-context {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 25px 32px 20px;
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
}
.terminal-label {
  display: flex;
  gap: 6px;
  align-items: center;
  letter-spacing: 1px;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink);
}
.terminal-label svg {
  width: 14px;
  height: 14px;
}
.session-demo {
  font-size: 8px;
  letter-spacing: 0.7px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 4px;
  color: var(--muted);
}
#terminal {
  flex: 1;
  min-height: 0;
  min-width: 0;
  margin: 0 28px 0 32px;
  position: relative;
  overflow: hidden;
}
#terminal .xterm {
  height: 100%;
}
.xterm .xterm-viewport {
  background: var(--terminal);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.session-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  margin: 12px 28px 0 32px;
  border-top: 1px solid var(--line);
  min-height: 45px;
  flex-shrink: 0;
}
.session-bottom > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.session-bottom svg {
  width: 13px;
  height: 13px;
}
.session-bottom button {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.session-bottom button:hover {
  color: var(--accent);
}
.session-bottom kbd {
  font-size: 9px;
  border-color: transparent;
}
.file-panel {
  background: var(--shell);
  border-left: 1px solid var(--line);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 0;
}
.file-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 3px;
}
.file-heading strong {
  font-weight: 600;
  font-size: 12px;
}
.file-heading div > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.file-tools {
  display: flex;
  gap: 6px;
  margin: 20px 0 17px;
}
.upload-button {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.upload-button svg {
  width: 14px;
  height: 14px;
}
.upload-button:hover {
  background: var(--hover);
}
.file-tools .icon-button {
  border: 1px solid var(--line);
  background: var(--paper);
  width: 31px;
  height: 31px;
}
.file-tools .icon-button svg {
  width: 14px;
  height: 14px;
}
.file-tree {
  min-height: 0;
  overflow: auto;
  flex: 1;
  margin: 0 -6px;
  padding: 0 6px;
  scrollbar-width: thin;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 5px;
  height: 34px;
  padding: 0 3px;
}
.file-row:hover {
  background: var(--hover);
}
.file-main {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 8px;
  padding: 7px 3px;
  min-width: 0;
  flex: 1;
  font-size: 11px;
}
.file-main .filename {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.file-main svg {
  width: 15px;
  height: 15px;
}
.folder-row .file-main {
  font-weight: 550;
}
.file-chevron svg {
  width: 11px;
  height: 11px;
  color: var(--muted);
}
.file-row .file-extension {
  font-size: 8px;
  letter-spacing: 0.4px;
  color: var(--muted);
  padding: 0 4px;
}
.file-row .file-download {
  display: none;
  width: 23px;
  height: 23px;
}
.file-row:hover .file-download,
.file-row:focus-within .file-download {
  display: inline-flex;
}
.file-row:hover .file-extension,
.file-row:focus-within .file-extension {
  display: none;
}
.file-type-sheet {
  color: #70917a;
}
.file-type-doc {
  color: #818eae;
}
.file-type-image {
  color: #b79a71;
}
.file-type-code {
  color: #9583a4;
}
.drop-zone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px dashed #cfd6cc;
  border-radius: 7px;
  padding: 16px 8px;
  margin: 22px 0 18px;
  color: var(--muted);
}
.drop-zone strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}
.drop-zone > span:last-child {
  font-size: 9px;
}
.drop-zone > span:first-child {
  margin-bottom: 3px;
}
.drop-zone svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.3;
}
.drop-zone:hover,
.file-panel.dragging .drop-zone {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.file-panel-footer {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 9px;
  line-height: 1.65;
  color: var(--muted);
}
.file-panel-footer svg {
  width: 13px;
  height: 13px;
  margin-top: 2px;
}
.statusbar {
  height: 35px;
  padding: 0 24px 0 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  flex-shrink: 0;
}
.statusbar > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.statusbar button {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  padding: 0;
}
.statusbar kbd {
  height: 15px;
  line-height: 13px;
  font-size: 9px;
}
.status-separator {
  opacity: 0.4;
  margin: 0 6px;
}
.welcome {
  position: absolute;
  inset: 0 0 45px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  overflow: auto;
}
.welcome-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--accent);
  background: var(--shell);
  transform: rotate(-6deg);
  margin-bottom: 24px;
}
.welcome-mark svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.2;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.3px;
  font-weight: 600;
  color: var(--muted);
}
.welcome h2 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 12px 0 5px;
}
.welcome p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 8px 0 22px;
}
.welcome-suggestions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 290px;
  max-width: 100%;
  margin-bottom: 15px;
}
.welcome-suggestions button {
  display: flex;
  gap: 11px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
}
.welcome-suggestions button:hover {
  background: var(--soft);
}
.welcome-suggestions button [data-icon]:last-child {
  margin-left: auto;
  color: var(--muted);
}
.welcome-suggestions svg {
  width: 16px;
  height: 16px;
}
.welcome .subtle-button {
  font-size: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 120px #18291d30;
  padding: 28px;
  width: 460px;
  max-width: calc(100vw - 32px);
}
dialog::backdrop {
  background: #1f2c2940;
  backdrop-filter: blur(4px);
}
.session-bottom .history-text-button {
  margin-left: auto;
  padding: 3px 8px;
  font-size: inherit;
  white-space: nowrap;
}
dialog.terminal-history-dialog {
  width: min(1100px, calc(100vw - 32px));
  height: min(860px, calc(var(--projects-height, 100dvh) - 32px));
  max-height: calc(var(--projects-height, 100dvh) - 32px);
  padding: 20px;
  overflow: hidden;
}
dialog.terminal-history-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.terminal-history-dialog .dialog-heading {
  margin: 0;
}
.terminal-history-dialog p {
  margin: 0;
}
.terminal-history-dialog .history-chat-title {
  font-weight: 600;
}
.terminal-history-dialog .history-note,
.terminal-history-dialog .history-message {
  color: var(--muted);
  font-size: 13px;
}
.terminal-history-dialog .history-margin,
.lock-on-hide-setting,
#preferences .copy-margin-setting {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.terminal-history-dialog input[type='checkbox'],
.lock-on-hide-setting input,
#preferences .copy-margin-setting input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.lock-on-hide-note {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.terminal-history-dialog textarea {
  flex: 1;
  min-height: 80px;
  width: 100%;
  resize: none;
  overflow: auto;
  padding: 12px;
  font:
    14px/1.5 ui-monospace,
    'Cascadia Code',
    monospace;
  background: var(--paper);
  color: var(--ink);
  white-space: pre;
  tab-size: 4;
  -webkit-user-select: text;
  user-select: text;
}
.terminal-history-dialog .history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.terminal-history-dialog button {
  min-height: 40px;
}
dialog.personal-instructions-dialog {
  width: min(860px, calc(100vw - 32px));
  height: min(780px, calc(var(--projects-height, 100dvh) - 32px));
  max-height: calc(var(--projects-height, 100dvh) - 32px);
  padding: 20px;
  overflow: auto;
}
dialog.personal-instructions-dialog[open],
.personal-instructions-dialog form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.personal-instructions-dialog .dialog-heading,
.personal-instructions-dialog p {
  margin: 0;
}
.personal-instructions-dialog form,
.personal-instructions-dialog .instructions-field {
  flex: 1;
  min-height: 100px;
}
.personal-instructions-dialog .instructions-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.personal-instructions-dialog textarea {
  flex: 1;
  width: 100%;
  min-height: 100px;
  resize: none;
  overflow: auto;
  padding: 12px;
  font:
    15px/1.5 ui-monospace,
    'Cascadia Code',
    monospace;
  background: var(--paper);
  color: var(--ink);
  -webkit-user-select: text;
  user-select: text;
}
.personal-instructions-dialog .instructions-enabled {
  display: flex;
  align-items: center;
  gap: 8px;
}
.personal-instructions-dialog input[type='checkbox'] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.personal-instructions-dialog .instructions-note,
.personal-instructions-dialog .instructions-counter,
.personal-instructions-dialog .instructions-message {
  font-size: 13px;
  color: var(--muted);
}
.personal-instructions-dialog .instructions-error,
.personal-instructions-dialog .instructions-override {
  color: #b52b2b;
}
.personal-instructions-dialog .instructions-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.personal-instructions-dialog button,
.personal-instructions-dialog .instructions-upload {
  min-height: 44px;
}
.personal-instructions-dialog .instructions-upload {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.dialog-heading h2 {
  margin: 8px 0 0;
  font-size: 21px;
  font-weight: 550;
  letter-spacing: -0.5px;
}
.dialog-heading > .icon-button {
  align-self: flex-start;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  font-size: 10px;
  color: var(--muted);
}
.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}
.button-primary {
  background: var(--accent);
  color: white;
}
.button-primary:hover {
  filter: brightness(1.1);
}
.button-secondary {
  border: 1px solid var(--line);
  background: var(--paper);
}
.button-secondary:hover {
  background: var(--hover);
}
.button-primary svg,
.button-secondary svg {
  width: 14px;
  height: 14px;
}
.form-label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
}
.form-label input {
  border: 1px solid var(--line);
  padding: 11px 12px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--shell);
  width: 100%;
}
.dialog-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 15px 0 0;
}
.preview-dialog {
  width: 750px;
}
#preview-content {
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  max-height: 60vh;
  overflow: auto;
}
.document-preview {
  padding: 20px 25px;
  background: var(--paper);
  border: 1px solid var(--line);
  line-height: 1.9;
}
.document-preview h3 {
  font-size: 25px;
  font-weight: 550;
  letter-spacing: -0.5px;
  margin: 12px 0 6px;
}
.document-preview p {
  font-size: 12px;
  color: var(--muted);
}
.document-preview pre {
  font:
    11px/1.8 ui-monospace,
    monospace;
  white-space: pre-wrap;
}
.preview-image {
  max-width: 100%;
  max-height: 50vh;
  display: block;
  margin: auto;
}
.chart {
  width: 100%;
  height: auto;
  stroke: none;
  margin: 25px 0 5px;
}
.chart text {
  fill: var(--muted);
  font-family: inherit;
  font-size: 11px;
}
.chart .chart-bar {
  fill: #8fa98c;
}
.chart .chart-bar:last-of-type {
  fill: #365f49;
}
.chart .gridline {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-caption {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.settings-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
}
.settings-profile .avatar {
  width: 42px;
  height: 42px;
}
.settings-profile strong,
.settings-profile div > span {
  display: block;
}
.settings-profile div > span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.setting-row strong {
  font-size: 12px;
  font-weight: 500;
}
.setting-row div > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.setting-row select {
  background: var(--paper);
  color: var(--ink);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}
.setting-row button {
  font-size: 10px;
  white-space: nowrap;
}
.lock-dialog {
  text-align: center;
  padding: 40px;
}
.lock-symbol {
  display: flex;
  margin: 0 auto 25px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.lock-dialog > .eyebrow {
  display: block;
}
.lock-dialog h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
  font-weight: 500;
}
.lock-dialog > p {
  color: var(--muted);
  font-size: 12px;
}
.lock-dialog .form-label {
  text-align: left;
  margin: 26px 0 12px;
}
.lock-dialog .button-primary {
  width: 100%;
}
.lock-dialog input {
  text-align: center;
  font-size: 20px;
  letter-spacing: 9px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.toast {
  position: fixed;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.6;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  z-index: 25;
}
.workspace-view {
  max-width: 1120px;
  margin: 48px auto;
  padding: 0 30px;
}
.workspace-view h1 {
  margin: 12px 0;
  font-size: 30px;
}
.workspace-view > p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
}
.workspace-frame {
  margin: 30px 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.mock-browserbar {
  height: 42px;
  background: var(--soft);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 10px 0;
}
.mock-browser-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  align-self: stretch;
  border-radius: 7px 7px 0 0;
  font-size: 11px;
  background: var(--paper);
  width: 210px;
}
.mock-browser-tab [data-icon]:last-child {
  margin-left: auto;
}
.mock-browserbar svg {
  width: 13px;
  height: 13px;
}
.mock-address {
  height: 45px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.mock-address svg {
  width: 15px;
  height: 15px;
}
.mock-url {
  flex: 1;
  background: var(--shell);
  border-radius: 20px;
  padding: 7px 15px;
  font-size: 11px;
}
.mock-browser-page {
  height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.brand-mark.large {
  width: 42px;
  height: 42px;
}
.mock-browser-page p {
  font-size: 25px;
  color: var(--ink);
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}
.mock-browser-page > span:last-child {
  font-size: 11px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent);
}
.back-link svg {
  width: 15px;
  height: 15px;
}
.mobile-list {
  display: none;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --shell: #1c211e;
  --paper: #232925;
  --ink: #e0e6dc;
  --muted: #939f92;
  --line: #343d35;
  --soft: #2b342d;
  --accent: #88af8d;
  --accent-soft: #324237;
  --hover: #303a32;
  --terminal: #232925;
  --terminal-ink: #d0dbcb;
  --shadow: 0 16px 50px #0004;
}
[data-theme='dark'] .new-chat,
[data-theme='dark'] .button-primary {
  color: #17251c;
}
[data-theme='dark'] .avatar {
  background: #49463c;
  color: #e5d7ba;
}
[data-theme='dark'] .drop-zone {
  border-color: #485446;
}
@media (min-width: 1700px) {
  .project-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .brand {
    width: 245px;
  }
  .work-area {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  #terminal {
    margin-right: 48px;
    margin-left: 48px;
  }
  .terminal-context {
    padding-left: 48px;
    padding-right: 48px;
  }
  .project-heading {
    padding-left: 40px;
  }
}
@media (max-width: 1200px) {
  .project-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .brand {
    width: 195px;
  }
  .work-area {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .sidebar {
    padding-right: 12px;
    padding-left: 12px;
  }
  .project-heading {
    padding: 22px 24px;
  }
  .session-toolbar {
    padding-left: 24px;
    padding-right: 18px;
  }
  .terminal-context {
    padding-left: 24px;
    padding-right: 20px;
  }
  #terminal {
    margin-left: 24px;
    margin-right: 18px;
  }
  .session-bottom {
    margin-left: 24px;
    margin-right: 18px;
  }
  .file-panel {
    padding: 22px 12px 0;
  }
  .project-meta {
    font-size: 10px;
  }
  #saved-label,
  .meta-separator {
    display: none;
  }
  .concept-label {
    display: none;
  }
}
@media (max-width: 1000px) {
  .work-area {
    grid-template-columns: minmax(0, 1fr);
  }
  .file-panel {
    position: absolute;
    z-index: 5;
    right: 0;
    top: 0;
    bottom: 0;
    width: 284px;
    box-shadow: -10px 0 35px #13231812;
  }
  .project-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .brand {
    width: 185px;
  }
  .appbar {
    gap: 15px;
    padding: 0 18px;
  }
  .appbar-end {
    gap: 6px;
  }
  .statusbar > span:last-child {
    font-size: 0;
  }
  .status-separator {
    display: none;
  }
}
@media (max-width: 720px) {
  .appbar {
    height: 64px;
    padding: 0 14px;
    gap: 12px;
  }
  .brand {
    width: auto;
  }
  .brand > span:last-child {
    display: none;
  }
  .brand-mark {
    width: 25px;
    height: 25px;
  }
  .app-switch {
    gap: 0;
    padding: 3px;
  }
  .app-switch a {
    padding: 8px 10px;
    font-size: 11px;
    gap: 6px;
  }
  .app-switch a svg {
    width: 14px;
    height: 14px;
  }
  .appbar-divider,
  #theme {
    display: none;
  }
  .appbar-end {
    gap: 4px;
  }
  .avatar {
    width: 28px;
    height: 28px;
    font-size: 9px;
  }
  .project-layout {
    display: block;
    height: calc(100dvh - 64px);
    min-height: 520px;
  }
  .main-panel {
    height: 100%;
  }
  .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 260px;
    background: var(--shell);
    z-index: 20;
    box-shadow: 12px 0 55px #182b2733;
  }
  .sidebar.open {
    display: flex;
  }
  #sidebar-close {
    display: flex;
  }
  .sidebar-heading {
    margin-bottom: 11px;
  }
  .mobile-list {
    display: flex;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-right: 4px;
  }
  .mobile-list svg {
    width: 17px;
    height: 17px;
  }
  .project-heading {
    padding: 16px 20px 18px;
  }
  .heading-top {
    margin-bottom: 13px;
  }
  .breadcrumb {
    gap: 6px;
    font-size: 9px;
  }
  .heading-actions {
    gap: 0;
  }
  #archive-chat > span:last-child {
    display: none;
  }
  h1 {
    font-size: 23px;
  }
  .project-meta {
    font-size: 10px;
  }
  .session-toolbar {
    padding: 0 16px 0 20px;
    height: 43px;
  }
  .toolbar-end {
    gap: 5px;
  }
  #copy > span:last-child {
    display: none;
  }
  .terminal-context {
    padding: 19px 20px;
  }
  #terminal {
    margin-left: 20px;
    margin-right: 14px;
  }
  .session-bottom {
    margin-left: 20px;
    margin-right: 14px;
    font-size: 9px;
    gap: 6px;
  }
  .session-bottom kbd {
    display: none;
  }
  .statusbar {
    padding: 0 16px 0 20px;
  }
  .welcome {
    padding: 20px;
  }
  .welcome h2 {
    font-size: 25px;
  }
  .welcome-mark {
    width: 37px;
    height: 37px;
    margin-bottom: 16px;
  }
  .welcome-suggestions {
    width: 260px;
  }
  .welcome-suggestions button {
    padding: 9px 11px;
  }
  .welcome p {
    margin-bottom: 16px;
  }
  .workspace-view {
    padding: 0 20px;
    margin-top: 30px;
  }
  .workspace-view h1 {
    font-size: 25px;
  }
  .workspace-frame {
    margin-top: 25px;
  }
  .mock-browser-page {
    height: 250px;
  }
  dialog {
    padding: 22px;
  }
  #preview-content {
    padding: 10px;
  }
  .document-preview {
    padding: 15px;
  }
  .preview-dialog .dialog-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background 0.14s ease,
      color 0.14s ease;
  }
  dialog[open] {
    animation: appear 0.15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Layout overrides for the live terminal and the existing file handlers. */
.project-layout #terminal {
  padding: 0;
}
.project-layout aside {
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
}
.project-layout .sidebar {
  border-left: 0;
  overflow: hidden;
  background: var(--shell);
}
.project-layout #file-panel {
  border-right: 0;
  overflow: hidden;
}
.project-layout .account-card {
  gap: 9px;
}
.project-layout .file-root {
  display: block;
}
.project-layout .file-root button {
  width: 100%;
  text-align: left;
}
.project-layout #files .file button {
  min-height: 25px;
}
.card button[type='submit'] {
  background: var(--accent);
}
#preview {
  width: min(850px, 90vw);
}
#preview-body img {
  max-width: 100%;
}
#preview-body iframe {
  max-width: 100%;
}
.browser-desk dialog {
  overflow: auto;
}
.browser-desk .file {
  border-color: var(--line);
}
@media (max-width: 1150px) {
  .project-layout #file-panel {
    right: 0;
    top: 0;
    bottom: 0;
    width: 284px;
  }
}
@media (max-width: 720px) {
  .project-layout {
    display: block;
    min-width: 0;
  }
  .project-layout .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 260px;
    padding: 20px 14px;
    z-index: 20;
    box-shadow: 12px 0 55px #182b2733;
    background: var(--shell);
  }
  .project-layout .sidebar.open {
    display: flex;
  }
  .project-layout .sidebar-heading {
    cursor: pointer;
  }
  .project-layout .project-heading {
    padding: 16px 20px 18px;
  }
  .project-layout .heading-actions {
    gap: 0;
  }
  .project-layout .project-meta {
    font-size: 9px;
  }
  .project-layout .statusbar > span:last-child {
    display: none;
  }
  .appbar .appbar-end {
    gap: 0;
  }
  .appbar .appbar-end #theme {
    display: none;
  }
  .appbar .appbar-end #pause {
    padding: 4px;
  }
  .appbar .appbar-end #pause span {
    display: none;
  }
  .appbar .avatar {
    display: none;
  }
}

/* Compact Projects: one breadcrumb row, the remaining height belongs to Codex. */
.project-layout .project-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.project-toolbar .breadcrumb {
  min-width: 0;
  flex: 1;
  font-size: 12px;
}
.project-toolbar .breadcrumb > span {
  flex-shrink: 0;
}
.project-toolbar #chat-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  color: var(--ink);
}
.project-tools,
.font-control {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.font-control {
  margin-right: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  gap: 0;
}
.font-control button {
  border: 0;
  padding: 5px;
  min-width: 27px;
  font-size: 11px;
  color: var(--muted);
}
.font-control #font-reset {
  font-variant-numeric: tabular-nums;
}
.project-layout #terminal {
  margin: 12px 16px 0;
}
.project-layout .session-bottom {
  margin: 4px 16px 0;
  min-height: 28px;
}
.project-layout .statusbar {
  height: 26px;
  padding: 0 16px;
}
.project-layout.sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.project-layout .sidebar {
  padding-top: 12px;
}
.project-layout .sidebar-heading {
  padding: 0 0 0 10px;
  margin-bottom: 10px;
}
.project-layout .chat-row {
  display: flex;
  align-items: center;
  border-radius: 7px;
  margin: 3px 0;
}
.project-layout .chat-row:has([aria-selected='true']) {
  background: var(--accent-soft);
}
.project-layout .chat-row:hover {
  background: var(--hover);
}
.project-layout #tabs .chat-item {
  flex: 1;
  width: 0;
  min-width: 0;
  margin: 0;
  padding: 10px 7px;
  background: transparent;
}
.project-layout #tabs .chat-menu-toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
  margin: 0 3px 0 0;
}
.project-layout #tabs .chat-menu-toggle svg {
  margin: 0;
}
.project-layout .account-card > div:first-of-type {
  min-width: 0;
  flex: 1;
}
.project-layout #provider-menu-button {
  flex-shrink: 0;
}
.project-layout .project-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 210px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--paper);
  color: var(--ink);
}
.project-layout .project-menu:popover-open {
  display: grid;
}
.project-layout .project-menu button,
.project-layout #tabs .project-menu button {
  width: 100%;
  display: block;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  color: var(--ink);
  font-size: 12px;
}
.project-layout .project-menu button:hover {
  background: var(--hover);
}
.project-layout .project-menu button.danger-text {
  color: #b3584b;
}
.project-menu .menu-note {
  margin: 0 0 4px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .project-layout .project-toolbar {
    padding: 6px 8px;
    gap: 5px;
    min-height: 46px;
  }
  .project-toolbar .breadcrumb {
    gap: 5px;
    font-size: 10px;
  }
  .project-toolbar #chat-title {
    font-size: 11px;
  }
  .project-tools {
    gap: 0;
  }
  .project-tools .icon-button {
    width: 28px;
    padding: 5px;
  }
  .font-control {
    margin: 0 3px 0 0;
  }
  .font-control button {
    min-width: 23px;
    padding: 5px 3px;
  }
  .project-layout #terminal {
    margin: 8px 8px 0;
  }
  .project-layout .session-bottom {
    margin-left: 8px;
    margin-right: 8px;
  }
}

.project-layout .terminal-wrap {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.project-layout .terminal-wrap #terminal {
  margin-right: 3px;
}
.project-layout .terminal-scrollbar {
  flex: 0 0 16px;
  width: 16px;
  overflow-y: scroll;
  overflow-x: hidden;
  margin: 12px 3px 0 0;
  scrollbar-width: auto;
  scrollbar-color: #89998c var(--soft);
  background: var(--soft);
  border-radius: 6px;
}
.terminal-scrollbar > div {
  width: 1px;
  pointer-events: none;
}
.terminal-scrollbar::-webkit-scrollbar {
  width: 14px;
}
.terminal-scrollbar::-webkit-scrollbar-track {
  background: var(--soft);
  border-radius: 6px;
}
.terminal-scrollbar::-webkit-scrollbar-thumb {
  background: #89998c;
  border: 3px solid var(--soft);
  border-radius: 7px;
}
.terminal-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #627866;
}
.project-layout .terminal-latest {
  position: absolute;
  right: 30px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--accent);
  box-shadow: var(--shadow);
  font-size: 11px;
  z-index: 12;
}
/* tmux, not xterm's alternate-screen buffer, owns the displayed history. */
.project-layout .xterm-scrollable-element > .scrollbar {
  display: none !important;
}

/* Keep the live PTY at its original size underneath the stable reader. */
.session.reading-terminal > :not(.terminal-reader) {
  visibility: hidden;
}
.terminal-reader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--terminal);
  color: var(--terminal-ink);
}
.terminal-reader[hidden] {
  display: none;
}
.reader-toolbar,
.reader-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 6px 12px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--paper);
}
.reader-toolbar {
  border-bottom: 1px solid var(--line);
}
.reader-toolbar strong,
.reader-footer [role='status'] {
  margin-right: auto;
}
.reader-toolbar [data-new] {
  font-size: 12px;
  color: var(--accent);
}
.terminal-reader button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
}
.reader-toolbar [data-live] {
  background: var(--accent);
  color: var(--paper);
}
.reader-footer {
  border-top: 1px solid var(--line);
}
.reader-footer [role='status'] {
  color: var(--muted);
  font-size: 12px;
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}
.project-layout .terminal-reader textarea {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  outline-offset: -2px;
  resize: none;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
  user-select: text;
  -webkit-user-select: text;
  background: var(--terminal);
  color: var(--terminal-ink);
  -webkit-text-fill-color: var(--terminal-ink);
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: var(--reader-font-size, 14px);
  line-height: 1.5;
  tab-size: 4;
  scrollbar-width: auto;
  scrollbar-color: #89998c var(--soft);
}

.codex-update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 6px 16px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.codex-update[hidden] {
  display: none;
}
.codex-update button {
  padding: 5px 10px;
  font-size: 12px;
}
@media (pointer: coarse) {
  .codex-update button {
    min-height: 44px;
  }
}

.terminal-transcript-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  flex: 0 0 auto;
  padding: 4px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

/* Contextual controls for native Codex questions; no permanent chrome. */
.terminal-question-tools {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 7px 12px;
  background: var(--accent-soft);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.terminal-question-tools[hidden] {
  display: none;
}
.question-caption {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.question-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45ch;
}
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.terminal-question-tools button {
  min-height: 36px;
  min-width: 36px;
  padding: 6px 9px;
  font-size: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}
.terminal-question-tools button[data-action='confirm'] {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}
.terminal-question-tools button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.project-layout .question-active .session-bottom,
.project-layout .question-active .tablet-terminal-tools {
  display: none;
}
.project-layout .session.question-expanded {
  position: fixed;
  inset: calc(var(--projects-top, 0px) + var(--question-header, 72px)) 0 auto;
  height: calc(var(--projects-height, 100dvh) - var(--question-header, 72px));
  width: auto;
  z-index: 80;
  background: var(--paper);
  border-radius: 0;
}
.question-text-dialog {
  width: min(600px, calc(100vw - 24px));
  max-height: calc(var(--projects-height, 100dvh) - 24px);
  overflow: auto;
}
.question-text-dialog textarea {
  display: block;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  color: var(--ink);
  background: var(--paper);
}
.question-text-dialog p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.question-text-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.projects-tablet .terminal-question-tools button,
.projects-tablet .question-text-dialog button {
  min-height: 44px;
  min-width: 44px;
}
.terminal-transcript-tools strong {
  margin-right: auto;
}
.terminal-transcript-tools button {
  padding: 5px 8px;
  font-size: 12px;
}
.projects-tablet .terminal-transcript-tools button {
  min-height: 44px;
  min-width: 44px;
}
[data-transcript][aria-pressed='true'] {
  color: var(--accent);
  font-weight: 600;
}

/* Personal skill library: the list scrolls inside the dialog on tablets. */
dialog.storage-dialog {
  width: min(700px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  padding: 20px;
  overflow: hidden;
}
dialog.storage-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.storage-dialog .dialog-heading,
.storage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.storage-dialog h2,
.storage-dialog p {
  margin: 0;
}
.storage-dialog .dialog-heading {
  flex-shrink: 0;
}
.storage-body {
  overflow: auto;
  min-height: 0;
}
.storage-body > * + * {
  margin-top: 16px;
}
.storage-row {
  padding: 8px 0;
}
.storage-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.storage-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}
.storage-breakdown dt {
  font-size: 12px;
  font-weight: 400;
}
.storage-breakdown dd {
  margin: 4px 0 0;
  font-weight: 600;
  white-space: nowrap;
}
.storage-summary p + p,
.storage-shared p + p {
  margin-top: 6px;
}
.storage-current {
  font-weight: 600;
}
.storage-actions {
  flex-wrap: wrap;
  flex-shrink: 0;
}
.storage-actions button {
  min-height: 44px;
}
.storage-warning {
  color: var(--danger, #c93434);
}
dialog.skills-dialog {
  width: min(780px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(850px, calc(100dvh - 24px));
  box-sizing: border-box;
  padding: 22px;
  overflow: hidden;
}
dialog.skills-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skills-dialog .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.skills-dialog h2,
.skills-dialog p {
  margin: 0;
}
.skills-toolbar,
.skill-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.skills-dialog button,
.skills-dialog .upload-button,
.skill-enabled {
  min-height: 44px;
}
.skills-dialog .upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.skills-dialog .upload-button:has(input:disabled) {
  opacity: 0.5;
  cursor: wait;
}
.skills-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 12px;
}
.skill-card {
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 10px;
  padding: 14px;
  min-width: 0;
}
.skill-card p,
.skill-card strong {
  overflow-wrap: anywhere;
}
.skill-card p,
.skill-card small,
.skill-actions {
  margin-top: 9px;
}
.skill-card small {
  display: block;
  opacity: 0.75;
}
.skill-enabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.skill-enabled input {
  width: 18px;
  height: 18px;
}
.skills-dialog .skills-warning,
.skills-dialog .skill-delete {
  color: #d13e3e;
}
.skills-limits,
.skills-restart {
  font-size: 0.82rem;
  opacity: 0.8;
}
.skills-message {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  dialog.skills-dialog {
    padding: 14px;
    gap: 9px;
  }
  .skills-restart {
    max-height: 65px;
    overflow-y: auto;
  }
  .skill-actions {
    gap: 6px;
  }
}

/* Fork estimates stay beside both the copy switch and the action button. */
dialog.fork-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.fork-dialog .fork-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.fork-dialog .fork-copy input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.fork-dialog .fork-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.fork-dialog button {
  min-height: 44px;
}
.fork-dialog [data-message] {
  font-size: 13px;
}
.fork-dialog [data-background] {
  margin-top: 12px;
}

/* Projects settings: one topic at a time, with a stable header and footer. */
#preferences {
  width: min(640px, calc(100vw - 32px));
  height: min(620px, calc(var(--projects-height, 100dvh) - 32px));
  max-height: calc(var(--projects-height, 100dvh) - 32px);
  padding: 0;
  overflow: hidden;
}
#preferences[open] {
  display: flex;
  flex-direction: column;
}
#preferences .preferences-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
  flex-shrink: 0;
}
#preferences h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
#preferences .preferences-tabs {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
#preferences .preferences-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 2px;
  min-height: 44px;
  font-size: 13px;
  color: var(--muted);
}
#preferences .preferences-tabs [aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}
#preferences button:focus-visible,
#preferences a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#preferences #prefs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  min-height: 0;
  flex: 1;
}
#preferences .preferences-body {
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1;
}
#preferences .preferences-panel {
  padding: 24px;
}
#preferences h3 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
#preferences h3.preferences-section-title {
  margin-top: 28px;
}
#preferences .preferences-connection > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}
#preferences .preferences-connection span {
  color: var(--muted);
}
#preferences .preferences-connection p {
  margin: 0;
  overflow-wrap: anywhere;
}
#preferences .codex-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
#preferences .codex-account-actions button,
#preferences .preferences-footer button {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 13px;
}
#preferences .preferences-actions {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
#preferences .preferences-action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 70px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
#preferences .preferences-action:last-child {
  border-bottom: 0;
}
#preferences .preferences-action:hover {
  background: var(--hover);
}
#preferences .preferences-action:focus-visible {
  outline-offset: -3px;
}
#preferences .preferences-action svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}
#preferences .preferences-action svg:last-child {
  margin-left: auto;
  width: 15px;
}
#preferences .preferences-action strong,
#preferences .preferences-action small {
  display: block;
  line-height: 1.45;
}
#preferences .preferences-action strong {
  font-weight: 500;
  font-size: 13px;
}
#preferences .preferences-action small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
#preferences .preferences-check,
#preferences .lock-on-hide-setting {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}
#preferences input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
#preferences .preferences-help,
#preferences .lock-on-hide-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
#preferences .preferences-check + .preferences-help,
#preferences .lock-on-hide-note {
  margin-left: 28px;
}
#preferences .preferences-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  margin-bottom: 20px;
}
#preferences .preferences-field input {
  width: 88px;
  min-height: 42px;
}
#preferences .preferences-field select {
  max-width: 58%;
  min-height: 42px;
}
#preferences .preferences-emergency {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
#preferences .preferences-emergency h3 {
  margin-bottom: 0;
}
#preferences .preferences-emergency .preferences-field {
  margin-top: 16px;
  margin-bottom: 14px;
}
#preferences #kill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  text-underline-offset: 3px;
}
#preferences #kill-link svg {
  width: 14px;
  height: 14px;
}
#preferences .preferences-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  #preferences .preferences-heading,
  #preferences .preferences-panel,
  #preferences .preferences-footer {
    padding: 16px;
  }
  #preferences .preferences-tabs {
    padding: 0 16px;
    gap: 22px;
  }
  #preferences .preferences-connection > div {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  #preferences .preferences-action {
    padding: 12px;
    gap: 10px;
  }
}

/* Conversation renderer is opt-in per chat; terminal layout stays unchanged. */
.chat-kind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}
.chat-kind legend {
  margin-bottom: 8px;
  color: var(--muted);
}
.chat-kind label {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: var(--paper);
}
.chat-kind label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.chat-kind span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
.chat-kind-icon {
  display: inline-block;
  width: 24px;
  font-family: ui-monospace, monospace;
  opacity: 0.7;
}
.chat-kind-icon svg {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}
.conversation-mode > .terminal-wrap,
.conversation-mode > .session-bottom {
  display: none;
}
.conversation {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  height: 100%;
  width: 100%;
  background: var(--paper);
  color: var(--ink);
}
.conversation *,
.chat-kind * {
  box-sizing: border-box;
}
.conversation [hidden] {
  display: none !important;
}
.conversation-heading {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.conversation-heading > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.conversation select {
  max-width: 230px;
  padding: 7px 24px 7px 9px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
}
.chat-type-label,
.conversation-state {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.conversation-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 22px max(20px, calc((100% - 800px) / 2));
  scroll-behavior: auto;
}
.conversation-welcome {
  margin: 12vh auto 0;
  text-align: center;
  color: var(--muted);
}
.conversation-welcome h2 {
  color: var(--ink);
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 500;
}
.conversation-items {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.conversation-item {
  min-width: 0;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.conversation-user {
  align-self: flex-end;
  max-width: 88%;
  padding: 12px 18px;
  border-radius: 20px 20px 4px 20px;
  background: var(--soft);
  white-space: pre-wrap;
}
.conversation-user p {
  margin: 0;
}
.conversation-assistant {
  width: 100%;
}
.conversation-markdown > :first-child {
  margin-top: 0;
}
.conversation-markdown h1 {
  font-size: 1.5em;
}
.conversation-markdown h2 {
  font-size: 1.3em;
}
.conversation-markdown h3 {
  font-size: 1.1em;
}
.conversation-markdown p {
  margin: 0.6em 0;
}
.conversation-markdown a {
  color: var(--accent);
  text-decoration: underline;
}
.conversation-markdown blockquote {
  border-left: 3px solid var(--line);
  margin: 14px 0;
  padding-left: 16px;
  color: var(--muted);
}
.conversation-markdown table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
  margin: 16px 0;
}
.conversation-markdown th,
.conversation-markdown td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.conversation-markdown pre,
.conversation-tool pre {
  position: relative;
  overflow: auto;
  max-height: 480px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  white-space: pre;
  font:
    13px/1.5 ui-monospace,
    monospace;
}
.conversation-markdown pre {
  padding-top: 42px;
}
.conversation-markdown code {
  font-family: ui-monospace, monospace;
}
.conversation .code-copy {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 3px 7px;
  font: 11px/1.5 inherit;
  background: var(--paper);
}
.conversation .message-copy {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 0;
}
.conversation-tool {
  color: var(--muted);
  font-size: 12px;
}
.conversation-tool details {
  border-left: 2px solid var(--line);
  padding-left: 12px;
}
.conversation-tool summary {
  cursor: pointer;
}
.conversation-latest {
  position: absolute;
  right: 24px;
  bottom: 150px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.conversation-composer {
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 3px 18px #00000008;
  padding: 12px;
  margin: 8px auto 12px;
  width: min(800px, calc(100% - 32px));
}
.conversation textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  max-height: 180px;
  padding: 8px;
  resize: none;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 inherit;
  outline-offset: 2px;
}
.conversation-composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.conversation-attach {
  position: relative;
  flex-shrink: 0;
}
.conversation-attach-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 5;
  width: 268px;
  max-width: calc(100vw - 56px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.conversation-attach-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}
.conversation-attach-menu button:hover,
.conversation-attach-menu button:focus-visible {
  background: var(--soft);
}
.conversation-attach-menu [hidden] {
  display: none;
}
.conversation-hint {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
}
.conversation-send {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.conversation-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.conversation-skills,
.conversation-message-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.conversation-skills button,
.conversation-message-skills span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px 10px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.conversation-skill-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: 70dvh;
  padding: 20px;
  color: var(--ink);
  background: var(--paper);
}
.conversation-skill-dialog > p {
  color: var(--muted);
  font-size: 13px;
}
.conversation-skill-dialog input {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
  background: var(--paper);
  color: var(--ink);
}
.conversation-skill-list {
  max-height: 35dvh;
  overflow: auto;
}
.conversation-skill-suggestions {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 6;
  max-height: min(280px, 35dvh);
  overflow: auto;
  padding: 6px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.conversation-skill-suggestions > p {
  padding: 8px;
  font-size: 13px;
}
.conversation-skill-option {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px;
  border: 0;
  text-align: left;
  background: transparent;
  color: var(--ink);
}
.conversation-skill-option strong,
.conversation-skill-option span {
  display: block;
  overflow-wrap: anywhere;
}
.conversation-skill-option span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.conversation-skill-option:hover,
.conversation-skill-option:focus-visible,
.conversation-skill-option[aria-selected='true'] {
  background: var(--soft);
}
.conversation-attachments button {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  background: var(--soft);
}
.conversation-questions {
  max-height: 38%;
  overflow: auto;
  padding: 12px max(16px, calc((100% - 800px) / 2));
  border-top: 1px solid var(--line);
  background: var(--soft);
}
.conversation-questions form {
  display: block;
  margin-bottom: 12px;
}
.conversation-questions fieldset {
  border: 0;
  padding: 8px 0;
}
.conversation-questions legend {
  padding: 8px 0 0;
  font-weight: 500;
}
.conversation-questions button {
  margin: 4px 6px 4px 0;
}
.conversation-questions pre {
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
}
.conversation-error {
  margin: 0;
  padding: 8px 16px;
  color: var(--ink);
  background: var(--accent-soft);
  flex-shrink: 0;
  font-size: 12px;
}
.conversation .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 800px), (pointer: coarse) {
  .conversation-heading {
    padding: 8px 12px;
  }
  .conversation select {
    max-width: 190px;
    min-height: 40px;
  }
  .conversation-messages {
    padding: 16px;
  }
  .conversation-composer {
    width: calc(100% - 20px);
    margin: 6px 10px 10px;
  }
  .conversation button {
    min-height: 40px;
  }
  .conversation .message-copy {
    min-height: 32px;
  }
  .conversation-state {
    display: none;
  }
}
.conversation-model-used {
  color: var(--muted);
  font-size: 10px;
  margin-left: 12px;
}
.conversation textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}
