/* Vibe Lab Exchange (exchange.html), 2026-10-15.
   Loads after styles.css, services.css and podcast.css and reuses their colors, type and components. */

.exchange-hero h1 {
  font-size: clamp(48px, 7.4vw, 96px);
}

.exchange-tagline {
  margin-top: 14px;
  color: var(--safety-lime);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 900;
  line-height: 1.1;
}

.exchange-hero .hero-copy a {
  color: var(--paper);
  text-decoration-color: rgba(164, 214, 94, 0.7);
  text-underline-offset: 3px;
}

.exchange-stats {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.exchange-stats li {
  display: grid;
  gap: 2px;
  min-width: 140px;
  border: 1px solid rgba(242, 245, 244, 0.22);
  border-radius: 8px;
  background: rgba(242, 245, 244, 0.06);
  padding: 12px 16px;
}

.exchange-stats b {
  color: var(--safety-lime);
  font-size: 30px;
  line-height: 1;
}

.exchange-stats span {
  color: #a9bab6;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Spotlight */
.exchange-spotlight {
  justify-self: end;
  width: 100%;
  max-width: 440px;
  display: grid;
  justify-items: start;
  gap: 12px;
  border: 4px solid var(--safety-lime);
  border-radius: 10px;
  background: var(--drafting-blue-2);
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.spotlight-label {
  color: var(--safety-lime);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spotlight-title {
  color: var(--paper);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 900;
  line-height: 1.05;
}

.spotlight-problem {
  color: #dbe5e2;
  font-size: 17px;
  line-height: 1.45;
}

.exchange-spotlight dl {
  width: 100%;
  margin: 4px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 245, 244, 0.16);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 15px;
}

.exchange-spotlight dt {
  color: #a9bab6;
  font-weight: 800;
}

.exchange-spotlight dd {
  margin: 0;
  color: var(--paper);
}

.spotlight-status {
  border-radius: 999px;
  background: var(--shop-amber);
  color: var(--drafting-blue);
  padding: 6px 14px;
  font-weight: 900;
}

.exchange-spotlight .build-link {
  color: var(--safety-lime);
}

/* Source badges */
.build-source {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.build-source-podcast {
  background: var(--safety-lime);
  color: var(--drafting-blue);
}

.build-source-event {
  background: var(--shop-amber);
  color: var(--drafting-blue);
}

.build-source-community {
  background: var(--access-teal);
  color: var(--paper);
}

.exchange-sources article {
  display: grid;
  align-content: start;
  gap: 4px;
}

.exchange-sources .build-source {
  margin-bottom: 8px;
}

.exchange-sources strong {
  color: var(--drafting-blue);
}

/* Filters */
.exchange-filters {
  max-width: var(--max);
  margin: 0 auto 24px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chalk);
  padding: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.filter-label {
  min-width: 64px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--drafting-blue);
  cursor: pointer;
  padding: 6px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.filter-chips button:hover {
  border-color: var(--access-teal);
}

.filter-chips button[aria-pressed="true"] {
  border-color: var(--drafting-blue);
  background: var(--drafting-blue);
  color: var(--safety-lime);
}

.filter-chips button:focus-visible,
.filter-row select:focus-visible,
.filter-row input:focus-visible {
  outline: 3px solid var(--access-teal);
  outline-offset: 2px;
}

.filter-row-inputs label {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-search {
  flex: 1;
  min-width: 240px;
}

.filter-row select,
.filter-row input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--text);
  padding: 8px 12px;
  font: inherit;
  font-size: 16px;
}

.filter-search input {
  flex: 1;
  min-width: 0;
}

.build-count {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

/* Build cards */
.build-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.build-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--safety-lime);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  scroll-margin-top: 90px;
}

.build-card[data-source="event"] {
  border-top-color: var(--shop-amber);
}

.build-card[data-source="community"] {
  border-top-color: var(--access-teal);
}

.build-card[data-upcoming] {
  background: var(--chalk);
  border-top-style: dashed;
}

.build-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.build-type {
  color: var(--muted);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.build-card h3 {
  color: var(--drafting-blue);
  font-size: 22px;
  line-height: 1.12;
}

.build-pathway {
  color: var(--access-teal);
  font-weight: 800;
}

.build-problem {
  color: #33464d;
  font-size: 16px;
  line-height: 1.48;
}

.build-card dl {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.build-card dt {
  color: var(--muted);
  font-weight: 800;
}

.build-card dd {
  margin: 0;
  color: #33464d;
}

.build-status {
  width: fit-content;
  border: 1px dashed var(--shop-amber);
  border-radius: 999px;
  color: #8a5c00;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 800;
}

.build-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-top: 6px;
}

.build-links:empty {
  display: none;
}

.build-try {
  min-height: 40px;
  padding: 8px 16px;
  background: var(--drafting-blue);
  color: var(--paper);
}

.build-try:hover,
.build-try:focus-visible {
  background: var(--access-teal);
}

.build-link {
  color: var(--access-teal);
  font-weight: 900;
  text-decoration: none;
}

.build-link::after {
  content: " \2192";
}

.build-link:hover,
.build-link:focus-visible {
  text-decoration: underline;
}

.build-empty {
  max-width: var(--max);
  margin: 0 auto;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--chalk);
  color: #33464d;
  padding: 28px;
  font-size: 17px;
  text-align: center;
}

.build-empty a {
  color: var(--access-teal);
  font-weight: 900;
}

/* Submit */
.exchange-submit {
  scroll-margin-top: 72px;
}

.submit-rules {
  border: 1px solid rgba(242, 245, 244, 0.16);
  border-top: 6px solid var(--shop-amber);
  border-radius: 8px;
  background: rgba(242, 245, 244, 0.06);
  padding: 24px;
}

.submit-rules h3 {
  margin-bottom: 14px;
  color: var(--safety-lime);
  font-size: 22px;
}

.submit-rules ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: #dbe5e2;
  font-size: 16px;
  line-height: 1.45;
}

@media (max-width: 1040px) {
  .build-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exchange-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  }
}

@media (max-width: 820px) {
  .exchange-hero,
  .exchange-sources {
    grid-template-columns: 1fr;
  }

  .exchange-spotlight {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .build-grid {
    grid-template-columns: 1fr;
  }

  .filter-row-inputs label {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-row select,
  .filter-search input {
    width: 100%;
  }
}

/* Build screenshots (2026-10-16) */
.build-thumb {
  display: block;
  margin: -22px -22px 6px;
  border-bottom: 1px solid var(--line);
  border-radius: 2px 2px 0 0;
  overflow: hidden;
  background: var(--chalk);
}

.build-thumb img,
.spotlight-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 730;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.25s ease;
}

a.build-thumb:hover img,
a.spotlight-thumb:hover img {
  transform: scale(1.03);
}

.spotlight-thumb {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 2px solid rgba(242, 245, 244, 0.25);
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .build-thumb img,
  .spotlight-thumb img {
    transition: none;
  }
}

/* Keep the spotlight compact when it has a screenshot */
.exchange-spotlight:has(.spotlight-thumb) .spotlight-title {
  font-size: clamp(22px, 2.2vw, 28px);
}

.exchange-spotlight:has(.spotlight-thumb) .spotlight-problem {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
}

.exchange-spotlight:has(.spotlight-thumb) dl {
  margin-top: 0;
}

/* Showcase apps in the Exchange (2026-11-09): standards, starter prompt, static spotlight fallback */
.build-standards h4 {
  margin: 0 0 6px;
  color: var(--drafting-blue);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.build-standards ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.build-standards li {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--chalk);
  color: var(--drafting-blue);
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.build-prompt {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.build-prompt summary {
  cursor: pointer;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--access-teal);
  font-weight: 900;
  list-style: none;
}

.build-prompt summary::-webkit-details-marker {
  display: none;
}

.build-prompt summary::after {
  content: "+";
  font-size: 22px;
  line-height: 1;
}

.build-prompt[open] summary::after {
  content: "\2013";
}

.build-prompt pre {
  margin: 6px 0 0;
  max-height: 240px;
  overflow: auto;
  border-radius: 8px;
  background: var(--drafting-blue);
  color: #dbe5e2;
  padding: 12px 14px;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.build-copy {
  margin-top: 8px;
  min-height: 36px;
  border: 1px solid var(--drafting-blue);
  border-radius: 999px;
  background: var(--paper);
  color: var(--drafting-blue);
  cursor: pointer;
  padding: 6px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.build-copy:hover {
  background: var(--drafting-blue);
  color: var(--paper);
}

.build-prompt summary:focus-visible,
.build-copy:focus-visible {
  outline: 3px solid var(--access-teal);
  outline-offset: 2px;
}

.spotlight-static {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid rgba(242, 245, 244, 0.25);
  border-radius: 6px;
}

.exchange-sources p a {
  color: var(--access-teal);
  font-weight: 800;
}
