/* ItsAmir qd7.9 — replacement for the qd7.8 interaction layer. */
.navigation-dock .dock-item.tour-nav-preview77 {
  background: var(--paper) !important;
  color: var(--text) !important;
  box-shadow: 0 6px 18px #0000000c;
  transform: translateY(-5px) !important;
  transition: transform .15s ease, color .15s ease, background-color .15s ease !important;
}
.navigation-dock .dock-item.tour-nav-preview77 svg { transform: scale(1.1) !important; }
.navigation-dock .dock-item.tour-nav-preview77 span { color: inherit !important; }
.guide-story79 .guide-typed77 { min-height: 4em; }
.guide-story79 .tour-demonstrating { min-height: 1.5em; }
.guide-clock-done79 { opacity: .7; }

/* A selected project never changes the dimensions of its row. */
html .refined-wheel77 {
  scroll-snap-type: y proximity !important;
  overscroll-behavior-y: contain !important;
}
html .refined-wheel77.wheel-auto { scroll-snap-type: none !important; }
html .refined-wheel77 .work-row {
  box-sizing: border-box !important;
  min-height: var(--wheel-row,58px) !important;
  height: var(--wheel-row,58px) !important;
  max-height: var(--wheel-row,58px) !important;
  overflow: hidden !important;
  flex: none !important;
}

/* Desktop: predictable image frame with a maintained 1000:640 source ratio. */
@media (min-width:701px) and (min-height:541px) {
  html body:not(.work-compact) #work-panel.work-spotlight {
    position: relative;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    grid-template-columns: minmax(0,48%) minmax(0,52%);
    overflow: hidden !important;
    isolation: isolate;
    align-items: stretch;
  }
  html body:not(.work-compact) #work-panel > .spotlight-cover {
    height: 300px !important;
    min-height: 0 !important;
    max-height: 300px !important;
    width: 100%;
    aspect-ratio: auto !important;
    display: grid !important;
    place-items: center;
    overflow: hidden !important;
    background: var(--surface);
  }
  html body:not(.work-compact) #work-panel > .spotlight-cover img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: 300px !important;
    aspect-ratio: 1000 / 640 !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  html body:not(.work-compact) #work-panel > .spotlight-copy {
    min-height: 0;
    padding: 20px 24px;
    gap: 10px;
  }
}
html #work-panel > .work-panel-ghost79 {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  z-index: 3;
  pointer-events: none !important;
  background: var(--paper);
  overflow: hidden !important;
}

/* Mobile: 160px focus rows rather than 220–246px tall boxes.
   Titles have the SAME fixed position and font size in every state.
   Details crossfade in exact proportion to the wheel's fractional position. */
html body.work-compact .finite-work-browser .wheel-selection {
  opacity: 0 !important;
  transition: none !important;
}
html body.work-compact .finite-work-browser .wheel-heading {
  margin-block: 0 8px;
}
html body.work-compact .refined-wheel77 {
  mask-image: linear-gradient(#0008,#000 13%,#000 87%,#0008) !important;
  -webkit-mask-image: linear-gradient(#0008,#000 13%,#000 87%,#0008) !important;
}
html body.work-compact .refined-wheel77 .work-row,
html body.work-compact .refined-wheel77 .work-row.selected,
html body.work-compact .refined-wheel77 .work-row.wheel-above,
html body.work-compact .refined-wheel77 .work-row.wheel-below {
  position: relative !important;
  display: block !important;
  height: var(--wheel-row,140px) !important;
  min-height: var(--wheel-row,140px) !important;
  max-height: var(--wheel-row,140px) !important;
  padding: 0 16px !important;
  margin: 0 !important;
  justify-content: initial !important;
  overflow: hidden !important;
  transform: none !important;
  contain: layout style;
  isolation: isolate;
}
html body.work-compact .refined-wheel77 .work-row::before {
  content: "";
  position: absolute;
  inset: 2px 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: 0 5px 18px #00000006;
  pointer-events: none;
  opacity: var(--detail-alpha,0);
  z-index: -1;
}
html body.work-compact .refined-wheel77 .work-row .work-row-top,
html body.work-compact .refined-wheel77 .work-row.selected .work-row-top,
html body.work-compact .refined-wheel77 .work-row.wheel-above .work-row-top,
html body.work-compact .refined-wheel77 .work-row.wheel-below .work-row-top {
  position: absolute !important;
  top: 10px !important;
  inset-inline: 16px !important;
  width: auto !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: none !important;
  display: flex !important;
  align-items: center;
  transition: color .15s ease !important;
  transform: none !important;
}
html body.work-compact .refined-wheel77 .work-row .work-row-name,
html body.work-compact .refined-wheel77 .work-row.selected .work-row-name {
  font-size: 16px !important;
  font-weight: 550 !important;
  line-height: 1.35 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease !important;
}
html body.work-compact .refined-wheel77 .work-row .work-row-summary,
html body.work-compact .refined-wheel77 .work-row .work-row-summary:not([hidden]),
html body.work-compact .refined-wheel77 .work-row.selected .work-row-summary {
  position: absolute !important;
  top: 47px !important;
  inset-inline: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(var(--wheel-row,140px) - 52px) !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 6px !important;
  overflow: hidden !important;
  visibility: visible !important;
  opacity: var(--detail-alpha,0) !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  pointer-events: none !important;
}
html body.work-compact .refined-wheel77 .work-row .work-row-description {
  font-size: 12px !important;
  line-height: 1.45 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
  max-height: 2.9em;
  margin: 0 !important;
}
html body.work-compact .refined-wheel77 .work-row-summary .tech-icons {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px 9px !important;
  max-height: 22px !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
html body.work-compact .refined-wheel77 .work-row-summary .tech-icons > span {
  flex: none;
  font-size: 10px !important;
  line-height: 1.35 !important;
  white-space: nowrap;
}
html body.work-compact .refined-wheel77 .work-row-summary .tech-icons img {
  width: 14px !important;
  height: 14px !important;
}
html body.work-compact .refined-wheel77 .work-row .work-row-open {
  display: none !important;
}
@media (max-height:690px) {
  html body.work-compact .refined-wheel77 .work-row .work-row-top,
  html body.work-compact .refined-wheel77 .work-row.selected .work-row-top { top: 8px !important; }
  html body.work-compact .refined-wheel77 .work-row .work-row-summary,
  html body.work-compact .refined-wheel77 .work-row.selected .work-row-summary { top: 44px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .navigation-dock .dock-item.tour-nav-preview77 { transition: none !important; }
}
