/* Market Pulse: shared homepage typography, compact image cards and icon tags.
   The last card is an intentional, continuous visual generation state. */
.home-page .market-digest {
  --market-plum: #48233c;
  background: #fff8f5;
}
.market-digest-heading .market-digest-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-inline: auto !important;
}
.market-label-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  color: #f92064;
  background: currentColor;
  box-shadow: 0 0 0 2px #f920641f;
}
.market-label-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  animation: market-label-pulse 2.8s cubic-bezier(.2, .65, .3, 1) infinite;
}
@keyframes market-label-pulse {
  0% { opacity: .5; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.8); }
}
.market-digest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.market-digest-tile {
  --market-tag-inset: 20px;
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 500 / 560;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  background: var(--market-plum);
}
.market-digest-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}
/* Pink veils keep the approved photography natural above the captions. */
.market-digest-tile:not(.market-digest-tile--generating)::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #f9206400 38%, #f9206433 56%, #e71b62bf 78%, #d81859 100%);
}
.market-digest-tag {
  position: absolute;
  z-index: 2;
  top: var(--market-tag-inset);
  left: var(--market-tag-inset);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 6px 10px;
  border: 1px solid #fff8f580;
  border-radius: 999px;
  background: #fff8f5d9;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--market-plum);
  font: 500 12px/1.25 var(--text);
  letter-spacing: -.01em;
}
/* Source badges: use the same 29px height as category tags. */
.market-digest-sources {
  position: absolute;
  z-index: 2;
  top: var(--market-tag-inset);
  right: var(--market-tag-inset);
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.market-digest-sources li + li { margin-left: -11px; }
.market-digest-source {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #fff8f5e6;
  overflow: hidden;
  border-radius: 50%;
  background: #fff8f5;
  box-shadow: 0 1px 3px #48233c29;
}
.market-digest-source img { display: block; width: 17px; height: 17px; object-fit: contain; }

.market-digest-source--x { background: #000; }
.market-digest-source--x img { width: 100%; height: 100%; }
.market-digest-source--more {
  color: var(--market-plum);
  font: 500 11px/1 var(--text);
  font-variant-numeric: tabular-nums;
}

.market-digest-time {
  flex: none;
  color: #fff8f5c7;
  font: 500 11px/15px var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.market-digest-tag svg { width: 14px; height: 14px; flex: none; }
.market-digest-caption {
  position: absolute;
  z-index: 2;
  inset: auto 0 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding-inline: 26px;
}
.home-page .market-digest-caption h3 {
  flex: 1 1 220px;
  color: #fff8f5;
  font: 400 25px/1.22 var(--text);
  letter-spacing: -.035em;
  margin: 0;
  text-wrap: pretty;
}
/* A diagonal dot wave is the generation preview, not an unfinished photograph. */
.market-digest-tile--generating {
  background: #fff0f3;
}
.market-generation { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.market-generation-grid { display: block; width: 100%; height: 100%; }
.market-generation-status {
  position: absolute;
  z-index: 2;
  top: var(--market-tag-inset);
  left: var(--market-tag-inset);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 29px;
  padding: 6px 10px;
  border: 1px solid #ffffffa6;
  border-radius: 999px;
  /* Same raised pink material as the selected story pill above. */
  background: radial-gradient(ellipse at 50% -42%, #ffffffa8 0%, #ffffff00 65%), linear-gradient(180deg, #ff93b7 0%, #f92064 40%, #ee1c5d 76%, #ff9aba 140%);
  box-shadow: inset 0 1px 2px #fff, inset 0 -1px 3px #ffffffa6, inset 3px 0 5px #ffffff4d, inset -3px 0 5px #ffffff4d, 0 2px 6px -3px #941c4540;
  color: #fff8f5;
  font: 500 12px/1.25 var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.market-generation-dots { display: inline-flex; align-items: center; gap: 3px; }
.market-generation-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  animation: market-generation-dot 2.4s ease-in-out infinite;
}
.market-generation-dots span:nth-child(2) { animation-delay: .2s; }
.market-generation-dots span:nth-child(3) { animation-delay: .4s; }
.market-generation-label {
  color: #fff8f5;
  background-image: linear-gradient(105deg, #fff8f5bf 32%, #fff8f5bf 40%, #fff 50%, #fff8f5bf 60%, #fff8f5bf 68%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: market-generation-text 4.8s linear infinite;
}
@keyframes market-generation-dot {
  0%, 60%, 100% { opacity: .4; transform: scale(.8); }
  30% { opacity: 1; transform: scale(1); }
}
@keyframes market-generation-text {
  from { background-position: 125% 50%; }
  to { background-position: -25% 50%; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .market-digest-grid { gap: 16px; }
  .market-digest-tile { --market-tag-inset: 16px; }
  .market-digest-caption { padding-inline: 22px; bottom: 24px; }
  .home-page .market-digest-caption h3 { font-size: 23px; }
}
@media (max-width: 900px) {
  .market-digest-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 420px; margin-inline: auto; }
  .market-digest-tile { aspect-ratio: 1.15; min-height: 280px; }
  .market-digest-tile { --market-tag-inset: 18px; }
  .market-digest-caption { bottom: 24px; padding-inline: 24px; }
  .home-page .market-digest-caption h3 { font-size: 24px; }
}
@media (max-width: 360px) {
  .market-digest-caption { padding-inline: 22px; }
  .home-page .market-digest-caption h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .market-label-dot::after { animation: none; opacity: 0; }
  .market-generation-label { animation: none; background: none; -webkit-text-fill-color: currentColor; }
  .market-generation-dots span { animation: none; opacity: .7; transform: none; }
}
