/* ============================================================
   Landing v42 — How-it-works product artifacts (framed)
   Marketing card = stage. Product = inset sample with app chrome.
   State only — no buttons / no page CTAs.
   ============================================================ */

/* ---------- Stage: sits on surface-card marketing tile ---------- */
.how-ui-tile.how-ui-tile--fragment {
  height: auto;
  min-height: 0;
  background: transparent;
  border-top: 0;
  padding: 0 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  pointer-events: none;
  user-select: none;
  cursor: default;
}

/* Kill old screenshot fade on the stage itself */
.how-ui-tile.how-ui-tile--fragment::after {
  display: none;
}

.how-ui-tile.how-ui-tile--fragment img {
  display: none;
}

/* ---------- Product artifact: nested frame ---------- */
.how-product {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 8px 20px rgba(16, 24, 40, 0.06);
  overflow: hidden;
  /* Crop feel — tall enough that totals/status stay readable above fade */
  max-height: 280px;
}

/* Soft bottom fade — intentional crop, not washing primary state */
.how-product::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: linear-gradient(to top, #fff 10%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ---------- App chrome strip ---------- */
.how-product-chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

.how-product-chrome-side {
  font-size: 11.5px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1;
}

.how-product-chrome-side:first-child {
  justify-self: start;
}

.how-product-chrome-side--muted,
.how-product-chrome-side:last-child {
  justify-self: end;
  color: #9ca3af;
}

.how-product-chrome-title {
  justify-self: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ---------- Body ---------- */
.how-product-body,
.how-frag {
  width: 100%;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #111827;
  -webkit-font-smoothing: antialiased;
}

.how-product-body {
  padding: 10px 12px 22px;
  gap: 0;
  background: #fff;
}

/* ---------- Status badges (labels, not controls) ---------- */
.how-frag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.how-frag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.how-frag-badge--quoted {
  background: #f5f3ff;
  color: #7c3aed;
}
.how-frag-badge--quoted .how-frag-dot {
  background: #7c3aed;
}

.how-frag-badge--booked {
  background: #eff6ff;
  color: #1d4ed8;
}
.how-frag-badge--booked .how-frag-dot {
  background: #1d4ed8;
}

.how-frag-badge--awaiting {
  background: #fffbeb;
  color: #b45309;
}
.how-frag-badge--awaiting .how-frag-dot {
  background: #f59e0b;
}

/* Quiet status line (not a button) */
.how-frag-status-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  font-size: 11.5px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.2;
}

.how-frag-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.how-frag-status-dot--wa {
  background: #22c55e;
}

.how-frag-status-dot--amber {
  background: #f59e0b;
}

/* ---------- 01 Quote ---------- */
.how-frag-quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.how-frag-ref {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.how-frag-quote-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.how-frag-quote-sub {
  margin-top: 2px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.how-frag-lines {
  padding: 0;
}

.how-frag-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 12.5px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.how-frag-line span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.how-frag-line span:last-child {
  flex-shrink: 0;
  font-weight: 600;
  color: #111827;
}

.how-frag-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 2px;
  border-top: 1.5px solid #111827;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.how-frag-total span:last-child {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- 02 Jobs ---------- */
.how-frag--jobs {
  gap: 8px;
}

.how-frag-job {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 11px;
}

.how-frag-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.how-frag-job-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.how-frag-job-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
}

.how-frag-job-title {
  font-size: 12.5px;
  color: #6b7280;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.how-frag-job-amt {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.how-frag-job-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.how-frag-job-meta {
  font-size: 11.5px;
  color: #6b7280;
}

/* ---------- 03 Paid ---------- */
.how-frag--paid {
  gap: 0;
}

.how-frag-paid-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.how-frag-paid-job {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: #6b7280;
}

.how-frag-owed {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
}

.how-frag-owed-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.how-frag-owed-amt {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
  line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .how-ui-tile.how-ui-tile--fragment {
    padding: 0 14px 16px;
  }

  .how-product {
    max-height: 272px;
  }
}

@media (max-width: 720px) {
  .how-ui-tile.how-ui-tile--fragment {
    padding: 0 12px 14px;
  }

  .how-product {
    max-height: none;
    min-height: 0;
    border-radius: 12px;
  }

  /* On mobile stack, show full artifact — crop fade is for dense desktop only */
  .how-product::after {
    display: none;
  }

  .how-product-body {
    padding-bottom: 12px;
  }

  .how-frag-owed-amt {
    font-size: 18px;
  }
}

@media (max-width: 400px) {
  .how-ui-tile.how-ui-tile--fragment {
    padding: 0 12px 12px;
  }
}

/* Desktop: equal-height cards; product frames fill stage */
@media (min-width: 981px) {
  .how-ui-tile.how-ui-tile--fragment {
    flex: 1;
    min-height: 0;
    padding: 0 16px 16px;
  }

  .how-product {
    flex: 1;
    max-height: 292px;
    min-height: 260px;
  }

  .how-product-body {
    flex: 1;
  }
}
