/* ==========================================================================
   Dabba Progress · DS-010 · TheLayoutLoft Parts Line
   Part styles only — all selectors prefixed .db- . Drop-in safe.
   Skin: hairline teal progress wire; on stall the tip bunches into coils
   and the zone tints amber. Own palette/timings.
   ========================================================================== */

.db-host {
  --db-tint: #B45309;
  position: relative; padding: 14px 4px 4px;
}
.db-track {
  position: relative; height: 4px; border-radius: 2px;
  background: #232A3A;
  transition: background .4s, box-shadow .4s;
}
.db-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #0D9488, #2DD4BF);
  transition: width .35s cubic-bezier(.3,.8,.4,1), background .4s;
}
.db-fill::after {                       /* moving shine while running */
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg,
    transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
  background-size: 60px 100%;
  animation: db-shine 1.4s linear infinite;
}
@keyframes db-shine { to { background-position: 60px 0; } }

/* --- squiggle at the tip ---------------------------------------------------- */
.db-squig {
  position: absolute; top: 50%; margin-top: -13px;
  opacity: 0; transition: opacity .18s;
  pointer-events: none; overflow: visible;
}
.db-squig-p {
  fill: none; stroke: #2DD4BF; stroke-width: 3;
  stroke-linecap: round;
  transition: stroke .3s;
}
.db-stalled .db-squig-p { stroke: var(--db-tint, #B45309); }

/* --- stalled tint over the zone -------------------------------------------- */
.db-stalled .db-track {
  background: #2E2619;
  box-shadow: 0 0 0 6px rgba(180,83,9,.10), 0 0 22px rgba(180,83,9,.22);
}
.db-stalled .db-fill {
  background: linear-gradient(90deg, #92610E, var(--db-tint, #B45309));
}
.db-stalled .db-fill::after { animation-play-state: paused; }

/* --- done -------------------------------------------------------------------- */
.db-done .db-fill { background: linear-gradient(90deg, #0D9488, #34D399); }
.db-done .db-fill::after { animation: none; opacity: 0; }

/* --- label + SR -------------------------------------------------------------- */
.db-tag {
  margin-top: 10px;
  font: 600 11px/1.4 ui-monospace, monospace; letter-spacing: .08em;
  color: #6B7386; text-transform: uppercase;
  transition: color .3s;
}
.db-stalled .db-tag { color: var(--db-tint, #B45309); }
.db-done .db-tag { color: #34D399; }

.db-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .db-fill, .db-track, .db-tag, .db-squig { transition: none; }
  .db-fill::after { animation: none; }
}

/* phone view: demo stage is designed ~900px wide — zoom the page down on small screens */
@media (max-width: 430px) { body { zoom: .40; } }
@media (min-width: 431px) and (max-width: 560px) { body { zoom: .52; } }
@media (min-width: 561px) and (max-width: 720px) { body { zoom: .65; } }
@media (min-width: 721px) and (max-width: 860px) { body { zoom: .78; } }
