.folder-desk {
  --folder-neutral: #efeee9;
  min-width: 0;
  background: var(--folder-neutral);
  padding: 16px clamp(10px, 1.35vw, 24px) 14px;
  container-type: inline-size;
}
.folder-boards {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(310px, 1fr);
  gap: 12px;
  height: calc(100dvh - 30px);
}
.folder-desk[data-files="off"] .folder-boards { grid-template-columns: minmax(0, 1fr); }
.folder-shell { min-width: 0; min-height: 0; display: grid; grid-template-rows: 39px minmax(0, 1fr); --folder-edge: #b8c9b6; --folder-ink: #264436; --folder-surface: #dce7db; }
.folder-desk[data-kind="job"] .work-folder { --folder-edge: #d1bac0; --folder-ink: #56343d; --folder-surface: #eadcdf; }
.folder-desk[data-kind="schedule"] .work-folder { --folder-edge: #c9bdd5; --folder-ink: #463753; --folder-surface: #e7dfed; }
.folder-desk[data-kind="project"] .work-folder { --folder-edge: #d3c29d; --folder-ink: #534124; --folder-surface: #efe4cd; }
.files-folder { --folder-edge: #b5c9d6; --folder-ink: #294b60; --folder-surface: #dce9f0; }
.folder-label {
  position: relative; isolation: isolate; justify-self: start; min-width: 138px; height: 40px;
  padding: 0 36px 0 19px; text-align: left; border: 0; color: var(--folder-ink);
  background: transparent; font-size: 14px; font-weight: 700;
}
.folder-label::before {
  position: absolute; z-index: -1; content: ""; inset: 0 5px 0 0;
  background: var(--folder-surface);
  clip-path: polygon(0 14%, 4px 5%, 9px 0, calc(100% - 24px) 0, calc(100% - 17px) 5%, calc(100% - 13px) 14%, 100% 100%, 0 100%);
}
.folder-label:focus-visible { outline: 2px solid var(--folder-ink); outline-offset: -4px; border-radius: 9px; }
.folder-surface {
  min-width: 0; min-height: 0; overflow: auto; background: var(--folder-surface);
  border-radius: 0 11px 11px 11px; border: 1px solid var(--folder-edge); border-top: 0;
}
.work-folder .main { container-type: inline-size; }
.work-folder .new-view, .work-folder .job-view { padding: clamp(20px, 5cqw, 44px); }
.work-folder .new-view { padding-top: clamp(33px, 7cqw, 76px); }
.work-folder .welcome { margin-bottom: 22px; }
.work-folder .welcome h1 { margin-top: 0; font-size: clamp(32px, 7cqw, 49px); color: var(--folder-ink); }
.work-folder .job-heading h1 { color: var(--folder-ink); }
.work-folder .composer-actions { flex-wrap: wrap; gap: 7px; padding: 10px 14px; }
.work-folder .run-buttons { flex-wrap: wrap; margin-left: auto; justify-content: flex-end; align-items: center; }
.work-folder #pick-new-files { margin-right: auto; }
.work-folder .followup-form { flex-wrap: wrap; }
.work-folder .followup-form textarea { flex-basis: 100%; }
.work-folder .reply-actions { margin-left: auto; }
.work-folder .starter-row button { background: #ffffff3c; border-color: var(--folder-edge); }
.work-folder .job-instructions { border-color: var(--folder-edge); }
.work-folder .delivery-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.work-folder .delivery-actions a { text-decoration: none; }
.work-folder .delivery-actions .secondary { border-color: var(--folder-edge); color: var(--folder-ink); background: #ffffff52; }
.files-pane { display: flex; flex-direction: column; color: #273945; padding: clamp(12px, 2.6cqw, 22px); }
.files-toolbar, .drive-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.drive-button {
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--folder-ink);
  padding: 8px 10px; border: 1px solid #aabfcd; border-radius: 7px; background: #f4fafdb0;
  text-decoration: none; display: inline-block; white-space: nowrap;
}
.drive-button:hover { background: #fff; }
.upload-button, .drive-add { background: #36586e; color: #fff; border-color: #36586e; }
.upload-button:hover, .drive-add:hover { background: #2a4a60; }
.upload-button span { margin-left: 3px; }
.quiet-button { background: none; border: 0; color: var(--folder-ink,#294b60); font: inherit; }
.quiet-button:hover { text-decoration: underline; }
#drive-trash-view { margin-left: auto; padding-right: 3px; }
.upload-menu { position: relative; }
.upload-options {
  position: absolute; inset: calc(100% + 5px) auto auto 0; min-width: 121px;
  padding: 4px; border-radius: 8px; border: 1px solid #b1c4d1; background: #f5f9fb;
  z-index: 4; box-shadow: 0 5px 15px #18304022;
}
.upload-options button { display: block; text-align: left; width: 100%; border: 0; padding: 8px; background: transparent; border-radius: 4px; color: #294b60; }
.upload-options button:hover, .upload-options button:focus-visible { background: #e0ebf2; }
.files-search-box { margin: 15px 0 9px; }
.files-search-box input {
  border: 1px solid #b3c7d4; border-radius: 8px; min-width: 0; width: 100%; height: 34px; padding: 5px 11px;
  color: #273945; background: #f6fafbd9; font-size: 12px;
}
.drive-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; margin: 1px 0 7px; font-size: 12px; }
.drive-path button { padding: 3px 0; overflow-wrap: anywhere; }
.drive-path span[aria-current] { color: #234256; font-weight: 680; overflow-wrap: anywhere; }
.drive-path .path-separator { color: #647f90; }
.drive-selection { background: #c5d8e4; padding: 8px; border-radius: 8px; margin: 0 0 9px; }
.drive-selection > span { color: #234256; font-size: 11px; padding: 0 3px; }
.drive-selection .drive-button { font-size: 11px; padding: 6px 8px; }
.drive-selection #drive-deselect { margin-left: auto; }
.drive-status { color: #36586e; font-size: 11px; line-height: 1.4; margin: 0 0 9px; overflow-wrap: anywhere; }
.drive-status:empty { display: none; }
.drive-uploads:empty { display: none; }
.drive-uploads { margin-bottom: 9px; }
.drive-transfer { padding: 7px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; }
.drive-transfer span { margin-right: auto; overflow-wrap: anywhere; }
.drive-transfer button { font-size: 11px; }
.drive-table { border: 1px solid #b6cad6; border-radius: 9px; overflow: hidden; background: #f7fafd8c; }
.drive-list { list-style: none; padding: 0; margin: 0; }
.drive-list-header, .drive-row { display: grid; grid-template-columns: 19px minmax(0,1fr) minmax(61px,auto); align-items: center; gap: 7px; padding: 7px 9px; }
.drive-list-header { background: #cfdfe8; min-height: 34px; color: #3e5d70; font-size: 11px; font-weight: 650; }
.drive-list-header button { text-align: left; padding: 0; font-size: inherit; }
.drive-list-header button:last-child { text-align: right; }
.drive-list-header input, .drive-row input { accent-color: #36586e; margin: 0; width: 14px; height: 14px; }
.drive-row { position: relative; min-height: 41px; border-top: 1px solid #cfdee7; font-size: 12px; }
.drive-row.selected { background: #d1e2ed; }
.drive-row:hover { background: #eaf2f7; }
.drive-row .drive-item { display: flex; min-width: 0; align-items: center; gap: 8px; color: #263e4d; font-size: 12px; text-align: left; background: none; border: 0; padding: 0; text-decoration: none; }
.drive-item .item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 595; }
.drive-item:hover .item-name { text-decoration: underline; }
.drive-item .item-secondary { display: block; color: #536d7c; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-row time { text-align: right; font-size: 10px; color: #526b79; white-space: nowrap; }
.item-icon { display: inline-block; position: relative; flex: 0 0 15px; width: 15px; height: 16px; border-radius: 2px; background: #e7f0f5; border: 1px solid #83a2b3; }
.item-icon.file-icon::after { content: ""; position: absolute; width: 7px; height: 1px; background: #83a2b3; top: 6px; left: 3px; box-shadow: 0 3px #83a2b3; }
.item-icon.folder-icon { height: 12px; top: 2px; background: #9ebaca; border-color: #7198ad; }
.item-icon.folder-icon::before { content: ""; position: absolute; top: -4px; left: -1px; width: 7px; height: 4px; background: #9ebaca; border: 1px solid #7198ad; border-bottom: 0; border-radius: 2px 2px 0 0; }
.drive-empty { display: grid; place-content: center; justify-items: center; text-align: center; min-height: 175px; padding: 18px 7px; color: #344f60; }
.drive-empty p { font-size: 13px; font-weight: 650; margin: 17px 0 6px; }
.drive-empty button { font-size: 11px; }
.drive-empty-folder {
  width: 56px; height: 37px; background: #c2d7e3; border-radius: 4px 7px 6px 6px; position: relative; box-shadow: inset 0 -3px #b6cedb;
}
.drive-empty-folder::before { content: ""; position: absolute; left: 0; top: -7px; width: 25px; height: 10px; border-radius: 4px 6px 0 0; background: #c2d7e3; }
.drive-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 11px; margin-top: auto; color: #486579; font-size: 10px; }
.files-pane.drag-over { outline: 2px dashed #53798d; outline-offset: -5px; }
.drive-trash-actions { display: flex; align-items: center; gap: 5px; }
.drive-trash-actions button { font-size: 10px; padding: 4px; }
@container (max-width: 865px) {
  .folder-boards { grid-template-columns: 1fr 1fr; height: auto; min-height: calc(100dvh - 30px); column-gap: 6px; row-gap: 0; grid-template-rows: 39px minmax(0, 1fr); }
  .folder-shell { display: contents; }
  .folder-label { width: min(100%, 142px); min-width: 0; }
  .work-folder .folder-label { grid-area: 1 / 1; }
  .files-folder .folder-label { grid-area: 1 / 2; }
  .work-folder .folder-surface, .files-folder .folder-surface { grid-area: 2 / 1 / 3 / 3; }
  .folder-desk[data-files="off"] .folder-boards { grid-template-columns: 1fr; }
  .folder-desk[data-files="off"] .work-folder .folder-surface { grid-area: 2 / 1; }
  .folder-desk[data-pane="files"] .work-folder .folder-surface,
  .folder-desk[data-pane="work"] .files-folder .folder-surface { display: none; }
  .folder-label[aria-pressed="false"]::before { opacity: .65; }
}
@media (max-width: 680px) {
  .folder-desk { padding: 11px 10px; }
  .folder-boards { min-height: 62dvh; }
}
.viewing-trash .files-search-box,
.viewing-trash #drive-new-folder,
.viewing-trash .upload-menu,
.viewing-trash .drive-list-header,
.viewing-trash .drive-uploads { display: none; }
.drive-chip { display: inline-flex; gap: 5px; align-items: baseline; overflow-wrap: anywhere; }
.drive-chip button { font-size: 12px; line-height: 1; padding: 1px 2px; }
@container (max-width: 650px) {
  .work-folder .project-layout { grid-template-columns: 1fr; }
  .work-folder .project-heading { flex-wrap: wrap; }
  .work-folder .starter-row { grid-template-columns: 1fr; gap: 6px; }
  .work-folder .starter-row button { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 1px 8px; padding: 10px; }
  .work-folder .starter-row button > span { grid-row: 1/3; margin: 0; }
  .work-folder .starter-row button small { margin: 0; }
}

/* A single workspace sits in front of the other, with both folder labels available. */
.folder-boards, .folder-desk[data-files="off"] .folder-boards {
  grid-template-columns: minmax(0, 156px) minmax(0, 156px) minmax(0, 1fr);
  grid-template-rows: 39px minmax(0, 1fr);
  gap: 0;
  height: calc(100dvh - 30px);
  min-height: 0;
  isolation: isolate;
}
.folder-shell { display: contents; }
.work-folder .folder-label { grid-area: 1 / 1; }
.files-folder .folder-label { grid-area: 1 / 2; }
.work-folder .folder-surface, .files-folder .folder-surface { grid-area: 2 / 1 / 3 / 4; }
.folder-desk[data-files="off"] .work-folder .folder-surface { grid-area: 2 / 1 / 3 / 4; }
.folder-desk[data-pane="files"] .work-folder .folder-surface,
.folder-desk[data-pane="work"] .files-folder .folder-surface { display: none; }
.folder-label[aria-pressed="false"]::before { opacity: .78; }
.folder-label[aria-pressed="true"] { z-index: 1; }
.folder-label { width: min(100%, 148px); min-width: 0; }
.work-surface { display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.work-surface .main { min-height: 0; overflow: auto; }
.files-pane { padding: 20px clamp(14px, 3vw, 42px); }
.drive-location { min-width: 125px; padding: 7px 8px; height: 32px; }
.work-live-controls { z-index: 2; background: #fafcf8; border-top: 1px solid var(--folder-edge); padding: 10px clamp(12px, 3vw, 32px); }
.work-live-state, .steering-form { display: flex; align-items: center; gap: 10px; max-width: 1000px; margin: 0 auto; }
.work-live-state { color: #31483a; font-size: 13px; font-weight: 600; }
.work-live-state .stop-button { margin-left: auto; white-space: nowrap; }
.steering-form { margin-top: 7px; }
.steering-form input { min-width: 0; flex: 1; padding: 9px; border: 1px solid #c2d1c2; border-radius: 7px; background: #fff; }
.thinking-dots { display: inline-flex; align-items: center; gap: 4px; }
.thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: #345f48; animation: cc-pulse 1.35s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cc-pulse { 0%, 70%, 100% { opacity: .38; transform: translateY(0); } 34% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .thinking-dots i { animation: none; } }
@media (max-width: 680px) {
  .folder-boards, .folder-desk[data-files="off"] .folder-boards { height: 72dvh; min-height: 470px; grid-template-columns: minmax(0, 138px) minmax(0, 138px) minmax(0, 1fr); }
}
.history-row.selected { background: #ccdcca; border-color: #a8c1a5; }
.history-row.selected .job-row strong { color: #203b2a; }
.work-folder .message.user .message-body { background: #fcfdfb; border: 1px solid #c5d3c1; padding: 14px 17px; }
.work-folder .message:not(.user) .message-body { background: #d0ddcd; padding: 13px 16px; border-radius: 10px; }
.folder-desk[data-kind="job"] .message:not(.user) .message-body { background: #e1cdd2; }
.work-folder .message-body { white-space: normal; }
.work-folder .message-body p { margin: .65em 0; }
.work-folder .message-body > :first-child { margin-top: 0; }
.work-folder .message-body > :last-child { margin-bottom: 0; }
.work-folder .message-body h1, .work-folder .message-body h2, .work-folder .message-body h3,
.work-folder .message-body h4, .work-folder .message-body h5, .work-folder .message-body h6 { margin: 1em 0 .35em; line-height: 1.3; }
.work-folder .message-body h1 { font-size: 21px; }
.work-folder .message-body h2 { font-size: 18px; }
.work-folder .message-body h3 { font-size: 16px; }
.work-folder .message-body :is(ul,ol) { padding-inline-start: 1.55em; }
.work-folder .message-body table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.work-folder .message-body th, .work-folder .message-body td { padding: 6px 9px; border: 1px solid #9eaf99; text-align: left; }
.work-folder .message-body pre { max-width: 100%; overflow: auto; background: #f8fbf6; padding: 11px; border-radius: 7px; }
.work-folder .message-body code { font: .93em ui-monospace, monospace; }
.work-folder .message-body blockquote { margin-inline: 0; padding-inline-start: 12px; border-inline-start: 3px solid #92aa8b; }
.work-folder .stream-text { white-space: pre-wrap; }
#account-memory-text { width: 100%; resize: vertical; padding: 8px; border: 1px solid #c6d3c5; border-radius: 7px; }
#temporary-notice { margin: 8px 20px; }

#temporary-toggle[aria-pressed=true] { background: #d0d9e7; border-color: #9aaac0; }
