.subpage--token-market {
  background: #fff;
}

.subpage--token-market .subpage__intro {
  background: radial-gradient(ellipse at 88% 40%, #eaf6ee, transparent 71%), #fbfdfb;
}

.subpage--token-market .subpage__lead p {
  max-width: 44em;
}

.token-market__switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-block-end: clamp(18px, 2.7vw, 28px);
}

.token-market__tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #e0ebe3;
  border-radius: 12px;
  background: #f1f6f2;
}

.token-market__tab {
  min-height: 44px;
  padding: 8px clamp(10px, 2vw, 25px);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.token-market__tab:hover {
  color: var(--green-deep);
}

.token-market__tab[aria-selected="true"] {
  border-color: #cee0d2;
  background: #fff;
  box-shadow: 0 1px 3px #143a2110;
  color: var(--green-deep);
}

.token-market__tab:focus-visible {
  outline-offset: -3px;
}

.token-market__preview-status {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff3ef;
  color: #52645d;
  font-size: .78rem;
  font-weight: 630;
  white-space: nowrap;
}

.token-market__tabpanel[hidden] {
  display: none;
}

.token-market__offer {
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid #dce8e0;
  border-radius: 16px;
  background: linear-gradient(140deg, #f2f8f3, #fff 68%);
}

.token-market__offer-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.token-market__offer-intro h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 720;
  line-height: 1.22;
}

.token-market__offer-intro p {
  max-width: 43em;
  margin: 11px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.token-market__offer-intro img {
  width: clamp(105px, 12vw, 155px);
  height: auto;
  border-radius: 12px;
  mix-blend-mode: multiply;
}

.token-market__offer-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 20px 0 25px;
}

.token-market__offer-details > div {
  padding-block-start: 13px;
  border-block-start: 1px solid #dce8e0;
}

.token-market__offer-details dt { font-weight: 690; }

.token-market__offer-details dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.6;
}

.token-market__offer .button { min-height: 44px; }

.token-market__channels {
  overflow: hidden;
  border: 1px solid #dce8e0;
  border-radius: 17px;
  background: #fff;
}

.token-market__channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 25px;
  padding: clamp(16px, 2.6vw, 31px);
  border-bottom: 1px solid #e1ece4;
  background: #f1f8f3;
}

.token-market__channel-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.45vw, 2rem);
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.token-market__version {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.45;
}

.token-market__version code {
  margin-inline-start: .4em;
  overflow-wrap: anywhere;
  color: #31564a;
}

.token-market__preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4em .66em;
  margin: 0;
  color: #326352;
  font-size: .78rem;
  font-weight: 650;
}

.token-market__status {
  display: inline-block;
  padding: .3em .64em;
  border-radius: 999px;
  background: #eff2ef;
  color: #52645d;
  font-size: .78rem;
  font-weight: 630;
  white-space: nowrap;
}

.token-market__status--planned {
  background: #e6f3ea;
  color: #31634d;
}

.token-market__channel-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.token-market__channel-table :is(th, td) {
  padding: 13px clamp(13px, 2.6vw, 31px);
  border-bottom: 1px solid #e9eeea;
}

.token-market__channel-table thead th {
  background: #fafcfb;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 630;
}

.token-market__channel-table tbody th {
  color: var(--ink);
  font-weight: 670;
}

.token-market__channel-table tbody td {
  color: var(--muted);
}

.token-market__channel-note {
  margin: 0;
  padding: 13px clamp(13px, 2.6vw, 31px);
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.55;
}

.token-channel-browser {
  --channel-border: #dce8e0;
  display: grid;
  min-width: 0;
  gap: 12px;
  container: channel-browser / inline-size;
}

.token-channel-browser [hidden] { display: none !important; }

.token-channel-browser__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(106px, 1fr));
  align-items: end;
  gap: 9px 12px;
  padding: 10px 13px;
  border: 1px solid var(--channel-border);
  border-radius: 10px;
  background: #fff;
}

.token-channel-browser__toolbar label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #39534a;
  font-size: .8rem;
  font-weight: 500;
}

.token-channel-browser__toolbar :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #cfded3;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 400;
}

.token-channel-browser__toolbar input::placeholder { color: #667970; }
.token-channel-browser__toolbar :is(input, select):focus-visible { outline-offset: 1px; }

.token-channel-browser__layout {
  display: grid;
  grid-template-columns: clamp(224px, 22%, 236px) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.token-channel-browser__models {
  min-width: 0;
  border: 1px solid var(--channel-border);
  border-radius: 10px;
  background: #fff;
}

.token-channel-browser__list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 9px;
  padding: 10px 11px 8px;
}

.token-channel-browser__list-head h2 {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
}

.token-channel-browser__list-head p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.token-channel-browser__list {
  display: grid;
  max-block-size: 370px;
  gap: 3px;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior-block: contain;
  margin: 0;
  padding: 0 5px 5px;
  list-style: none;
}

.token-channel-browser__list > li { min-width: 0; }

.token-channel-browser__list button {
  display: grid;
  width: 100%;
  min-height: 44px;
  align-content: center;
  gap: 2px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  line-height: 1.4;
  text-align: start;
}

.token-channel-browser__list button:hover {
  background: #f4f8f4;
}

.token-channel-browser__list button[aria-pressed="true"] {
  border-color: #cde4d4;
  background: #e8f3ea;
  color: var(--green-deep);
}

.token-channel-browser__list button:focus-visible { outline-offset: -2px; }

.token-channel-browser__list strong {
  font-size: .85rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.token-channel-browser__list small {
  color: #54685e;
  font-size: .74rem;
  overflow-wrap: anywhere;
}

.token-channel-browser__detail { min-width: 0; }

.token-channel-browser__detail .token-market__channels { border-radius: 10px; }

.token-channel-browser__detail .token-market__channel-head {
  align-items: start;
  flex-direction: row;
  gap: 8px;
  padding: 13px 15px;
}

.token-channel-browser__detail .token-market__channel-head > div { min-width: 0; }

.token-channel-browser__detail .token-market__channel-head h2 {
  font-size: clamp(1.12rem, 1.4vw, 1.32rem);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.token-channel-browser__detail .token-market__preview { flex: none; font-weight: 500; }
.token-channel-browser__detail .token-market__version { margin-block-start: 6px; }

.token-channel-browser__profile {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.55;
}

.token-channel-browser__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 10px 15px;
  background: #fbfdfb;
  font-size: .82rem;
  line-height: 1.5;
}

.token-channel-browser__meta dt { color: #31564a; font-weight: 500; }
.token-channel-browser__meta dd { margin: 2px 0 0; color: var(--muted); overflow-wrap: anywhere; }

.token-channel-browser__detail .token-market__channel-table {
  table-layout: fixed;
  font-size: .83rem;
  line-height: 1.5;
}

.token-channel-browser__detail .token-market__channel-table :is(th, td) {
  padding: 7px 12px;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.token-channel-browser__detail .token-market__channel-table th { font-weight: 500; }
.token-channel-browser__detail .token-market__status { padding: .2em .55em; font-size: .74rem; font-weight: 500; }
.token-channel-browser__detail .token-market__channel-table thead th:nth-child(1) { width: 28%; }
.token-channel-browser__detail .token-market__channel-table thead th:nth-child(2) { width: 21%; }
.token-channel-browser__detail .token-market__channel-table thead th:nth-child(3) { width: 31%; }
.token-channel-browser__detail .token-market__channel-table thead th:nth-child(4) { width: 20%; }

/* Older preview servers can still render these retired sections. */
#token-channels :is(.token-channel-browser__notice, .token-market__usage) { display: none; }

.token-channel-browser__empty {
  display: grid;
  min-height: 126px;
  justify-items: center;
  align-content: center;
  gap: 11px;
  padding: 20px;
  border: 1px solid var(--channel-border);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.token-channel-browser__empty p { margin: 0; }

.token-channel-browser__empty button { min-height: 36px; }

@media (min-width: 910px) {
  #token-channels .token-channel-browser { grid-template-rows: auto minmax(0, 1fr); }

  @container channel-browser (width > 680px) {
    #token-channels .token-channel-browser__layout { grid-template-rows: minmax(0, 1fr); }

    #token-channels .token-channel-browser__models {
      display: flex;
      min-block-size: 0;
      flex-direction: column;
      align-self: stretch;
    }

    #token-channels .token-channel-browser__list-head { flex: none; }

    #token-channels .token-channel-browser__list {
      flex: 1;
      min-block-size: 0;
      max-block-size: none;
      align-content: start;
    }
  }
}

@container channel-browser (max-width: 680px) {
  .token-channel-browser__layout { grid-template-columns: minmax(0, 1fr); }

  .token-channel-browser__list {
    grid-auto-flow: column;
    grid-auto-columns: clamp(140px, 45%, 168px);
    max-block-size: none;
    overflow-x: auto;
    scrollbar-gutter: auto;
    overscroll-behavior-inline: contain;
  }

  .token-channel-browser__list button { height: 100%; }
}

@container channel-browser (max-width: 450px) {
  .token-channel-browser__toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .token-channel-browser__query { grid-column: 1 / -1; }

  .token-channel-browser__detail .token-market__channel-table { font-size: .77rem; }

  .token-channel-browser__detail .token-market__channel-table :is(th, td) {
    padding-inline: 5px;
  }

  .token-channel-browser__detail .token-market__channel-table thead th { font-size: .74rem; }
  .token-channel-browser__detail .token-market__status { padding-inline: .4em; font-size: .72rem; }
}

@container channel-browser (max-width: 335px) {
  .token-channel-browser__detail .token-market__channel-head {
    flex-direction: column;
    gap: 5px;
    padding-inline: 10px;
  }
}

@media (pointer: coarse), (max-width: 600px) {
  .token-channel-browser__toolbar :is(input, select),
  .token-channel-browser__empty button { min-height: 44px; }
}

@media (max-width: 600px) {
  .token-market__offer-details { grid-template-columns: minmax(0, 1fr); }
  .token-market__offer-intro img { display: none; }

  .token-market__channel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
