:root {
  color-scheme: light;
  --ink: #171918;
  --muted: #74746f;
  --muted-strong: #555751;
  --paper: #fbfaf7;
  --paper-deep: #f2efe9;
  --line: #dfddd6;
  --line-strong: #cecbc1;
  --sidebar: #202221;
  --sidebar-raised: #2b2d2c;
  --sidebar-muted: #a8aaa6;
  --orange: #e8773f;
  --orange-dark: #c85c2a;
  --orange-soft: #fff0e7;
  --green: #5d743f;
  --green-dark: #43562c;
  --green-soft: #f3f5ed;
  --red: #b34d3f;
  --red-soft: #fff0ec;
  --shadow-sm: 0 1px 2px rgba(30, 28, 24, 0.06), 0 5px 18px rgba(30, 28, 24, 0.04);
  --shadow-md: 0 14px 40px rgba(30, 28, 24, 0.08);
  --sidebar-width: 286px;
  --radius: 12px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--sidebar);
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(232, 119, 63, 0.46);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  color: #f7f7f4;
  background:
    linear-gradient(180deg, transparent 68%, rgba(255, 255, 255, 0.018)),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.045) 0 3px, transparent 3.5px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.035) 0 4px, transparent 4.5px),
    var(--sidebar);
  background-size: auto, 74px 78px, 93px 91px, auto;
  border-right: 1px solid rgba(0, 0, 0, 0.34);
}

.sidebar__top {
  min-height: 0;
  padding: 34px 22px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: #fff;
  font-size: 20px;
  font-weight: 740;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.voxel {
  --voxel-size: 44px;
  position: relative;
  display: inline-block;
  flex: 0 0 var(--voxel-size);
  width: var(--voxel-size);
  height: calc(var(--voxel-size) * 1.05);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.16));
}

.voxel > span {
  position: absolute;
  display: block;
}

.voxel__top {
  top: 0;
  left: 7%;
  width: 86%;
  height: 45%;
  background:
    linear-gradient(30deg, transparent 48%, rgba(38, 37, 34, 0.34) 49% 52%, transparent 53%),
    linear-gradient(-30deg, transparent 48%, rgba(38, 37, 34, 0.3) 49% 52%, transparent 53%),
    repeating-linear-gradient(90deg, transparent 0 28%, rgba(38, 37, 34, 0.22) 29% 32%, transparent 33% 61%),
    #ddd5c7;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.voxel__left {
  top: 38%;
  left: 7%;
  width: 43%;
  height: 60%;
  background:
    repeating-linear-gradient(90deg, transparent 0 29%, rgba(22, 21, 20, 0.28) 31% 34%, transparent 35% 65%),
    repeating-linear-gradient(0deg, transparent 0 29%, rgba(22, 21, 20, 0.22) 31% 34%, transparent 35% 65%),
    #77766f;
  clip-path: polygon(0 0, 100% 33%, 100% 100%, 0 67%);
}

.voxel__right {
  top: 38%;
  right: 7%;
  width: 43%;
  height: 60%;
  background:
    repeating-linear-gradient(90deg, transparent 0 29%, rgba(22, 21, 20, 0.22) 31% 34%, transparent 35% 65%),
    repeating-linear-gradient(0deg, transparent 0 29%, rgba(22, 21, 20, 0.18) 31% 34%, transparent 35% 65%),
    #b7734e;
  clip-path: polygon(0 33%, 100% 0, 100% 67%, 0 100%);
}

.new-plugin-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  margin-top: 38px;
  padding: 18px 17px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #eb8249, var(--orange));
  box-shadow: 0 10px 25px rgba(198, 85, 35, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.17);
  cursor: pointer;
  font-weight: 650;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.new-plugin-button:hover {
  background: linear-gradient(180deg, #f08a51, #dd6b33);
  box-shadow: 0 12px 30px rgba(198, 85, 35, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.new-plugin-button:active {
  transform: translateY(1px);
}

.plus-mark {
  position: relative;
  width: 18px;
  height: 18px;
}

.plus-mark::before,
.plus-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.plus-mark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.sidebar__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 42px 6px 12px;
  color: var(--sidebar-muted);
}

.sidebar__section-heading h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 315px);
  margin: 0 -3px;
  padding: 0 3px 8px;
  overflow-y: auto;
  scrollbar-color: #4a4c4a transparent;
  scrollbar-width: thin;
}

.job-list__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  min-height: 67px;
  border-radius: 8px;
  transition: background 140ms ease;
}

.job-list__item:hover,
.job-list__item.is-selected {
  background: rgba(255, 255, 255, 0.075);
}

.job-list__select {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding: 9px 0 9px 12px;
  border: 0;
  color: #f6f6f2;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.job-list__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.job-list__copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 570;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-list__copy small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-list__delete {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #a9aaa7;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  opacity: 0;
  transition: color 140ms ease, background 140ms ease, opacity 140ms ease;
}

.job-list__item:hover .job-list__delete,
.job-list__delete:focus-visible {
  opacity: 1;
}

.job-list__delete:hover {
  color: #fff;
  background: rgba(205, 78, 59, 0.28);
}

.job-list__empty {
  margin: 14px 9px;
  color: #8f918d;
  font-size: 12px;
  line-height: 1.55;
}

.job-list__loading {
  display: grid;
  gap: 9px;
  padding: 8px 7px;
}

.job-list__loading span {
  display: block;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  background-size: 220% 100%;
  animation: shimmer 1.5s ease infinite;
}

.main {
  min-width: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(96, 89, 75, 0.047) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 89, 75, 0.047) 1px, transparent 1px),
    linear-gradient(rgba(96, 89, 75, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 89, 75, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 59% 31%, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.78) 45%, rgba(246, 244, 239, 0.66));
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px, 0 0;
  background-size: 32px 32px, 32px 32px, 8px 8px, 8px 8px, 100% 100%;
}

.main__inner {
  width: min(100%, 882px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 74px 32px 38px;
}

.mobile-bar {
  display: none;
}

.sidebar-scrim {
  display: none;
}

.loading-view,
.error-view {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: calc(100vh - 150px);
  text-align: center;
}

.loading-view p {
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.loading-anvil {
  position: relative;
  width: 54px;
  height: 42px;
  animation: float 1.8s ease-in-out infinite;
}

.loading-anvil span {
  position: absolute;
  display: block;
  background: var(--orange);
}

.loading-anvil span:nth-child(1) {
  top: 5px;
  left: 2px;
  width: 50px;
  height: 11px;
  border-radius: 3px 3px 6px 6px;
  clip-path: polygon(0 0, 100% 0, 82% 100%, 17% 100%);
}

.loading-anvil span:nth-child(2) {
  top: 14px;
  left: 20px;
  width: 16px;
  height: 18px;
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
}

.loading-anvil span:nth-child(3) {
  bottom: 3px;
  left: 12px;
  width: 32px;
  height: 7px;
  border-radius: 2px;
}

.error-view {
  max-width: 470px;
  margin: 0 auto;
}

.error-view h1 {
  margin: 19px 0 8px;
  font-size: 25px;
}

.error-view p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.notice-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 750;
}

.notice-mark--error {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(179, 77, 63, 0.2);
}

.new-view {
  max-width: 810px;
  margin: 6vh auto 0;
}

.new-view__intro {
  max-width: 660px;
  margin: 0 auto 31px;
  text-align: center;
}

.voxel--hero {
  --voxel-size: 62px;
  margin-bottom: 17px;
}

.voxel--hero .voxel__top {
  background:
    linear-gradient(28deg, transparent 47%, rgba(49, 78, 30, 0.28) 48% 51%, transparent 52%),
    linear-gradient(-28deg, transparent 47%, rgba(49, 78, 30, 0.22) 48% 51%, transparent 52%),
    #8baa58;
}

.voxel--hero .voxel__left {
  background:
    repeating-linear-gradient(0deg, transparent 0 30%, rgba(66, 48, 31, 0.25) 31% 34%, transparent 35% 63%),
    #8a623f;
}

.voxel--hero .voxel__right {
  background:
    repeating-linear-gradient(90deg, transparent 0 30%, rgba(62, 43, 27, 0.22) 31% 34%, transparent 35% 63%),
    #6f4b30;
}

.eyebrow {
  margin: 0 0 10px !important;
  color: var(--orange) !important;
  font-size: 11px !important;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.new-view h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 42px);
  font-weight: 710;
  letter-spacing: -0.038em;
  line-height: 1.15;
}

.new-view__intro > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.composer {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.composer--large {
  overflow: hidden;
  border-radius: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer--large:focus-within {
  border-color: rgba(232, 119, 63, 0.55);
  box-shadow: 0 0 0 4px rgba(232, 119, 63, 0.09), var(--shadow-md);
}

.composer--large.is-dragging,
.composer--change.is-dragging {
  border-color: rgba(232, 119, 63, 0.8);
  box-shadow: 0 0 0 4px rgba(232, 119, 63, 0.12), var(--shadow-md);
}

.composer textarea {
  display: block;
  width: 100%;
  resize: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.composer--large textarea {
  min-height: 155px;
  padding: 24px 25px 15px;
  font-size: 17px;
  line-height: 1.6;
}

.composer textarea::placeholder {
  color: #92938e;
}

.composer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 14px 18px;
  border-top: 1px solid rgba(223, 221, 214, 0.65);
}

.attachment-hint {
  color: #a1a19b;
  font-size: 11px;
  line-height: 1.3;
}

.composer__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.composer__actions--start {
  margin-left: 0;
}

.attach-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #64665f;
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.attach-button:hover,
.attach-button:focus-visible {
  color: var(--orange-dark);
  border-color: rgba(232, 119, 63, 0.55);
  background: var(--orange-soft);
}

.attach-mark {
  position: relative;
  display: block;
  width: 13px;
  height: 16px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
  transform: rotate(-42deg);
}

.attach-mark::after {
  content: "";
  position: absolute;
  inset: 3px 3px 2px;
  border: 1.4px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.attachment-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 18px 12px;
}

.attachment-tray[hidden] {
  display: none;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: min(260px, 100%);
  padding: 5px 7px 5px 5px;
  border: 1px solid #dedbd3;
  border-radius: 8px;
  color: #555751;
  background: #f7f5f0;
}

.attachment-chip__preview,
.attachment-chip__file {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.attachment-chip__preview {
  display: block;
  object-fit: cover;
}

.attachment-chip__file {
  position: relative;
  border: 1px solid #c9c6bc;
  background: #fff;
}

.attachment-chip__file::after,
.message-attachment__file::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 10px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 4px currentColor;
}

.attachment-chip__copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.attachment-chip__copy strong {
  overflow: hidden;
  color: #3c3e39;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip__copy small {
  color: #90918b;
  font-size: 10px;
}

.attachment-chip__remove {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #898a84;
  background: transparent;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.attachment-chip__remove:hover,
.attachment-chip__remove:focus-visible {
  color: #a84b3d;
  background: #eee5df;
}

.character-count {
  color: #9a9a95;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.primary-button,
.secondary-button,
.download-button,
.source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  border: 1px solid var(--orange-dark);
  color: #fff;
  background: var(--orange);
  box-shadow: 0 4px 12px rgba(200, 92, 42, 0.2);
}

.primary-button:hover {
  background: #df6e37;
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.send-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.arrow-mark {
  font-size: 18px;
  line-height: 1;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.secondary-button:hover {
  background: #f4f2ed;
}

.prompt-starters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.prompt-starters button {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(223, 221, 214, 0.85);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.prompt-starters button:hover {
  border-color: #c9c5bb;
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.prompt-starters button > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prompt-starters strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-starters small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-voxel {
  --mini-color: #789848;
  --mini-dark: #566f32;
  position: relative;
  display: inline-block;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.1) 49% 52%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(0, 0, 0, 0.12) 49% 52%, transparent 53%),
    linear-gradient(135deg, var(--mini-color) 0 49%, var(--mini-dark) 50% 100%);
  box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.12), inset 4px 4px 0 rgba(255, 255, 255, 0.1);
  transform: rotate(30deg) skew(-6deg, -6deg) scale(0.78);
}

.mini-voxel--gold {
  --mini-color: #deb14a;
  --mini-dark: #b37c25;
}

.mini-voxel--blue {
  --mini-color: #70a2b8;
  --mini-dark: #486f86;
}

.mini-voxel--stone {
  --mini-color: #929590;
  --mini-dark: #656963;
}

.mini-voxel--red {
  --mini-color: #ca6748;
  --mini-dark: #943b2b;
}

.job-view {
  padding-bottom: 5px;
}

.request-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 16px;
  align-items: start;
  min-height: 106px;
  margin-bottom: 30px;
  padding: 23px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(115deg, rgba(247, 244, 238, 0.92), rgba(242, 240, 235, 0.78));
  box-shadow: var(--shadow-sm);
}

.request-card__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg, #ef894e, #cf5e2b);
  box-shadow: 0 4px 11px rgba(207, 94, 43, 0.18);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 16px;
  font-weight: 730;
}

.request-card p {
  margin: 4px 0 0;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.52;
}

.request-card__copy {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: background 140ms ease, opacity 140ms ease;
}

.request-card:hover .request-card__copy,
.request-card__copy:focus-visible {
  opacity: 1;
}

.request-card__copy:hover {
  background: rgba(0, 0, 0, 0.055);
}

.request-card__copy > span,
.request-card__copy > span::after {
  width: 12px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.request-card__copy > span {
  position: relative;
  display: block;
  transform: translate(2px, 2px);
}

.request-card__copy > span::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  background: var(--paper-deep);
}

.build-header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  margin: 0 7px 22px;
}

.spark-mark {
  color: var(--orange);
  font-size: 26px;
  line-height: 1;
  transform: translateY(3px);
}

.build-header__title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.build-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 710;
  letter-spacing: -0.02em;
}

.build-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.progress-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  list-style: none;
}

.progress-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 22px;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 13px 18px;
  color: #8c8d88;
  transition: color 180ms ease, background 180ms ease;
}

.progress-row + .progress-row {
  border-top: 1px solid var(--line);
}

.progress-row.is-complete,
.progress-row.is-active,
.progress-row.is-failed {
  color: var(--ink);
}

.progress-row.is-active {
  background: linear-gradient(90deg, rgba(255, 240, 231, 0.62), rgba(255, 255, 255, 0.1) 54%);
}

.progress-row.is-failed {
  background: var(--red-soft);
}

.progress-row__label {
  font-size: 16px;
  font-weight: 500;
}

.progress-row.is-active .progress-row__label {
  font-weight: 650;
}

.progress-row__time {
  color: #898a86;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.progress-row.is-active .progress-row__time {
  color: var(--orange-dark);
}

.progress-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 35px;
  color: #777a75;
}

.progress-icon--plan {
  width: 26px;
  height: 31px;
  margin-left: 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.progress-icon--plan::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 6px;
  width: 10px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 2px;
  background: var(--paper);
}

.progress-icon--plan::after {
  width: 13px;
  height: 13px;
  content: "";
  background: url("/assets/spark-mark-v1.png") center / contain no-repeat;
}

.progress-icon--code {
  width: 29px;
  height: 34px;
  border: 2px solid currentColor;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.progress-icon--code::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: var(--paper);
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: skew(0, 45deg) translate(-1px, 1px);
}

.progress-icon--test {
  width: 30px;
  height: 33px;
}

.progress-icon--test::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 11px;
  width: 8px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
}

.progress-icon--test::after {
  content: "••";
  position: absolute;
  bottom: 0;
  left: 2px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 4px 4px 7px 7px;
  color: var(--orange);
  font-size: 10px;
  letter-spacing: 2px;
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.progress-icon--cube {
  grid-column: 1;
  justify-self: center;
}

.progress-row__status {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbc9c3;
  border-radius: 50%;
}

.progress-row.is-complete .progress-row__status {
  border-color: var(--green);
  background: var(--green);
}

.progress-row.is-complete .progress-row__status::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.progress-row.is-active .progress-row__status {
  border: 2px solid rgba(232, 119, 63, 0.3);
  border-top-color: var(--orange);
  animation: spin 900ms linear infinite;
}

.progress-row.is-failed .progress-row__status {
  border-color: var(--red);
  background: var(--red);
}

.progress-row.is-failed .progress-row__status::before,
.progress-row.is-failed .progress-row__status::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 3px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.progress-row.is-failed .progress-row__status::after {
  transform: rotate(-45deg);
}

.stage-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 12px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-sm);
  list-style: none;
}

.stage-track::before {
  content: "";
  position: absolute;
  top: 21px;
  right: 12.5%;
  left: 12.5%;
  height: 1px;
  background: #d9d7d0;
}

.stage-track__item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #989994;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.stage-track__dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid #cfcdc6;
  border-radius: 50%;
  background: #faf9f6;
}

.stage-track__item.is-complete,
.stage-track__item.is-active,
.stage-track__item.is-failed {
  color: var(--ink);
}

.stage-track__item.is-complete .stage-track__dot {
  border-color: var(--green);
  background: var(--green);
}

.stage-track__item.is-complete .stage-track__dot::after {
  content: "";
  width: 4px;
  height: 7px;
  margin-top: -2px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.stage-track__item.is-active .stage-track__dot {
  border-color: var(--orange);
  background: #fff6f0;
  box-shadow: 0 0 0 4px rgba(232, 119, 63, 0.13);
}

.stage-track__item.is-active .stage-track__dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  animation: activity-pulse 1.5s ease-in-out infinite;
}

.stage-track__item.is-failed .stage-track__dot {
  border-color: var(--red);
  background: var(--red);
}

.stage-track__item.is-failed .stage-track__dot::before,
.stage-track__item.is-failed .stage-track__dot::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 1.5px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.stage-track__item.is-failed .stage-track__dot::after {
  transform: rotate(-45deg);
}

.activity-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
}

.activity-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 65px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 240, 0.78);
}

.activity-panel__title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.activity-panel__title h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.activity-panel__title p {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-panel__pulse {
  position: relative;
  display: block;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa9a4;
}

.activity-panel__pulse.is-live {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(232, 119, 63, 0.12);
}

.activity-panel__pulse.is-live::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(232, 119, 63, 0.42);
  border-radius: inherit;
  animation: live-ring 1.7s ease-out infinite;
}

.activity-panel__pulse.is-ready {
  background: var(--green);
}

.activity-panel__pulse.is-failed {
  background: var(--red);
}

.jump-latest-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(232, 119, 63, 0.24);
  border-radius: 99px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 680;
  transition: background 140ms ease, transform 140ms ease;
}

.jump-latest-button:hover {
  background: #ffe5d5;
  transform: translateY(-1px);
}

.activity-stream {
  position: relative;
  min-height: 270px;
  max-height: 430px;
  padding: 18px 17px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #c9c6be transparent;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.activity-stream::before {
  content: "";
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 34px;
  width: 1px;
  background: linear-gradient(#dfdcd4, #e8e5de 90%, transparent);
}

.activity-empty {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 30px;
  text-align: center;
}

.activity-empty__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border: 1px solid #e6dfd7;
  border-radius: 10px;
  color: var(--orange);
  background: #fff9f5;
  font-size: 20px;
}

.activity-empty strong {
  font-size: 13px;
}

.activity-empty p {
  max-width: 370px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.activity-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.activity-item + .activity-item {
  margin-top: 15px;
}

.activity-item__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ddd9d1;
  border-radius: 9px;
  color: #656761;
  background: #fbfaf7;
  box-shadow: 0 2px 5px rgba(35, 32, 27, 0.07);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
}

.activity-item[data-activity-type="note"] .activity-item__mark {
  color: var(--orange);
  background: #fff8f3;
  border-color: #efd7c9;
  font-family: inherit;
  font-size: 17px;
}

.activity-item[data-activity-type="command"] .activity-item__mark {
  color: #e7e8e4;
  background: #343735;
  border-color: #292b2a;
}

.activity-item[data-activity-type="build"] .activity-item__mark {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(93, 116, 63, 0.25);
  font-family: inherit;
  font-size: 16px;
}

.activity-item[data-activity-type="status"] .activity-item__mark {
  color: var(--green);
  background: #f7f8f3;
  border-color: rgba(93, 116, 63, 0.22);
  font-family: inherit;
  font-size: 14px;
}

.activity-item.is-failed .activity-item__mark {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(179, 77, 63, 0.24);
}

.activity-item__bubble {
  min-width: 0;
  padding: 11px 13px 12px;
  border: 1px solid #e1ded7;
  border-radius: 4px 10px 10px 10px;
  background: rgba(255, 255, 255, 0.78);
}

.activity-item[data-activity-type="note"] .activity-item__bubble {
  border-color: #eaded6;
  background: linear-gradient(120deg, rgba(255, 249, 245, 0.96), rgba(255, 255, 255, 0.78));
}

.activity-item[data-activity-type="command"] .activity-item__bubble {
  color: #f3f3ef;
  background: #292c2a;
  border-color: #202220;
  box-shadow: 0 5px 12px rgba(20, 21, 20, 0.1);
}

.activity-item.is-failed .activity-item__bubble {
  border-color: rgba(179, 77, 63, 0.24);
}

.activity-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.activity-item__actor {
  overflow: hidden;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-item__meta {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  color: #92938e;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.activity-item[data-activity-type="command"] .activity-item__meta {
  color: #9ea29d;
}

.activity-item__message {
  margin: 0;
  color: #393b38;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.activity-item[data-activity-type="command"] .activity-item__message {
  color: #d8dad6;
}

.activity-item__detail {
  margin: 6px 0 0;
  color: #73756f;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.activity-item[data-activity-type="command"] .activity-item__detail {
  color: #aeb2ad;
}

.activity-item__path,
.activity-item__command {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  padding: 7px 9px;
  overflow-x: auto;
  border: 1px solid #e1ded7;
  border-radius: 6px;
  color: #5e625b;
  background: #f5f4f0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-item__path::before {
  content: "FILE  ";
  color: #a09c94;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.07em;
}

.activity-item__command {
  border-color: #414541;
  color: #f0d0bd;
  background: #202321;
}

.activity-item__command::before {
  content: "$ ";
  color: #89aa69;
}

.activity-item__output {
  max-height: 180px;
  margin: 8px 0 0;
  padding: 8px 9px;
  overflow: auto;
  border-left: 2px solid #565b56;
  color: #b9bdb8;
  background: rgba(0, 0, 0, 0.13);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-item:not([data-activity-type="command"]) .activity-item__output {
  border-left-color: #b9b6ae;
  color: #5d605a;
  background: #f0efeb;
}

@keyframes activity-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.72);
  }
}

@keyframes live-ring {
  from {
    opacity: 0.75;
    transform: scale(0.65);
  }
  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

.failure-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin-top: 15px;
  padding: 17px;
  border: 1px solid rgba(179, 77, 63, 0.24);
  border-radius: 10px;
  background: rgba(255, 240, 236, 0.84);
}

.failure-card strong {
  font-size: 14px;
}

.failure-card p {
  margin: 3px 0 0;
  color: #815c54;
  font-size: 12px;
  line-height: 1.45;
}

.artifact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 24px;
  align-items: center;
  margin-top: 15px;
  padding: 22px 21px 22px 26px;
  border: 1px solid rgba(93, 116, 63, 0.43);
  border-radius: 11px;
  background: linear-gradient(110deg, rgba(250, 250, 246, 0.94), rgba(246, 247, 239, 0.88));
  box-shadow: var(--shadow-sm);
}

.artifact-card__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 23px;
}

.artifact-icon {
  display: block;
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 9px 8px rgba(40, 34, 24, 0.2));
}

.artifact-card__copy {
  min-width: 0;
}

.artifact-card h2 {
  overflow: hidden;
  margin: 0 0 9px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.artifact-card__meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.artifact-card__actions {
  display: grid;
  gap: 9px;
}

.download-button {
  border: 1px solid var(--green-dark);
  color: #fff;
  background: linear-gradient(180deg, #6a8248, var(--green));
  box-shadow: 0 5px 12px rgba(67, 86, 44, 0.16);
}

.download-button:hover {
  background: linear-gradient(180deg, #728c4e, #536a37);
  transform: translateY(-1px);
}

.source-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.source-button:hover {
  background: #fff;
}

.download-mark {
  position: relative;
  width: 16px;
  height: 17px;
  border-bottom: 2px solid currentColor;
}

.download-mark::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 7px;
  width: 2px;
  height: 10px;
  background: currentColor;
}

.download-mark::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.file-mark {
  position: relative;
  width: 14px;
  height: 18px;
  border: 1.7px solid currentColor;
  border-radius: 2px;
}

.file-mark::before,
.file-mark::after {
  content: "";
  position: absolute;
  left: 3px;
  width: 7px;
  height: 1.5px;
  background: currentColor;
}

.file-mark::before {
  top: 7px;
}

.file-mark::after {
  top: 11px;
}

.composer--change {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 44px;
  gap: 9px;
  align-items: center;
  min-height: 72px;
  margin-top: 36px;
  padding: 9px 10px 9px 17px;
  border-radius: 11px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer--change:focus-within {
  border-color: rgba(232, 119, 63, 0.5);
  box-shadow: 0 0 0 4px rgba(232, 119, 63, 0.08), var(--shadow-sm);
}

.spark-mark--small {
  font-size: 20px;
  transform: none;
}

.composer--change textarea {
  max-height: 140px;
  padding: 14px 4px;
  line-height: 1.45;
}

.composer--change .attachment-tray--change {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: -2px 0 0;
  padding: 0 0 4px;
}

.attach-button--change {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 29px;
  min-height: 29px;
  padding: 6px;
  justify-content: center;
  border: 0;
  background: transparent;
}

.attach-button--change:hover,
.attach-button--change:focus-visible {
  background: var(--orange-soft);
}

.send-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.send-button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.send-button span {
  display: block;
  font-size: 19px;
  transform: rotate(-23deg) translate(1px, -1px);
}

/* Conversation-style build history */
.activity-panel {
  border-color: #dedbd3;
  background: rgba(250, 249, 246, 0.88);
}

.activity-panel__header {
  min-height: 60px;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.58);
}

.activity-stream {
  min-height: 300px;
  max-height: 480px;
  padding: 23px 22px 26px;
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.48), rgba(247, 245, 240, 0.72));
}

.activity-stream::before {
  display: none;
}

.activity-item {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.activity-item + .activity-item {
  margin-top: 18px;
}

.activity-item.is-grouped {
  margin-top: 6px;
}

.activity-item__mark {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #666861;
  background: #e9e7e1;
  box-shadow: none;
  font-size: 9px;
}

.activity-item.is-grouped .activity-item__mark {
  visibility: hidden;
}

.activity-item[data-activity-type="note"] .activity-item__mark {
  color: #fff;
  background: linear-gradient(145deg, #ed884f, #d56734);
  border: 0;
  font-size: 14px;
}

.activity-item[data-activity-type="file"] .activity-item__mark {
  color: #5e6d48;
  background: #e6eadf;
}

.activity-item[data-activity-type="command"] .activity-item__mark {
  color: #f1f1ed;
  background: #363936;
  border: 0;
}

.activity-item[data-activity-type="build"] .activity-item__mark {
  color: #fff;
  background: var(--green);
  border: 0;
  font-size: 13px;
}

.activity-item[data-activity-type="status"] .activity-item__mark {
  color: #6b6d67;
  background: #e7e5df;
  border: 0;
  font-size: 12px;
}

.activity-item.is-failed .activity-item__mark {
  color: #fff;
  background: var(--red);
  border: 0;
}

.activity-item__bubble,
.activity-item[data-activity-type="note"] .activity-item__bubble,
.activity-item[data-activity-type="command"] .activity-item__bubble {
  justify-self: start;
  width: fit-content;
  max-width: min(100%, 680px);
  padding: 9px 13px 11px;
  border: 1px solid #e1ded7;
  border-radius: 5px 14px 14px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(35, 32, 27, 0.035);
}

.activity-item[data-activity-type="note"] .activity-item__bubble {
  border-color: #eadbd1;
  background: #fffaf6;
}

.activity-item.is-grouped .activity-item__bubble {
  border-top-left-radius: 12px;
}

.activity-item.is-failed .activity-item__bubble {
  border-color: rgba(179, 77, 63, 0.24);
  background: #fff9f7;
}

.activity-item__header {
  justify-content: flex-start;
  gap: 7px;
  margin-bottom: 4px;
}

.activity-item.is-grouped .activity-item__actor {
  display: none;
}

.activity-item__actor {
  color: #454743;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: none;
}

.activity-item__meta,
.activity-item[data-activity-type="command"] .activity-item__meta {
  gap: 6px;
  color: #9b9b96;
  font-size: 9px;
}

.activity-item__state-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 9px;
  height: 9px;
}

.activity-item__state-icon::after {
  content: "";
  display: block;
}

.activity-item.is-running .activity-item__state-icon {
  border: 1.5px solid rgba(232, 119, 63, 0.32);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.activity-item.is-complete .activity-item__state-icon::after {
  width: 3px;
  height: 5px;
  margin-top: -1px;
  border-right: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green);
  transform: rotate(45deg);
}

.activity-item.is-failed .activity-item__state-icon::before,
.activity-item.is-failed .activity-item__state-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(45deg);
}

.activity-item.is-failed .activity-item__state-icon::after {
  transform: rotate(-45deg);
}

.activity-item.is-pending .activity-item__state-icon::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #aaa9a4;
}

.activity-item__message,
.activity-item[data-activity-type="command"] .activity-item__message {
  color: #383a36;
  font-size: 13px;
  line-height: 1.55;
}

.activity-item__detail,
.activity-item[data-activity-type="command"] .activity-item__detail {
  color: #70726c;
  font-size: 11px;
}

.activity-item__path,
.activity-item__command {
  margin-top: 9px;
  border-radius: 7px;
}

.activity-item__path {
  border-color: #e2dfd8;
  color: #555952;
  background: #f3f2ee;
}

.activity-item__command {
  border-color: #343835;
  color: #f0d0bd;
  background: #262926;
}

.activity-item__output,
.activity-item:not([data-activity-type="command"]) .activity-item__output {
  max-height: 190px;
  border: 1px solid #dcd9d2;
  border-left: 2px solid #a5a29b;
  border-radius: 6px;
  color: #555852;
  background: #efeee9;
}

.activity-item[data-activity-type="command"] .activity-item__output {
  border-color: #3a3e3a;
  border-left-color: #686d67;
  color: #c4c8c2;
  background: #202320;
}

.conversation-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
}

.conversation-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 252, 249, 0.96);
}

.conversation-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ed884f, #ce5f2d);
  box-shadow: 0 3px 10px rgba(200, 92, 42, 0.22);
  font-size: 14px;
  font-weight: 780;
}

.conversation-header__copy {
  min-width: 0;
}

.conversation-header h1 {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: 16px;
  font-weight: 730;
  letter-spacing: -0.018em;
}

.conversation-shell .activity-stream {
  min-height: 390px;
  max-height: min(58vh, 560px);
  padding: 24px 22px 28px;
  background:
    linear-gradient(180deg, rgba(250, 249, 246, 0.4), rgba(247, 245, 240, 0.68)),
    linear-gradient(rgba(96, 89, 75, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 89, 75, 0.025) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}

.user-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0 0 24px auto;
}

.activity-messages > .user-message {
  animation: message-in 180ms ease-out both;
}

.user-message.is-pending .user-message__bubble {
  opacity: 0.78;
}

.user-message.is-failed .user-message__bubble {
  border: 1px solid rgba(179, 77, 63, 0.4);
  background: linear-gradient(145deg, #c8664f, #a84b3d);
}

.user-message__state {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
}

.user-message__retry {
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.user-message__retry:hover,
.user-message__retry:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.user-message__bubble {
  max-width: min(82%, 620px);
  padding: 11px 14px;
  border-radius: 15px 5px 15px 15px;
  color: #fff;
  background: linear-gradient(145deg, #eb8148, #d66a35);
  box-shadow: 0 4px 12px rgba(200, 92, 42, 0.14);
}

.user-message__bubble p {
  margin: 0;
  font-size: 13px;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.user-message__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.message-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 4px 7px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  font-size: 10px;
}

.message-attachment > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment__image,
.message-attachment__file {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.message-attachment__image {
  background: linear-gradient(135deg, #f8b96c 0 45%, #79a66a 45% 68%, #4e765f 68%);
}

.message-attachment__file {
  border: 1px solid rgba(255, 255, 255, 0.62);
  color: rgba(255, 255, 255, 0.8);
}

.message-attachment__file::after {
  left: 5px;
  right: 5px;
  top: 8px;
  background: currentColor;
  box-shadow: 0 4px currentColor;
}

.user-message__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #989994;
  font-size: 9px;
}

.message-copy-button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #8d8e89;
  background: transparent;
  cursor: pointer;
}

.message-copy-button:hover {
  color: var(--orange-dark);
  background: var(--orange-soft);
}

.message-copy-button > span,
.message-copy-button > span::after {
  width: 8px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.message-copy-button > span {
  position: relative;
  display: block;
  transform: translate(1px, 1px);
}

.message-copy-button > span::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--paper);
}

.activity-messages {
  display: flex;
  flex-direction: column;
  min-height: 150px;
}

.conversation-shell .activity-empty {
  position: static;
  min-height: 180px;
  padding: 30px 20px;
}

.conversation-shell .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="note"] .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="command"] .activity-item__bubble {
  max-width: min(84%, 650px);
}

.conversation-shell .jump-latest-button {
  position: relative;
  z-index: 3;
  float: right;
  margin: -45px 17px 13px 0;
  box-shadow: 0 5px 12px rgba(30, 28, 24, 0.09);
}

.conversation-shell .failure-card,
.conversation-shell .artifact-card {
  margin-right: 16px;
  margin-left: 16px;
}

.conversation-shell .composer--change {
  clear: both;
  margin: 14px 0 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(253, 252, 249, 0.98);
}

.conversation-shell .composer--change:focus-within {
  border-color: var(--line);
  box-shadow: inset 0 3px 0 rgba(232, 119, 63, 0.08);
}

.conversation-shell .activity-item {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
}

.conversation-shell .activity-item + .activity-item,
.conversation-shell .activity-item.is-grouped {
  margin-top: 3px;
}

.conversation-shell .activity-item.is-group-end + .activity-item {
  margin-top: 15px;
}

.conversation-shell .activity-item .activity-item__mark {
  align-self: end;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ed884f, #ce5f2d);
  box-shadow: none;
  font-family: inherit;
  font-size: 9px;
  font-weight: 780;
  visibility: hidden;
}

.conversation-shell .activity-item.is-group-end .activity-item__mark {
  visibility: visible;
}

.conversation-shell .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="note"] .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="file"] .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="command"] .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="build"] .activity-item__bubble,
.conversation-shell .activity-item[data-activity-type="status"] .activity-item__bubble,
.conversation-shell .activity-item.is-failed .activity-item__bubble {
  width: fit-content;
  max-width: min(78%, 620px);
  padding: 8px 12px 9px;
  border: 0;
  border-radius: 16px 16px 16px 5px;
  color: var(--ink);
  background: #ecebe7;
  box-shadow: none;
}

.conversation-shell .activity-item.is-grouped:not(.is-group-end) .activity-item__bubble {
  border-bottom-left-radius: 16px;
}

.conversation-shell .activity-item__message,
.conversation-shell .activity-item[data-activity-type="command"] .activity-item__message {
  color: #30322f;
  font-size: 13px;
  line-height: 1.48;
}

.conversation-shell .activity-item__detail,
.conversation-shell .activity-item[data-activity-type="command"] .activity-item__detail {
  margin-top: 5px;
  color: #747670;
  font-size: 10px;
}

.conversation-shell .activity-item__group-time {
  display: block;
  margin-top: 5px;
  color: #a09f9a;
  font-size: 8px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.conversation-shell .activity-item__path {
  margin-top: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  color: #565952;
  background: rgba(255, 255, 255, 0.64);
}

.conversation-shell .activity-item__path::before {
  content: "";
}

.conversation-attachments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.conversation-shell .conversation-attachments .artifact-card,
.conversation-shell .conversation-attachments .failure-card {
  position: relative;
  width: min(70%, 560px);
  max-width: 560px;
  margin: 0 0 0 32px;
  border: 0;
  border-radius: 16px 16px 16px 5px;
  background: #ecebe7;
  box-shadow: none;
}

.conversation-shell .conversation-attachments .artifact-card::before,
.conversation-shell .conversation-attachments .failure-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -32px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent url("/assets/swizie-avatar-v1.png") center / contain no-repeat;
}

.conversation-shell .conversation-attachments .artifact-card {
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
  padding: 14px;
}

.conversation-shell .conversation-attachments .artifact-card__identity {
  gap: 12px;
}

.conversation-shell .conversation-attachments .artifact-icon {
  flex-basis: 68px;
  width: 68px;
  height: 68px;
}

.conversation-shell .conversation-attachments .artifact-card h2 {
  margin-bottom: 6px;
  font-size: 17px;
}

.conversation-shell .conversation-attachments .artifact-card__meta {
  margin-top: 7px;
}

.conversation-shell .conversation-attachments .download-button,
.conversation-shell .conversation-attachments .source-button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 11px;
}

.conversation-shell .conversation-attachments .failure-card {
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 13px;
}

.conversation-shell .conversation-attachments .failure-card .secondary-button {
  grid-column: 1 / -1;
  justify-self: start;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  background: #292b29;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -120% 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 248px;
  }

  .sidebar__top {
    padding-right: 17px;
    padding-left: 17px;
  }

  .brand {
    gap: 11px;
    font-size: 17px;
  }

  .main__inner {
    padding-right: 25px;
    padding-left: 25px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .mobile-bar {
    position: fixed;
    z-index: 15;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    min-height: 63px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(32, 34, 33, 0.97);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
  }

  .icon-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: transparent;
    cursor: pointer;
  }

  .menu-button > span {
    display: block;
    width: 18px;
    height: 1.5px;
    margin: 2px 0;
    border-radius: 2px;
    background: currentColor;
  }

  .brand--mobile {
    justify-self: center;
    gap: 8px;
    font-size: 14px;
  }

  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(300px, 86vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(14, 15, 14, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main__inner {
    min-height: 100dvh;
    padding: 88px 17px 28px;
  }

  .loading-view,
  .error-view {
    min-height: calc(100dvh - 116px);
  }

  .new-view {
    margin-top: 2vh;
  }

  .new-view__intro {
    margin-bottom: 22px;
  }

  .voxel--hero {
    --voxel-size: 50px;
    margin-bottom: 12px;
  }

  .new-view h1 {
    font-size: clamp(27px, 8vw, 36px);
  }

  .new-view__intro > p:last-child {
    font-size: 14px;
  }

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

  .prompt-starters button {
    min-height: 62px;
  }

  .request-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    min-height: 94px;
    padding: 18px 16px;
  }

  .request-card__mark {
    width: 36px;
    height: 36px;
  }

  .request-card__copy {
    display: none;
  }

  .build-header {
    margin-right: 2px;
    margin-left: 2px;
  }

  .build-header h1 {
    font-size: 21px;
  }

  .progress-row {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    gap: 11px;
    min-height: 66px;
    padding: 11px 14px;
  }

  .progress-row__time {
    display: none;
  }

  .activity-stream {
    min-height: 300px;
    max-height: min(48vh, 430px);
    padding-right: 13px;
    padding-left: 13px;
  }

  .activity-stream::before {
    left: 30px;
  }

  .activity-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .artifact-card {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .artifact-card__actions {
    grid-template-columns: 1fr 1fr;
  }

  .composer--change {
    margin-top: 24px;
  }
}

@media (max-width: 520px) {
  .main__inner {
    padding-right: 12px;
    padding-left: 12px;
  }

  .composer--large textarea {
    min-height: 174px;
    padding: 20px 18px 12px;
    font-size: 16px;
  }

  .composer__footer {
    align-items: flex-end;
    padding-left: 13px;
  }

  .composer__actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }

  .composer__actions--start {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .primary-button {
    min-height: 40px;
    padding: 9px 13px;
    font-size: 13px;
  }

  .request-card {
    margin-bottom: 24px;
  }

  .request-card p {
    font-size: 15px;
  }

  .build-header {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 17px;
  }

  .spark-mark {
    font-size: 21px;
  }

  .progress-row__label {
    font-size: 14px;
  }

  .stage-track {
    padding-right: 7px;
    padding-left: 7px;
  }

  .stage-track__item {
    font-size: 8px;
  }

  .activity-panel__header {
    min-height: 59px;
    padding: 10px 12px;
  }

  .activity-panel__title {
    gap: 8px;
  }

  .activity-panel__title p {
    max-width: 180px;
  }

  .jump-latest-button > span:first-child {
    display: none;
  }

  .jump-latest-button {
    width: 30px;
    padding: 5px;
  }

  .activity-stream {
    min-height: 315px;
    padding: 14px 9px 17px;
  }

  .activity-stream::before {
    left: 26px;
  }

  .activity-item {
    grid-template-columns: 33px minmax(0, 1fr);
    gap: 8px;
  }

  .activity-item__mark {
    width: 33px;
    height: 33px;
  }

  .activity-item__bubble {
    padding: 10px 10px 11px;
  }

  .activity-item__header {
    align-items: flex-start;
    gap: 8px;
  }

  .activity-item__meta {
    gap: 4px;
  }

  .activity-item__message {
    font-size: 11px;
  }

  .failure-card {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .failure-card .secondary-button {
    grid-column: 1 / -1;
  }

  .artifact-card {
    padding: 20px 16px;
  }

  .artifact-card__identity {
    gap: 14px;
  }

  .artifact-icon {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

  .artifact-card h2 {
    font-size: 20px;
  }

  .artifact-card__actions {
    grid-template-columns: 1fr;
  }

  .composer--change {
    grid-template-columns: 22px minmax(0, 1fr) 40px;
    min-height: 64px;
    padding-left: 12px;
  }

  .send-button {
    width: 40px;
    height: 40px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 900px) {
  .conversation-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .conversation-shell .activity-stream {
    min-height: 390px;
    max-height: min(58dvh, 540px);
    padding: 19px 14px 24px;
  }

  .user-message__bubble {
    max-width: 88%;
  }

  .conversation-shell .activity-item__bubble,
  .conversation-shell .activity-item[data-activity-type="note"] .activity-item__bubble,
  .conversation-shell .activity-item[data-activity-type="command"] .activity-item__bubble {
    max-width: 91%;
  }
}

@media (max-width: 520px) {
  .conversation-shell {
    border-radius: 10px;
  }

  .conversation-header {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 65px;
    padding: 9px 12px;
  }

  .conversation-avatar {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .conversation-shell .activity-stream {
    min-height: 410px;
    max-height: 60dvh;
    padding: 17px 10px 22px;
  }

  .user-message {
    margin-bottom: 20px;
  }

  .user-message__bubble {
    max-width: 92%;
    padding: 10px 12px;
  }

  .user-message__bubble p {
    font-size: 12px;
  }

  .conversation-shell .activity-item {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px;
  }

  .conversation-shell .activity-item__mark {
    width: 31px;
    height: 31px;
  }

  .conversation-shell .activity-item__bubble,
  .conversation-shell .activity-item[data-activity-type="note"] .activity-item__bubble,
  .conversation-shell .activity-item[data-activity-type="command"] .activity-item__bubble {
    max-width: 94%;
  }

  .conversation-shell .failure-card,
  .conversation-shell .artifact-card {
    margin-right: 10px;
    margin-left: 10px;
  }

  .conversation-shell .conversation-attachments .artifact-card,
  .conversation-shell .conversation-attachments .failure-card {
    width: calc(100% - 34px);
    max-width: none;
    margin-right: 0;
    margin-left: 34px;
  }

  .conversation-shell .conversation-attachments .artifact-card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Voxel faces: three hard-edged planes keep every block readable at small sizes. */
.voxel {
  --voxel-top: #d7d1c4;
  --voxel-left: #77766f;
  --voxel-right: #b7734e;
  filter: drop-shadow(0 5px 2px rgba(0, 0, 0, 0.2));
  image-rendering: pixelated;
}

.voxel > span {
  overflow: hidden;
  background-color: var(--voxel-right);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 12%, transparent 12% 55%, rgba(0, 0, 0, 0.12) 55% 63%, transparent 63%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 10%, transparent 10% 48%, rgba(255, 255, 255, 0.06) 48% 55%, transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(25, 24, 21, 0.22);
}

.voxel .voxel__top {
  top: 0;
  left: 7%;
  width: 86%;
  height: 45%;
  background-color: var(--voxel-top);
  background-image:
    linear-gradient(30deg, transparent 47%, rgba(44, 43, 39, 0.17) 48% 51%, transparent 52%),
    linear-gradient(-30deg, transparent 47%, rgba(44, 43, 39, 0.13) 48% 51%, transparent 52%),
    repeating-linear-gradient(90deg, transparent 0 24%, rgba(255, 255, 255, 0.09) 24% 27%, transparent 27% 49%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  z-index: 3;
}

.voxel .voxel__left {
  top: 38%;
  left: 7%;
  width: 43%;
  height: 60%;
  background-color: var(--voxel-left);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 22%, rgba(0, 0, 0, 0.13) 22% 25%, transparent 25% 49%),
    repeating-linear-gradient(90deg, transparent 0 44%, rgba(255, 255, 255, 0.07) 44% 48%, transparent 48% 76%);
  clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 80%);
  z-index: 2;
}

.voxel .voxel__right {
  top: 38%;
  right: 7%;
  width: 43%;
  height: 60%;
  background-color: var(--voxel-right);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 22%, rgba(0, 0, 0, 0.16) 22% 25%, transparent 25% 49%),
    repeating-linear-gradient(90deg, transparent 0 42%, rgba(255, 255, 255, 0.06) 42% 47%, transparent 47% 75%);
  clip-path: polygon(0 20%, 100% 0, 100% 80%, 0 100%);
  z-index: 1;
}

.voxel--hero {
  --voxel-top: #8eaf5a;
  --voxel-left: #745335;
  --voxel-right: #9a6a40;
}

.voxel--hero .voxel__top {
  background-image:
    linear-gradient(28deg, transparent 47%, rgba(44, 72, 27, 0.22) 48% 51%, transparent 52%),
    linear-gradient(-28deg, transparent 47%, rgba(44, 72, 27, 0.18) 48% 51%, transparent 52%),
    repeating-linear-gradient(90deg, transparent 0 23%, rgba(255, 255, 255, 0.1) 23% 27%, transparent 27% 51%);
}

.mini-voxel {
  --mini-top: #8eaf5a;
  --mini-left: #745335;
  --mini-right: #9a6a40;
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  background-color: var(--mini-right);
  background-image: repeating-linear-gradient(0deg, transparent 0 25%, rgba(0, 0, 0, 0.16) 25% 30%, transparent 30% 52%);
  box-shadow: none;
  transform: none;
  filter: drop-shadow(0 4px 1px rgba(0, 0, 0, 0.18));
  image-rendering: pixelated;
  clip-path: polygon(50% 50%, 100% 25%, 100% 75%, 50% 100%);
}

.mini-voxel::before,
.mini-voxel::after {
  position: absolute;
  display: block;
  content: "";
  pointer-events: none;
}

.mini-voxel::before {
  inset: 0;
  background-color: var(--mini-top);
  background-image:
    linear-gradient(30deg, transparent 46%, rgba(40, 62, 25, 0.2) 47% 52%, transparent 53%),
    linear-gradient(-30deg, transparent 46%, rgba(40, 62, 25, 0.15) 47% 52%, transparent 53%);
  clip-path: polygon(50% 0, 100% 25%, 50% 50%, 0 25%);
}

.mini-voxel::after {
  inset: 0;
  background-color: var(--mini-left);
  background-image: repeating-linear-gradient(0deg, transparent 0 25%, rgba(0, 0, 0, 0.13) 25% 30%, transparent 30% 52%);
  clip-path: polygon(0 25%, 50% 50%, 50% 100%, 0 75%);
}

.mini-voxel--gold {
  --mini-top: #e0ae48;
  --mini-left: #9b6a2b;
  --mini-right: #bd8530;
}

.mini-voxel--blue {
  --mini-top: #79a8bb;
  --mini-left: #526c79;
  --mini-right: #668897;
}

.mini-voxel--stone {
  --mini-top: #d5d0c5;
  --mini-left: #767871;
  --mini-right: #a06b4b;
}

.mini-voxel--red {
  --mini-top: #cf7252;
  --mini-left: #863d2e;
  --mini-right: #a84d35;
}

/* Sidebar/thumb cubes use real child planes so the top face is not clipped by the side face. */
.mini-voxel {
  overflow: visible;
  background: transparent;
  clip-path: none;
}

.mini-voxel::before,
.mini-voxel::after {
  display: none;
}

.mini-voxel > span {
  position: absolute;
  inset: 0;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 22, 0.2);
}

.mini-voxel__top {
  background-color: var(--mini-top);
  background-image:
    linear-gradient(30deg, transparent 46%, rgba(39, 57, 25, 0.22) 47% 52%, transparent 53%),
    linear-gradient(-30deg, transparent 46%, rgba(39, 57, 25, 0.15) 47% 52%, transparent 53%);
  clip-path: polygon(50% 0, 100% 25%, 50% 50%, 0 25%);
  z-index: 3;
}

.mini-voxel__left {
  background-color: var(--mini-left);
  background-image: repeating-linear-gradient(0deg, transparent 0 25%, rgba(0, 0, 0, 0.14) 25% 30%, transparent 30% 52%);
  clip-path: polygon(0 25%, 50% 50%, 50% 100%, 0 75%);
  z-index: 2;
}

.mini-voxel__right {
  background-color: var(--mini-right);
  background-image: repeating-linear-gradient(0deg, transparent 0 25%, rgba(0, 0, 0, 0.17) 25% 30%, transparent 30% 52%);
  clip-path: polygon(50% 50%, 100% 25%, 100% 75%, 50% 100%);
  z-index: 1;
}

/* Supplied transparent marks keep the identity consistent at every breakpoint. */
.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
}

.brand {
  letter-spacing: -0.025em;
  text-transform: none;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: "Segoe UI Variable Display", "Avenir Next", "Trebuchet MS", sans-serif;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.brand-wordmark__domain {
  color: #f3a174;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.brand-mark img,
.arrow-mark img,
.spark-mark img,
.activity-empty__mark img,
.conversation-avatar img,
.swizie-avatar,
.send-button .send-mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand--mobile .brand-mark {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
}

.arrow-mark {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  font-size: 0;
  line-height: 1;
}

.spark-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 0;
  line-height: 1;
  transform: translateY(3px);
}

.spark-mark--small {
  width: 22px;
  height: 22px;
  transform: none;
}

.activity-empty__mark {
  overflow: hidden;
}

.conversation-avatar {
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.activity-item__mark {
  overflow: hidden;
}

.conversation-shell .activity-item__mark {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.activity-item__mark .swizie-avatar {
  width: 100%;
  height: 100%;
}

.send-button > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0;
  transform: none;
}

/* The conversation is the workspace: keep its composer anchored while the message log scrolls. */
.main__inner {
  width: 100%;
  max-width: none;
}

.job-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 112px);
  min-height: 0;
  padding-bottom: 0;
}

.conversation-shell {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.conversation-shell .activity-stream {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.sidebar-close {
  display: none;
}

@media (max-width: 900px) {
  .sidebar {
    visibility: hidden;
    overscroll-behavior: contain;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 220ms;
  }

  body.sidebar-open .sidebar {
    visibility: visible;
    transition-delay: 0s;
  }

  .sidebar-scrim {
    visibility: hidden;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
  }

  body.sidebar-open .sidebar-scrim {
    visibility: visible;
    transition-delay: 0s;
  }

  .sidebar-close {
    position: absolute;
    z-index: 2;
    top: 13px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }

  .sidebar-close > span {
    position: absolute;
    width: 17px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
  }

  .sidebar-close > span:first-child {
    transform: rotate(45deg);
  }

  .sidebar-close > span:last-child {
    transform: rotate(-45deg);
  }

  .job-view {
    height: calc(100dvh - 116px);
    min-height: 0;
  }

  .conversation-shell {
    height: 100%;
    min-height: 0;
  }
}

/* Full-pane conversation layout: messages use the available workspace, while
   only user messages retain a conversational bubble. */
.main__inner:has(> .job-view:not([hidden])) {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
}

.main__inner:has(> .job-view:not([hidden])) .job-view {
  height: 100%;
  min-height: 0;
}

.main__inner:has(> .job-view:not([hidden])) .conversation-shell {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.main__inner:has(> .job-view:not([hidden])) .conversation-header {
  flex: 0 0 auto;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(251, 250, 247, 0.96);
}

.main__inner:has(> .job-view:not([hidden])) .conversation-shell .activity-stream {
  min-width: 0;
  padding: 28px clamp(18px, 7vw, 96px) 34px;
  background:
    linear-gradient(180deg, rgba(250, 249, 246, 0.42), rgba(247, 245, 240, 0.7)),
    linear-gradient(rgba(96, 89, 75, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 89, 75, 0.025) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}

.main__inner:has(> .job-view:not([hidden])) .activity-item {
  width: 100%;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr);
}

.main__inner:has(> .job-view:not([hidden])) .activity-item__bubble,
.main__inner:has(> .job-view:not([hidden])) .activity-item[data-activity-type="note"] .activity-item__bubble,
.main__inner:has(> .job-view:not([hidden])) .activity-item[data-activity-type="file"] .activity-item__bubble,
.main__inner:has(> .job-view:not([hidden])) .activity-item[data-activity-type="command"] .activity-item__bubble,
.main__inner:has(> .job-view:not([hidden])) .activity-item[data-activity-type="build"] .activity-item__bubble,
.main__inner:has(> .job-view:not([hidden])) .activity-item[data-activity-type="status"] .activity-item__bubble,
.main__inner:has(> .job-view:not([hidden])) .activity-item.is-failed .activity-item__bubble {
  width: auto;
  min-width: 0;
  max-width: min(100%, 780px);
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.main__inner:has(> .job-view:not([hidden])) .activity-item__message,
.main__inner:has(> .job-view:not([hidden])) .activity-item__detail,
.main__inner:has(> .job-view:not([hidden])) .activity-item__path,
.main__inner:has(> .job-view:not([hidden])) .activity-item__command,
.main__inner:has(> .job-view:not([hidden])) .activity-item__output {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.main__inner:has(> .job-view:not([hidden])) .activity-item__message {
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.62;
}

.main__inner:has(> .job-view:not([hidden])) .user-message {
  width: 100%;
  min-width: 0;
}

.main__inner:has(> .job-view:not([hidden])) .user-message__bubble {
  min-width: 0;
  max-width: min(82%, 780px);
}

.main__inner:has(> .job-view:not([hidden])) .user-message__bubble p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.main__inner:has(> .job-view:not([hidden])) .conversation-shell .conversation-attachments .artifact-card,
.main__inner:has(> .job-view:not([hidden])) .conversation-shell .conversation-attachments .failure-card {
  width: min(78%, 720px);
  max-width: 720px;
}

.main__inner:has(> .job-view:not([hidden])) .conversation-shell .composer--change {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
  padding: 12px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: rgba(253, 252, 249, 0.98);
}

.main__inner:has(> .job-view:not([hidden])) .conversation-shell .composer--change textarea {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  height: auto;
  max-height: min(28dvh, 260px);
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 900px) {
  .main__inner:has(> .job-view:not([hidden])) {
    min-height: 100dvh;
    height: 100dvh;
    padding: 63px 0 0;
  }

  .main__inner:has(> .job-view:not([hidden])) .job-view {
    height: calc(100dvh - 63px);
  }

  .main__inner:has(> .job-view:not([hidden])) .conversation-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .main__inner:has(> .job-view:not([hidden])) .conversation-shell .activity-stream {
    padding: 22px 14px 28px;
  }

  .main__inner:has(> .job-view:not([hidden])) .user-message__bubble {
    max-width: min(92%, 780px);
  }

  .main__inner:has(> .job-view:not([hidden])) .conversation-shell .conversation-attachments .artifact-card,
  .main__inner:has(> .job-view:not([hidden])) .conversation-shell .conversation-attachments .failure-card {
    width: calc(100% - 34px);
    max-width: none;
  }

  .main__inner:has(> .job-view:not([hidden])) .conversation-shell .composer--change {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 520px) {
  .main__inner:has(> .job-view:not([hidden])) .conversation-header {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 65px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .main__inner:has(> .job-view:not([hidden])) .conversation-shell .activity-stream {
    padding: 18px 10px 24px;
  }

  .main__inner:has(> .job-view:not([hidden])) .activity-item {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px;
  }

  .main__inner:has(> .job-view:not([hidden])) .activity-item__message {
    font-size: 14px;
  }

  .main__inner:has(> .job-view:not([hidden])) .user-message__bubble {
    max-width: 94%;
  }
}
