:root {
  --market-orange: #e16f2a;
  --market-bright: #ff4b16;
  --market-ink: #071021;
  --market-muted: #5e687b;
  --market-line: #e6eaf1;
}

.market-page {
  color: var(--market-ink);
  background: #fff;
  overflow: hidden;
}

.market-container {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}

.market-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 32px;
  align-items: center;
  padding: 42px 0 38px;
}

.market-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: #fff2ec;
  color: var(--market-bright);
  border: 1px solid #ffd4c4;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 900;
}

.market-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(3.4rem, 5vw, 5.25rem);
  line-height: 1;
  font-weight: 900;
}

.market-copy h1 span,
.market-platform-card h2 span,
.market-section-intro span,
.market-final h2 span {
  color: var(--market-bright);
}

.market-copy h2 {
  margin: 0 0 22px;
  color: #1f66d1;
  font-size: clamp(1.12rem, 1.45vw, 1.45rem);
  line-height: 1.35;
  font-weight: 900;
  white-space: nowrap;
}

.market-copy p {
  max-width: 560px;
  margin: 0 0 28px;
  color: #2f394a;
  font-size: 1.05rem;
  line-height: 1.75;
}

.market-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 28px;
}

.market-metrics span {
  padding: 0 20px;
  border-right: 1px solid var(--market-line);
  font-size: .86rem;
  font-weight: 900;
  line-height: 1.35;
}

.market-metrics span:first-child {
  padding-left: 0;
}

.market-metrics span:last-child {
  border-right: 0;
}

.market-metrics b {
  display: block;
  margin: 8px 0 2px;
  font-size: 1rem;
}

.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.market-btn {
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 900;
  font-size: .9rem;
}

.market-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff5618, var(--market-orange));
  box-shadow: 0 12px 24px rgba(225, 111, 42, .22);
}

.market-secondary {
  color: var(--market-ink);
  background: #fff;
  border: 1px solid rgba(225, 111, 42, .68);
}

.market-platform-card > h2 {
  margin: 0 0 18px;
  text-align: center;
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.08;
  font-weight: 900;
}

.market-panel {
  padding: 32px 38px 28px;
  border: 1px solid var(--market-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(7, 16, 33, .08);
}

.market-logo {
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.market-logo b {
  grid-row: 1 / span 2;
  color: var(--market-bright);
  font-size: 3rem;
  line-height: 1;
}

.market-logo strong {
  font-size: 1.5rem;
  font-weight: 900;
}

.market-logo small {
  text-transform: uppercase;
  font-weight: 900;
}

.market-panel > p {
  margin: 0 0 12px;
  font-weight: 900;
}

.market-logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.market-logo-grid span {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--market-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(7, 16, 33, .06);
  font-size: 1rem;
  font-weight: 900;
}

.market-mini-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
}

.market-mini-actions span {
  text-align: center;
  font-weight: 900;
  line-height: 1.25;
  border-right: 1px solid var(--market-line);
}

.market-mini-actions span:last-child {
  border-right: 0;
}

.market-platform {
  display: grid;
  grid-template-columns: 1.55fr repeat(5, 1fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--market-line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(7, 16, 33, .05);
}

.market-section-intro {
  padding: 28px 24px 20px 0;
  border-right: 1px solid var(--market-line);
}

.market-section-intro h2 {
  margin: 0 0 24px;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  line-height: 1.12;
  font-weight: 900;
}

.market-section-intro p,
.market-platform article p,
.market-model-grid p,
.market-why p,
.market-bottom p,
.market-final p {
  margin: 0;
  color: #344054;
  font-size: .96rem;
  line-height: 1.65;
}

.market-platform article {
  padding: 0 12px;
  border-right: 1px solid var(--market-line);
}

.market-platform article:last-child {
  border-right: 0;
}

.market-platform img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(7, 16, 33, .12);
}

.market-platform h3 {
  margin: 20px 0 12px;
  font-size: 1.02rem;
  font-weight: 900;
}

.market-categories,
.market-featured,
.market-why,
.market-bottom,
.market-final {
  padding: 36px 0 0;
}

.market-categories h2,
.market-featured h2,
.market-why h2 {
  margin: 0 0 24px;
  text-align: center;
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 900;
}

.market-category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--market-line);
}

.market-category-grid article {
  position: relative;
  text-align: center;
}

.market-category-grid img {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  border-radius: 7px;
}

.market-category-grid .agi-icon {
  width: 42px;
  height: 42px;
  margin: -22px auto 8px;
  padding: 9px;
  display: flex;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(225, 111, 42, .14);
}

.market-category-grid h3 {
  margin: 0;
  font-size: .82rem;
  line-height: 1.2;
  font-weight: 900;
}

.market-model-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.market-model-grid article {
  padding: 22px;
  min-height: 210px;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-content: start;
  column-gap: 10px;
  border: 1px solid var(--market-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(7, 16, 33, .05);
}

.market-model-grid .logo {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 12px;
  grid-row: 1 / span 2;
}

.market-model-grid .open { background: #16a37a; }
.market-model-grid .claude { background: #c4a17e; color: #111827; }
.market-model-grid .gemini { background: #eaf0ff; color: #5d70ff; }
.market-model-grid .meta { background: #e8f3ff; color: #0b83ff; }
.market-model-grid .mistral { background: #ffd890; color: #b43200; }
.market-model-grid .nvidia { background: #eaf9df; color: #64a91b; }

.market-model-grid h3 {
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 900;
}

.market-model-grid small {
  display: block;
  margin: 4px 0 18px;
  font-size: .74rem;
  font-weight: 900;
}

.market-model-grid p,
.market-model-grid a {
  grid-column: 1 / -1;
}

.market-model-grid a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--market-bright);
  text-decoration: none;
  font-weight: 900;
}

.market-why-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding-bottom: 30px;
}

.market-why-row article {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 14px;
  padding: 8px 24px;
  border-right: 1px solid var(--market-line);
}

.market-why-row article:last-child {
  border-right: 0;
}

.market-why-row h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 900;
}

.market-why-row p {
  grid-column: 2;
}

.market-bottom {
  display: grid;
  grid-template-columns: 1.08fr 1.36fr 1.12fr;
  gap: 20px;
}

.market-bottom article {
  padding: 24px;
  border: 1px solid var(--market-line);
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(7, 16, 33, .05);
}

.market-bottom h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 900;
}

.market-builders > div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
}

.market-builders img {
  width: 82px;
  height: 92px;
  object-fit: cover;
  border-radius: 7px;
}

.market-builders b,
.market-builders a {
  display: block;
  margin-bottom: 8px;
  color: var(--market-ink);
  font-weight: 900;
}

.market-builders a {
  margin: 10px 0 0;
  color: var(--market-bright);
  text-decoration: none;
}

.market-orgs,
.market-ecosystem > div {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: center;
}

.market-orgs span {
  color: #0d4ec9;
  text-align: center;
  font-weight: 900;
}

.market-orgs small {
  display: block;
  margin-top: 8px;
  color: #687385;
  font-size: .65rem;
  text-transform: uppercase;
}

.market-ecosystem > div {
  grid-template-columns: repeat(2, 1fr);
}

.market-ecosystem span {
  min-width: 0;
  min-height: 92px;
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(7, 16, 33, .06);
  font-weight: 900;
  font-size: .86rem;
}

.market-ecosystem b {
  margin-bottom: 8px;
  color: var(--market-bright);
  font-size: 1.32rem;
}

.market-final {
  margin-top: 28px;
  margin-bottom: 34px;
  padding: 28px 34px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 28px;
  align-items: center;
  border-radius: 12px;
  background: linear-gradient(90deg, #f7fbff, #eff6ff);
  border: 1px solid var(--market-line);
}

.market-final .market-actions {
  flex-wrap: nowrap;
}

.market-final .market-btn {
  padding: 0 16px;
  font-size: .84rem;
}

.market-final h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.08;
  font-weight: 900;
}

.market-final p {
  margin-bottom: 22px;
}

.market-final img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.agi-icon.clipboard { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='12' height='16' rx='2'/%3E%3Cpath d='M9 4a3 3 0 0 1 6 0M9 9h6M9 13h6M9 17h4'/%3E%3C/svg%3E"); }
.agi-icon.target { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v4M12 18v4M2 12h4M18 12h4'/%3E%3C/svg%3E"); }

@media (max-width: 1120px) {
  .market-container {
    width: min(100% - 36px, 960px);
  }

  .market-hero,
  .market-platform,
  .market-bottom,
  .market-final {
    grid-template-columns: 1fr;
  }

  .market-section-intro {
    border-right: 0;
    border-bottom: 1px solid var(--market-line);
  }

  .market-category-grid,
  .market-model-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .market-why-row,
  .market-logo-grid,
  .market-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .market-why-row article,
  .market-metrics span {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .market-container {
    width: min(100% - 28px, 520px);
  }

  .market-copy h1 {
    font-size: 3.15rem;
  }

  .market-copy h2 {
    white-space: normal;
  }

  .market-actions,
  .market-btn {
    width: 100%;
  }

  .market-logo-grid,
  .market-mini-actions,
  .market-category-grid,
  .market-model-grid,
  .market-why-row,
  .market-bottom,
  .market-orgs,
  .market-ecosystem > div,
  .market-builders > div,
  .market-metrics {
    grid-template-columns: 1fr;
  }

  .market-panel,
  .market-platform,
  .market-final {
    padding: 22px;
  }
}
