.platform-board[data-hero-motion] {
  --hero-motion-accent: #254edb;
  --hero-motion-wash: #e7edff;
}

.platform-board[data-hero-motion-step="request"] {
  --hero-motion-accent: #944a2c;
  --hero-motion-wash: #f9ede2;
}

.platform-board[data-hero-motion-step="proposal"] {
  --hero-motion-accent: #165d48;
  --hero-motion-wash: #dceee4;
}

.platform-board[data-hero-motion] .board-top > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-board[data-hero-motion] .board-example,
.platform-board[data-hero-motion] .board-avatar { flex-shrink: 0; }

.platform-board .hero-motion-controls {
  display: flex;
  align-items: center;
  flex: none;
  gap: 4px;
}

.platform-board .hero-motion-controls[hidden] { display: none; }

.platform-board .hero-motion-controls button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: #28364d;
  color: #fff;
}

.platform-board .hero-motion-controls button:hover { background: #425778; }
.platform-board .hero-motion-controls button:focus-visible { outline-offset: 2px; }

.platform-board .hero-motion-controls svg,
.platform-board .hero-motion-card svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-board[data-hero-motion] .board-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.platform-board .board-pipeline [data-hero-motion-select] {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 24px;
  padding: 3px 2px;
  border: 0;
  border-bottom: 2px solid #dce1e9;
  border-radius: 4px 4px 0 0;
  color: #526173;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.platform-board .board-pipeline [data-hero-motion-select]:hover { background: #eef1f6; }
.platform-board .board-pipeline [data-hero-motion-select]:focus-visible { outline-offset: 2px; }
.platform-board .board-pipeline [data-passed] { border-color: #82a898; color: #27644e; }
.platform-board .board-pipeline [aria-pressed="true"] {
  border-color: var(--hero-motion-accent);
  background: var(--hero-motion-wash);
  color: var(--hero-motion-accent);
  font-weight: 650;
}
.platform-board .hero-motion-step-short { display: none; }

.platform-board[data-hero-motion] .board-state {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--hero-motion-wash);
  color: var(--hero-motion-accent);
}

.platform-board[data-hero-motion-step="request"] .board-chat { border-color: #d49972; background: #fff7ee; }
.platform-board[data-hero-motion-step="measure"] .board-room { outline: 2px solid #3d6bd2; outline-offset: -2px; }
.platform-board[data-hero-motion-step="measure"] [data-hero-area] { color: #244db2; }
.platform-board[data-hero-motion-step="estimate"] .board-estimate { background: #e1eaff; }
.platform-board[data-hero-motion-step="estimate"] .board-estimate > div > span { color: #4d6185; }
.platform-board[data-hero-motion-step="estimate"] [data-hero-total] { color: #183c9b; }
.platform-board[data-hero-motion-step="proposal"] .board-project { outline: 2px solid #287156; outline-offset: -2px; }

.platform-board[data-hero-motion] .board-estimate > div { position: relative; }

.platform-board[data-hero-motion-step="estimate"] .board-estimate > div:has(> [data-hero-total]) {
  margin: -4px;
  padding: 4px;
  border-radius: 5px;
  background: #fff;
}

.platform-board .hero-motion-scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.platform-board .hero-motion-dimensions {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: #fff;
  stroke: var(--hero-motion-accent);
}

.platform-board .hero-motion-dimensions :is(path, circle) {
  vector-effect: non-scaling-stroke;
  stroke-width: 1.35px;
}

.platform-board .hero-motion-guides {
  stroke-dasharray: 3 3;
  opacity: .67;
}

.platform-board[data-hero-motion-step="measure"] .hero-motion-dimensions { display: block; }

.platform-board .hero-motion-scan {
  position: absolute;
  z-index: 2;
  top: 12%;
  bottom: 17%;
  left: 8%;
  width: 2px;
  border-radius: 2px;
  background: #254edb;
  opacity: 0;
  pointer-events: none;
}

.platform-board .hero-motion-scan::before,
.platform-board .hero-motion-scan::after {
  content: '';
  position: absolute;
  left: -3px;
  width: 8px;
  height: 2px;
  background: #254edb;
}

.platform-board .hero-motion-scan::before { top: 0; }
.platform-board .hero-motion-scan::after { bottom: 0; }

.platform-board .hero-motion-card {
  position: absolute;
  top: 10px;
  left: 9px;
  display: none;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 18px);
  padding: 7px 9px;
  border: 1px solid #e6c1a9;
  border-radius: 8px;
  background: #fff7ee;
  color: #783d26;
  font-size: 10px;
  line-height: 1.25;
}

.platform-board .hero-motion-card span { min-width: 0; }
.platform-board .hero-motion-card strong,
.platform-board .hero-motion-card small { display: block; }
.platform-board .hero-motion-card small { margin-top: 3px; font-size: .9em; }

.platform-board .hero-motion-offer {
  border-color: #165d48;
  background: #165d48;
  color: #fff;
}

.platform-board[data-hero-motion-step="request"] .hero-motion-request,
.platform-board[data-hero-motion-step="proposal"] .hero-motion-offer { display: flex; }

.platform-board .hero-motion-cursor {
  position: absolute;
  z-index: 3;
  top: 31px;
  left: min(75%, 130px);
  width: 22px;
  height: 22px;
  color: var(--hero-motion-accent);
  opacity: 0;
  pointer-events: none;
  transform-origin: 22% 16%;
}

.platform-board .hero-motion-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.platform-board[data-hero-motion-step="measure"] .hero-motion-cursor { top: 70%; left: 83%; }
.platform-board[data-hero-motion-step="estimate"] .hero-motion-cursor { top: 64%; left: auto; right: 1px; }

.platform-board .hero-motion-progress {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 3px;
  overflow: hidden;
  background: #e5eaf3;
  pointer-events: none;
}

.platform-board .hero-motion-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--hero-motion-accent);
  transform: scaleX(0);
  transform-origin: left;
}

@media (max-width: 640px) {
  .platform-board .hero-motion-controls:not([hidden]) + .board-avatar { display: none; }
  .platform-board .hero-motion-controls button { width: 26px; height: 28px; border-radius: 6px; }
  .platform-board .hero-motion-controls svg { width: 14px; height: 14px; }
  .platform-board[data-hero-motion] .board-pipeline { gap: 3px; }
  .platform-board .board-pipeline [data-hero-motion-select] { padding-inline: 0; font-size: 9px; }
  .platform-board .board-pipeline [data-hero-motion-select]:last-child .hero-motion-step-long { display: none; }
  .platform-board .hero-motion-step-short { display: block; }
  .platform-board .hero-motion-card {
    top: 7px;
    left: 6px;
    gap: 4px;
    max-width: calc(100% - 12px);
    padding: 5px 6px;
    font-size: 9px;
  }
  .platform-board .hero-motion-card svg { width: 13px; height: 13px; }
  .platform-board .hero-motion-cursor { top: 26px; width: 18px; height: 18px; }
}

@media (max-width: 360px) {
  .platform-board .hero-motion-controls { gap: 3px; }
  .platform-board .hero-motion-controls button { width: 24px; height: 26px; }
  .platform-board .board-pipeline [data-hero-motion-select] { font-size: 8px; }
}
