.ecosystem-page {
  --eco-radius: 14px;
}

.ecosystem-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--section-pad-h) 42px;
}

.ecosystem-hero,
.ecosystem-grid,
.ecosystem-split {
  display: grid;
  gap: 18px;
}

.ecosystem-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: stretch;
  margin-bottom: 18px;
}

.ecosystem-split {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
  margin-bottom: 18px;
}

.ecosystem-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.ecosystem-panel,
.ecosystem-card,
.ecosystem-hero-copy,
.ecosystem-summary {
  border: 1px solid var(--card-border);
  border-radius: var(--eco-radius);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.ecosystem-hero-copy {
  padding: clamp(26px, 4vw, 46px);
}

.ecosystem-summary,
.ecosystem-panel,
.ecosystem-card {
  padding: 20px;
}

.ecosystem-kicker {
  margin: 0 0 10px;
  color: var(--brand-green);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.ecosystem-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.ecosystem-panel h2,
.ecosystem-card h3,
.ecosystem-summary h2 {
  margin: 0 0 8px;
}

.ecosystem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.ecosystem-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgba(128,128,128,.18);
  border-radius: 999px;
  color: inherit;
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ecosystem-action.primary {
  border-color: transparent;
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: 0 14px 30px rgba(4,106,56,.22);
}

.ecosystem-action:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(4,106,56,.42);
}

.ecosystem-action:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.ecosystem-summary {
  display: grid;
  gap: 12px;
}

.ecosystem-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ecosystem-metric {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(128,128,128,.14);
  border-radius: 10px;
  background: rgba(128,128,128,.055);
}

.ecosystem-metric span,
.ecosystem-card span,
.ecosystem-layer span {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-orange);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.ecosystem-metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.ecosystem-form {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.ecosystem-field label {
  display: block;
  margin-bottom: 7px;
  font-size: .82rem;
  font-weight: 700;
}

.ecosystem-field input,
.ecosystem-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(128,128,128,.2);
  border-radius: 10px;
  color: inherit;
  background: rgba(128,128,128,.08);
  font: inherit;
}

.ecosystem-status {
  min-height: 22px;
  margin: 0;
  font-size: .84rem;
}

.ecosystem-status.error {
  color: #ff6b6b;
}

.ecosystem-status.success {
  color: var(--brand-green);
}

.ecosystem-qr {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 210px;
  margin-top: 14px;
  border: 1px solid rgba(128,128,128,.2);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.14) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0,0,0,.14) 1px, transparent 1px),
    radial-gradient(circle at 22% 18%, rgba(4,106,56,.18), transparent 30%),
    radial-gradient(circle at 82% 78%, rgba(255,103,31,.18), transparent 30%),
    rgba(128,128,128,.06);
  background-size: 18px 18px, 18px 18px, auto, auto, auto;
  text-align: center;
}

.ecosystem-qr strong {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: .9;
}

.ecosystem-qr code {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(128,128,128,.12);
  overflow-wrap: anywhere;
  font-size: .76rem;
}

.ecosystem-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ecosystem-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(128,128,128,.14);
  border-radius: 10px;
  background: rgba(128,128,128,.055);
}

.ecosystem-row strong,
.ecosystem-row small {
  display: block;
}

.ecosystem-row small,
.ecosystem-card p,
.ecosystem-panel p {
  color: var(--text-muted);
}

body.theme-dark .ecosystem-row small,
body.theme-dark .ecosystem-card p,
body.theme-dark .ecosystem-panel p {
  color: #aaa;
}

.ecosystem-amount {
  color: var(--brand-green);
  font-weight: 800;
  white-space: nowrap;
}

.ecosystem-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
}

.ecosystem-card .ecosystem-actions {
  margin-top: auto;
}

.ecosystem-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.ecosystem-price b {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(128,128,128,.1);
  font-size: .78rem;
}

.ecosystem-layers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.ecosystem-layer {
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(128,128,128,.14);
  border-radius: 10px;
  background: rgba(128,128,128,.055);
}

.ecosystem-locked {
  display: none;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255,103,31,.32);
  border-radius: var(--eco-radius);
  background: rgba(255,103,31,.08);
}

.ecosystem-locked.active {
  display: block;
}

@media (max-width: 980px) {
  .ecosystem-hero,
  .ecosystem-split,
  .ecosystem-grid,
  .ecosystem-layers {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ecosystem-main {
    padding-top: 22px;
    padding-bottom: 30px;
  }

  .ecosystem-metric-grid,
  .ecosystem-row {
    grid-template-columns: 1fr;
  }
}

/* ======================================================
   Pro eco-* design system (merchant + marketplace)
====================================================== */

/* ── Stripe ── */
.eco-stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--brand-green) 33.3%, #e5e5e5 33.3% 66.6%, var(--brand-orange) 66.6%);
}

/* ── Main ── */
.eco-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.5rem var(--section-pad-h) 5rem;
}

/* ── Kicker ── */
.eco-kicker {
  margin: 0 0 .6rem;
  color: var(--brand-green);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* ── Hero ── */
.eco-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 380px;
  gap: clamp(1.5rem,4vw,3rem);
  align-items: center;
  margin-bottom: 1.75rem;
}

.eco-hero-copy h1 {
  margin: .5rem 0 1rem;
  font-size: clamp(2rem,4vw,3rem);
  line-height: 1.1;
  font-weight: 800;
}

.eco-hero-desc {
  font-size: .92rem;
  line-height: 1.7;
  max-width: 520px;
  color: var(--text-muted);
}

body.theme-dark .eco-hero-desc { color: rgba(255,255,255,.52); }

/* ── Merchant identity card ── */
.eco-merchant-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.08),
    inset 0 1px 0 rgba(255,255,255,.1);
}

.eco-merchant-card-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(255,103,31,.55) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(4,106,56,.5) 0%, transparent 50%),
    linear-gradient(145deg, #1a0a02 0%, #0f0f0f 50%, #021a0a 100%);
}

.eco-merchant-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 38px,
    rgba(255,255,255,.012) 38px,
    rgba(255,255,255,.012) 39px
  );
}

.eco-merchant-card-inner {
  position: relative;
  height: 100%;
  padding: clamp(.9rem,4%,1.4rem) clamp(1.1rem,5%,1.65rem);
  display: flex;
  flex-direction: column;
  color: #fff;
  gap: .3rem;
}

.eco-merchant-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .25rem;
}

.eco-merchant-badge {
  padding: .25rem .7rem;
  border-radius: 999px;
  background: rgba(255,103,31,.2);
  border: 1px solid rgba(255,103,31,.4);
}

.eco-merchant-badge span {
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.eco-merchant-icon { font-size: 1.6rem; }

.eco-merchant-name {
  font-size: clamp(1rem,4cqw,1.4rem);
  font-weight: 800;
  line-height: 1.2;
  flex: 1;
}

.eco-merchant-hdi {
  font-size: .68rem;
  font-family: monospace;
  opacity: .65;
  display: block;
}

.eco-merchant-wallet {
  font-size: .6rem;
  font-family: monospace;
  opacity: .42;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eco-merchant-footer {
  display: flex;
  gap: 1.25rem;
  margin-top: auto;
}

.eco-merchant-footer div {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.eco-merchant-footer span {
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: .48;
}

.eco-merchant-footer strong {
  font-size: .75rem;
  font-weight: 700;
}

/* ── Marketplace status card ── */
.eco-market-card {
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.eco-market-card-inner { padding: 1.75rem; }

.eco-market-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1rem;
}

.eco-market-metric {
  padding: .9rem 1rem;
  border: 1px solid rgba(128,128,128,.12);
  border-radius: 12px;
  background: rgba(128,128,128,.055);
}

.eco-market-metric--wide { grid-column: 1 / -1; }

.eco-market-metric span {
  display: block;
  margin-bottom: .3rem;
  color: var(--brand-orange);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.eco-market-metric strong {
  display: block;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

/* ── Stats bar ── */
.eco-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-border);
}

.eco-stat {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
}

.eco-stat span {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.eco-stat strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-green);
}

/* ── Panel ── */
.eco-panel {
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.eco-panel h2 { margin: .25rem 0 .5rem; font-size: 1.1rem; }

/* ── Grid ── */
.eco-grid {
  display: grid;
  grid-template-columns: minmax(300px,400px) minmax(0,1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.eco-earn-grid {
  grid-template-columns: minmax(300px,420px) minmax(0,1fr);
}

/* ── Form ── */
.eco-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.eco-field label {
  display: block;
  margin-bottom: .4rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
}

body.theme-dark .eco-field label { color: rgba(255,255,255,.52); }

.eco-field input,
.eco-field select {
  width: 100%;
  min-height: 46px;
  padding: .65rem .9rem;
  border: 1px solid rgba(128,128,128,.2);
  border-radius: 10px;
  background: rgba(128,128,128,.07);
  color: inherit;
  font: inherit;
  font-size: .88rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.eco-field select {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-color: rgba(128,128,128,.07);
}

.eco-field input:focus,
.eco-field select:focus {
  border-color: rgba(4,106,56,.5);
  box-shadow: 0 0 0 3px rgba(4,106,56,.12);
}

body.theme-dark .eco-field input,
body.theme-dark .eco-field select { background-color: rgba(255,255,255,.055); }

body.theme-dark .eco-field select option { color: #f7f7f7; background: #111; }
body.theme-light .eco-field select option { color: #111; background: #fff; }

/* ── Submit ── */
.eco-submit {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--gradient-brand);
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(4,106,56,.22);
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

.eco-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(4,106,56,.3); }
.eco-submit:disabled { opacity: .42; cursor: not-allowed; }

/* ── Blueprint / layers ── */
.eco-blueprint { margin-bottom: 0; }
.eco-blueprint h2,
.eco-rule-panel h2 { margin: .25rem 0 .5rem; font-size: 1rem; }

.eco-layers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .75rem;
  margin-top: 1.25rem;
}

.eco-layers div {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(128,128,128,.12);
  border-radius: 10px;
  background: rgba(128,128,128,.04);
}

.eco-layers span {
  display: block;
  margin-bottom: .4rem;
  color: var(--brand-orange);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.eco-layers strong {
  display: block;
  margin-bottom: .35rem;
  font-size: .92rem;
}

.eco-layers p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

body.theme-dark .eco-layers p { color: rgba(255,255,255,.45); }

/* ── Services section ── */
.eco-services-section { margin-top: 1rem; }

.eco-services-header { margin-bottom: 1rem; }
.eco-services-header h2 { margin: .25rem 0 0; }

.eco-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}

/* ── Earn steps ── */
.eco-earn-steps {
  display: grid;
  gap: .75rem;
  margin-top: 1.25rem;
}

.eco-earn-steps div {
  padding: .9rem 1rem;
  border: 1px solid rgba(128,128,128,.12);
  border-radius: 10px;
  background: rgba(128,128,128,.04);
}

.eco-earn-steps strong {
  display: block;
  margin-bottom: .3rem;
  font-size: .88rem;
}

.eco-earn-steps p {
  margin: 0;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

body.theme-dark .eco-earn-steps p { color: rgba(255,255,255,.45); }

/* ── Rule panel ── */
.eco-rule-panel { margin-bottom: 1rem; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .eco-hero { grid-template-columns: 1fr; }
  .eco-merchant-card,
  .eco-market-card { max-width: 420px; }
  .eco-grid,
  .eco-earn-grid { grid-template-columns: 1fr; }
  .eco-stats { grid-template-columns: 1fr 1fr; }
  .eco-layers { grid-template-columns: 1fr 1fr; }
  .eco-services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .eco-main { padding-top: 1.5rem; padding-bottom: 3rem; }
  .eco-stats { grid-template-columns: 1fr 1fr; }
  .eco-layers { grid-template-columns: 1fr; }
  .eco-market-metrics { grid-template-columns: 1fr; }
  .eco-market-metric--wide { grid-column: 1; }
  .eco-services-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .eco-layer-card,
  .eco-submit { transition: none; }
  .eco-layer-card:hover { transform: none; }
  .eco-submit:hover:not(:disabled) { transform: none; }
}
