/* Live Marketplace browse (marketing) — richer discover chrome */

.mktb-hero { position: relative; }

/* Clean, borderless search + filter row — no frosted box, Notion calm */
.mktb-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center;
  margin-top: 26px;
}
.mktb-search {
  flex: 1 1 240px; max-width: 380px; height: 44px; padding: 0 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
}
.mktb-search::placeholder { color: var(--ink-4); }
.mktb-search:focus { outline: none; border-color: var(--accent); }
.mktb-filters {
  display: flex; flex-wrap: wrap; gap: 8px; width: 100%;
  margin-top: 16px;
}
.mktb-chip {
  appearance: none; border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.mktb-chip span { color: var(--ink-4); font-weight: 500; margin-left: 5px; }
.mktb-chip:hover {
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  color: var(--ink);
}
.mktb-chip.on {
  background: var(--ink); border-color: var(--ink); color: var(--surface);
}
.mktb-chip.on span { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.mktb-status { margin-top: 14px; font-size: 13px; color: var(--ink-3); min-height: 1.2em; }
.mktb-status.err { color: #a0453a; }
.mktb-signed {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 13px; color: var(--ink-2);
  padding: 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.mktb-signed[hidden] { display: none !important; }

/* Featured story strip */
.mktb-stories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 28px;
}
@media (max-width: 960px) { .mktb-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mktb-stories { grid-template-columns: 1fr; } }
.mktb-stories[hidden], .mktb-stories:empty { display: none !important; }
.mktb-story {
  position: relative; display: block; overflow: hidden;
  border-radius: 18px; min-height: 210px; color: #f4f2ee; text-decoration: none;
  box-shadow: 0 12px 30px -22px rgba(12, 18, 28, .4);
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease;
}
.mktb-story:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px -26px rgba(12, 18, 28, .45);
}
.mktb-story .mktb-thumb {
  position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0;
}
.mktb-story .mktb-thumb img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.04);
  transition: transform .45s ease;
}
.mktb-story:hover .mktb-thumb img { transform: scale(1.08); }
.mktb-story::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 28%, rgba(10, 14, 20, .78)),
    linear-gradient(90deg, rgba(10, 14, 20, .35), transparent 55%);
}
.mktb-story-copy {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1;
  display: flex; flex-direction: column; gap: 5px;
}
.mktb-story-eye {
  font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: color-mix(in srgb, #fff 70%, var(--accent));
}
.mktb-story-copy b {
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: #fff;
}
.mktb-story-copy span:last-child {
  font-size: 13px; line-height: 1.4; color: color-mix(in srgb, #fff 72%, transparent);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.mktb-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; margin-top: 8px;
}
@media (max-width: 960px) { .mktb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mktb-grid { grid-template-columns: 1fr; } }
.mktb-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: 16px; overflow: hidden;
  background: var(--surface);
  transition: border-color .18s ease, transform .2s ease, box-shadow .2s ease;
}
.mktb-card:hover {
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -26px color-mix(in srgb, var(--ink) 38%, transparent);
}
.mktb-thumb-link { display: block; color: inherit; text-decoration: none; }
.mktb-thumb {
  aspect-ratio: 16 / 10; background: var(--bg-sunken); overflow: hidden; position: relative;
}
.mktb-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.mktb-card:hover .mktb-thumb img { transform: scale(1.05); }
.mktb-thumb-fallback { width: 100%; height: 100%; }
.mktb-bd { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 18px; flex: 1; }
.mktb-bd h3 a { color: inherit; text-decoration: none; }
.mktb-bd h3 a:hover { color: var(--accent); }
.mktb-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
}
.mktb-cat {
  padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--ink-2);
}
.mktb-feat {
  color: var(--accent);
  padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.mktb-price {
  margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 650; color: var(--ink-2);
  padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.mktb-bd h3 {
  margin: 0; font-size: 17.5px; font-weight: 650; letter-spacing: -.02em; color: var(--ink);
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
}
.mktb-bd p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); flex: 1; }
.mktb-by { font-size: 12px; color: var(--ink-4); }
.mktb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mktb-empty {
  text-align: center; padding: 56px 20px; color: var(--ink-3);
  border-radius: 18px; margin-top: 12px;
  background: color-mix(in srgb, var(--ink) 2.5%, var(--surface));
  border: 1px solid var(--border-subtle);
}
.mktb-empty[hidden] { display: none !important; }
.mktb-source-index { padding-top: var(--sp-12); border-top: 1px solid var(--border-subtle); }
.mktb-source-index .mk-lede { max-width: 720px; margin-top: var(--sp-4); }
.mktb-source-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-6); margin-top: var(--sp-8); }
.mktb-source-links a { color: var(--ink-2); font-size: 14px; line-height: 1.45; text-decoration: none; }
.mktb-source-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) { .mktb-source-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mktb-source-links { grid-template-columns: 1fr; } }
.mktb-empty h3 {
  color: var(--ink); margin: 0 0 8px;
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size: 24px; font-weight: 600; letter-spacing: -.02em;
}

/* Soft reveal for cards */
.mktb-card, .mktb-story {
  animation: mktb-fadeup .45s ease both;
}
.mktb-grid .mktb-card:nth-child(2), .mktb-stories .mktb-story:nth-child(2) { animation-delay: .05s; }
.mktb-grid .mktb-card:nth-child(3), .mktb-stories .mktb-story:nth-child(3) { animation-delay: .1s; }
.mktb-grid .mktb-card:nth-child(4) { animation-delay: .14s; }
.mktb-grid .mktb-card:nth-child(5) { animation-delay: .18s; }
.mktb-grid .mktb-card:nth-child(6) { animation-delay: .22s; }
@keyframes mktb-fadeup {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .mktb-card, .mktb-story { animation: none !important; }
  .mktb-card:hover, .mktb-story:hover { transform: none; }
  .mktb-card:hover .mktb-thumb img, .mktb-story:hover .mktb-thumb img { transform: none; }
}

/* Detail */
.mktb-thumb-hero {
  aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 75%, transparent);
  box-shadow: 0 22px 44px -28px color-mix(in srgb, var(--ink) 45%, transparent);
}
.mktd-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 4vw, 48px); align-items: start;
}
@media (max-width: 860px) { .mktd-layout { grid-template-columns: 1fr; } }
.mktd-copy .mk-h1 { font-size: clamp(28px, 4vw, 40px); }
.mktd-facts {
  display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px;
  font-size: 13px; color: var(--ink-3);
}
.mktd-facts span {
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
  color: var(--ink-2); font-weight: 600;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent);
}
.mktd-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-3); max-width: 42ch; }
.mktd-related { margin-top: clamp(40px, 6vw, 72px); }
.mktd-related h2 {
  margin: 0 0 18px; font-size: 22px; letter-spacing: -.02em; color: var(--ink);
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
}
.mktd-related-grid { margin-top: 0; }
.mktd-static-fallback {
  max-width: 640px; margin: 0 auto; padding: clamp(36px, 6vw, 64px) 0;
  color: var(--ink-2); text-align: center;
}
.mktd-static-fallback h1 {
  margin: 0 0 10px; color: var(--ink);
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.08;
}
.mktd-static-fallback p { margin: 0 auto 14px; max-width: 48ch; font-size: 15px; line-height: 1.6; }
.mktd-static-fallback p:last-child { margin-bottom: 0; }
.mktd-static-fallback a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--accent); color: var(--accent-fg); font-size: 14px; font-weight: 600;
  text-decoration: none; box-shadow: var(--shadow-sm);
}
.mktd-static-fallback a:hover { background: var(--accent-600); }
.mktd-miss { text-align: center; padding: 48px 16px; max-width: 480px; margin: 0 auto; }
.mktd-miss h1 { margin: 0 0 10px; font-size: 28px; color: var(--ink); }
.mktd-miss p { margin: 0 0 18px; color: var(--ink-3); }
