#pufi-engineering-preview .brand {
  display: flex;
  align-items: center;
  gap: 2px;
  color: light-dark(#ed7a28, #ffa462);
  font: 700 15px/1.3 "Segoe UI", system-ui, sans-serif;
}
#pufi-engineering-preview .brand::before {
  content: "";
  flex: 0 0 20px;
  height: 20px;
  background: url("persimmon.svg") center / contain no-repeat;
}

#pufi-engineering-preview [data-tool-count] {
  font: 600 13px/1.4 "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  overflow-wrap: normal;
}

.project-list { display: grid; gap: 8px; }
.project-group { display: grid; gap: 2px; min-width: 0; }
.project-group > .project-entry { min-width: 0; }
#pufi-engineering-preview .rail .project-list-label {
  margin: 2px 0 0 6px;
  color: var(--quiet);
  font: 500 13px/1.45 "Segoe UI", system-ui, sans-serif;
}
.project-group > :is(.project-entry, .project-session) {
  min-height: 30px;
  font: 400 13px/1.45 "Segoe UI", system-ui, sans-serif;
}
.project-name {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-inline-start: 5px;
}
.scroll-title { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; container-type: inline-size; }
.scroll-title::-webkit-scrollbar { display: none; }
.scroll-title-text { display: inline-block; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .scroll-title { overflow: clip; }
  :is(.project-name, .session-row, .project-session-label):hover .scroll-title-text,
  :is(.nav-session, button.project-session-label):focus-visible .scroll-title-text {
    transform: translateX(min(0px, 100cqw - 100%));
    transition: transform 1.6s linear 250ms;
  }
}
.project-entry > .sidebar-menu { flex: none; }
.project-name::before {
  content: "";
  flex: 0 0 16px;
  height: 16px;
  background: var(--quiet);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 19V6a2 2 0 0 1 2-2h4l2 3h7a2 2 0 0 1 2 2v2M3 19h15a2 2 0 0 0 1.9-1.4l1.7-5.3a1 1 0 0 0-1-1.3H7a2 2 0 0 0-1.9 1.4L3 19Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.project-session-label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-inline: 29px 5px;
}
#pufi-engineering-preview .composer {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--raised);
  box-shadow: 0 2px 5px var(--shadow);
}

.composer footer,
.composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.composer footer { justify-content: space-between; gap: 5px 8px; }
.composer-actions { gap: 3px; margin-inline-start: auto; }
#pufi-engineering-preview .composer footer .picker-trigger {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--quiet);
  font: 500 13px/1 "Segoe UI", system-ui, sans-serif;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.composer footer summary::-webkit-details-marker { display: none; }
#pufi-engineering-preview .composer footer .picker-trigger:hover,
#pufi-engineering-preview .composer footer details[open] > summary {
  background: var(--rail);
  color: var(--text);
}

#pufi-engineering-preview .rail [data-settings] .dock-flyout {
  width: max-content;
  min-width: 0;
  gap: 2px;
  padding: 4px;
}
#pufi-engineering-preview .rail [data-settings] .dock-flyout button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  text-align: left;
  white-space: nowrap;
  font: 400 12px/1.4 "Segoe UI", system-ui, sans-serif;
}
#pufi-engineering-preview [data-settings] button svg {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--quiet);
}

.requirements-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 1px 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--text);
}
.requirements-strip > button {
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1px 8px;
}
.requirements-strip [data-requirements-strip],
.requirements-strip [data-requirements-strip]:hover { background: transparent; }
.requirements-strip [data-requirements-strip] { font-size: 13px; font-weight: 400; }
.requirements-strip .requirements-label { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.requirements-strip .requirements-label > * { line-height: 18px; }
.requirements-strip small { color: var(--quiet); font-size: 12px; }

#pufi-sketch,
#pufi-engineering-preview {
  --preview-code-font: Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
  --preview-rail-width: 200px;
  --preview-title-height: 44px;
  --preview-content-max: 600px;
  --preview-content-inset: 20px;
}

#pufi-engineering-preview :is(code, pre, .diff-lines) {
  font-family: var(--preview-code-font);
}

@media (max-width: 795px) {
  #pufi-sketch,
  #pufi-engineering-preview { --preview-rail-width: 170px; }
}
