/* Miniature project previews (home Workshop band and Workshop index) */

.mini {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: #fbfdfb;
  box-shadow:
    0 0 0 1px rgb(15 61 46 / 0.12),
    0 10px 24px -14px rgb(15 61 46 / 0.55);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #1d2a24;
}

/* Marvin: dark voice console */
.mini-marvin {
  display: grid;
  grid-template-columns: 22% 1fr;
  background: #0f1417;
  color: #dfe8ea;
}
.mini-marvin .side {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 10% 12%;
  border-right: 1px solid rgb(255 255 255 / 0.08);
}
.mini-marvin .side i {
  display: block;
  height: 0.32rem;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.16);
}
.mini-marvin .side i:first-child {
  background: #5ee0b8;
  width: 70%;
}
.mini-marvin .main {
  display: grid;
  align-content: center;
  gap: 0.6rem;
  padding: 0 8%;
}
.mini-marvin .wave {
  display: flex;
  align-items: center;
  gap: 3%;
  height: 2.6rem;
}
.mini-marvin .wave i {
  flex: 1;
  height: 30%;
  border-radius: 2px;
  background: #5ee0b8;
  animation: mini-wave 1.1s ease-in-out infinite alternate;
}
.mini-marvin .wave i:nth-child(even) {
  background: #4aa3ff;
}
.mini-marvin .wave i:nth-child(3n) {
  animation-delay: -0.4s;
}
.mini-marvin .wave i:nth-child(3n + 1) {
  animation-delay: -0.8s;
}
.mini-marvin .wave i:nth-child(4n) {
  animation-duration: 0.8s;
}
.mini-marvin .say {
  font-size: 0.62rem;
  opacity: 0.8;
}
@keyframes mini-wave {
  from {
    height: 18%;
  }
  to {
    height: 100%;
  }
}

/* Lithium: menu bar and popover */
.mini-lithium {
  background: #dfe9e4;
}
.mini-lithium .bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6%;
  height: 14%;
  padding: 0 4%;
  background: #233b32;
  color: #fff;
  font-size: 0.5rem;
}
.mini-lithium .bar b {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 0.62rem;
  border: 1px solid #fff;
  border-radius: 2px;
  font-size: 0.42rem;
}
.mini-lithium .pop {
  position: absolute;
  right: 5%;
  top: 19%;
  width: 66%;
  display: grid;
  gap: 0.28rem;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 16px -6px rgb(0 0 0 / 0.35);
  font-size: 0.5rem;
}
.mini-lithium .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.3rem;
}
.mini-lithium .row u {
  grid-column: 1 / -1;
  height: 0.18rem;
  border-radius: 1px;
  background: #e3ebe7;
  text-decoration: none;
  overflow: hidden;
}
.mini-lithium .row u::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--w, 50%);
  background: #23a26d;
  animation: mini-drain 6s linear infinite;
}
.mini-lithium .row.is-out em {
  color: #c2321c;
  font-style: normal;
}
.mini-lithium .row.is-out u::before {
  width: 0;
  animation: none;
}
@keyframes mini-drain {
  from {
    width: var(--w, 50%);
  }
  to {
    width: 4%;
  }
}

/* Group Four: Chrome tab strip with groups */
.mini-group {
  background: #e8ebef;
}
.mini-group .strip {
  display: flex;
  align-items: flex-end;
  gap: 2%;
  height: 22%;
  padding: 0 3%;
  background: #d9dde3;
}
.mini-group .grp {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4%;
  height: 62%;
  padding: 0 3%;
  background: #f4f6f8;
  font-size: 0.48rem;
  white-space: nowrap;
  animation: mini-group-in 4s ease-out infinite;
  animation-delay: var(--d, 0s);
}
.mini-group .grp::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--c);
}
.mini-group .grp b {
  padding: 0 0.2rem;
  border-radius: 3px;
  background: var(--c);
  color: #fff;
  font-weight: 700;
}
.mini-group .page {
  display: grid;
  gap: 0.45rem;
  padding: 6% 8%;
}
.mini-group .page i {
  display: block;
  height: 0.34rem;
  border-radius: 2px;
  background: #cfd5dc;
}
.mini-group .page i:nth-child(2) {
  width: 70%;
}
.mini-group .page i:nth-child(3) {
  width: 84%;
}
@keyframes mini-group-in {
  0%,
  10% {
    transform: translateY(40%);
    opacity: 0;
  }
  25%,
  100% {
    transform: none;
    opacity: 1;
  }
}

/* SlashCompute: Macs passing work along */
.mini-slash {
  display: grid;
  place-items: center;
  background: #10131a;
  color: #cfd6e6;
}
.mini-slash .lan {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 82%;
}
.mini-slash .lan::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30%;
  height: 2px;
  background: rgb(255 255 255 / 0.16);
}
.mini-slash .mac {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  width: 20%;
  font-size: 0.46rem;
}
.mini-slash .mac span {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 2px solid #5b6578;
  border-radius: 3px;
  background: #1b2130;
  animation: mini-busy 3.2s steps(1) infinite;
  animation-delay: var(--d, 0s);
}
.mini-slash .packet {
  position: absolute;
  top: calc(30% - 3px);
  left: 8%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b2c;
  animation: mini-packet 3.2s linear infinite;
}
@keyframes mini-busy {
  0%,
  24% {
    background: #ff6b2c;
  }
  25%,
  100% {
    background: #1b2130;
  }
}
@keyframes mini-packet {
  from {
    left: 8%;
  }
  to {
    left: 92%;
  }
}

/* Empty slot preview */
.mini-empty {
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  outline: 2px dashed currentColor;
  outline-offset: -2px;
  color: inherit;
  font-family: var(--body);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .mini * {
    animation: none !important;
  }
}
