.marketplace {
  --brand: #25d366;
  --copy: #c3c3c3;
  --secondary: #aaa;
  --rule: 1px solid var(--border);
  font-variant-numeric: lining-nums;
}
.marketplace > header { background: var(--background); }
.marketplace .skip {
  position: fixed; z-index: 60; top: .6rem; left: 1rem;
  padding: .6rem 1rem; background: var(--foreground); color: var(--background);
  transform: translateY(-180%);
}
.marketplace .skip:focus { transform: none; }
.marketplace .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.marketplace :focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.mp-shell { width: min(calc(100% - 3rem), 72rem); margin-inline: auto; }
.marketplace main { padding-top: clamp(2.7rem, 6vw, 6rem); }
.marketplace main :where(h1,h2,h3,p,dl,dd,figure,ol) { margin: 0; }
.marketplace h1, .marketplace h2, .marketplace h3 { text-wrap: balance; font-weight: 500; }
.marketplace h1 { font-size: clamp(2.75rem, 6vw, 5.3rem); line-height: 1.02; letter-spacing: -0.02em; }
.marketplace h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.034em; }
.marketplace h3 { font-size: 1.35rem; letter-spacing: -.024em; }
.marketplace main p, .marketplace dd { color: var(--copy); }
.marketplace p.lead { max-width: 43rem; margin-top: 1.35rem; font-size: clamp(1.1rem, 1.7vw, 1.36rem); line-height: 1.48; }
.marketplace .intro { margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.marketplace .text-link { display: inline-block; margin-top: 1.65rem; color: var(--brand); }
.marketplace .text-link span { padding-left: .45em; }
.marketplace main :where(section, [id]) { scroll-margin-top: 7rem; }
.marketplace .business-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(1.8rem, 5vw, 5rem); margin-bottom: clamp(3rem, 7vw, 6rem); }
figure.network { min-width: 0; background: var(--surface); border: var(--rule); border-radius: 12px; padding: clamp(.7rem, 2vw, 1.7rem); }
.marketplace .diagram-scroll { overflow-x: auto; }
.marketplace .network svg { display: block; width: 100%; min-width: 392px; height: auto; }
.marketplace .network figcaption { padding-top: .3rem; text-align: center; color: var(--secondary); font-size: .87rem; }
.marketplace .editorial { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.55fr); gap: clamp(1.5rem, 5vw, 5rem); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: var(--rule); }
.marketplace .editorial h2 + p { margin-top: .85rem; max-width: 25rem; }
.marketplace .ledger > div { display: grid; grid-template-columns: minmax(7rem,.6fr) minmax(0,1.5fr); gap: 1rem; padding-block: 1.35rem; border-bottom: var(--rule); }
.marketplace .ledger > div:first-child, .marketplace .steps li:first-child, .marketplace .questions details:first-child { padding-top: .15rem; }
.marketplace dt, .marketplace strong, .marketplace th { font-weight: 550; color: var(--foreground); }
.marketplace dd strong { display: block; margin-bottom: .3rem; }
.marketplace .steps { counter-reset: steps; padding: 0; list-style: decimal inside; }
.marketplace .steps li { position: relative; display: block; counter-increment: steps; padding: 1.4rem 0 1.6rem 3.2rem; border-bottom: var(--rule); }
.marketplace .steps li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; color: var(--secondary); font-variant-numeric: tabular-nums; }
.marketplace .steps p { margin-top: .4rem; }
.marketplace details { padding-block: 1.1rem; border-bottom: var(--rule); }
.marketplace summary { cursor: pointer; font-weight: 500; }
.marketplace details p { margin-top: .85rem; }
.mp-footer { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; margin-top: 3rem; padding-block: 2rem 3rem; border-top: var(--rule); }
.mp-footer > a { font-size: 1.15rem; letter-spacing: -.035em; }
.mp-footer nav { display: flex; flex-wrap: wrap; gap: .65rem 1.4rem; color: var(--secondary); font-size: .9rem; }
.mp-footer a[aria-current] { color: var(--foreground); }
.marketplace [hidden] { display: none !important; }
.marketplace .note, .marketplace .cell-detail, .marketplace .pager { color: var(--secondary); font-size: .9rem; }
.marketplace .directory { padding-top: 1.4rem; border-top: var(--rule); }
.marketplace .search-box label, .marketplace .filters label { display: grid; gap: .35rem; font-size: .9rem; color: var(--copy); }
.mp-control, button.quiet-button {
  min-height: 44px; padding: .55rem .85rem; border: 1px solid #4b4b4b;
  border-radius: 6px; background: var(--surface); color: var(--foreground); font: inherit;
}
.marketplace .directory input, .marketplace .directory select { width: 100%; min-width: 0; color-scheme: dark; }
.marketplace .directory input::placeholder { color: #a3a3a3; }
.marketplace .quiet-button { cursor: pointer; }
.marketplace .quiet-button:hover:enabled { border-color: var(--secondary); }
.marketplace button:disabled { opacity: .5; cursor: default; }
.marketplace .filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; align-items: end; gap: .8rem; margin-block: 1rem; }
.marketplace #count { margin-block: 1.8rem .8rem; font-variant-numeric: tabular-nums; }
.marketplace table { border-collapse: collapse; width: 100%; text-align: left; }
.marketplace th, .marketplace td { padding: .9rem .85rem; border-block-end: var(--rule); vertical-align: top; }
.marketplace thead { background: var(--surface); font-size: .9rem; }
.marketplace td { color: var(--copy); }
.marketplace .catalog { table-layout: fixed; overflow-wrap: anywhere; }
.marketplace .catalog th:first-child { width: 44%; }
.marketplace .catalog thead th:last-child { width: 23%; }
.marketplace .catalog tbody th { text-align: left; }
.marketplace .cell-detail { display: block; margin-top: .25rem; font-weight: 450; }
.marketplace .web-link { color: var(--brand); text-decoration: none; }
.marketplace main a:is(:hover,:focus-visible), .mp-footer a:is(:hover,:focus-visible) { color: var(--foreground); }
.marketplace .pager { display: flex; justify-content: flex-end; gap: 1rem; align-items: center; margin-top: 1.2rem; }
.marketplace .volume-summary { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; border-block: var(--rule); padding-block: 1.8rem; }
.marketplace .volume-summary h2 { font-size: 1.1rem; letter-spacing: -.012em; }
.marketplace .amount { color: var(--foreground); font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.045em; line-height: 1.3; margin-block: .35rem; overflow-wrap: anywhere; }
.marketplace .refresh-panel { max-width: 21rem; }
.marketplace #health { margin-top: .5rem; }
.marketplace .payouts { margin-block: 3rem; }
.marketplace .section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.marketplace .period { border: 0; display: flex; gap: .3rem; padding: 0; margin: 0; }
.marketplace .period label { display: flex; align-items: center; min-height: 44px; cursor: pointer; gap: .35rem; padding-inline: .5rem; font-size: .95rem; }
.marketplace .period input { accent-color: var(--brand); }
.marketplace #stats-time { margin: 1rem 0 .7rem; }
div.plot { padding: clamp(1rem, 2.5vw, 2rem); background: var(--surface); border: var(--rule); border-radius: 8px; }
.marketplace .plot p + p, .marketplace .method p + p { margin-top: .6rem; }
.marketplace .plot svg { width: 100%; height: 12rem; display: block; }
.marketplace .axis-labels { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.marketplace .plot .lookup { display: grid; gap: .5rem; margin-top: 1rem; }
.marketplace .lookup input { width: 100%; accent-color: var(--brand); cursor: pointer; }
.marketplace .plot output { font-variant-numeric: tabular-nums; }
.marketplace #history table { margin-top: 1rem; }
.marketplace .recent-payments { margin-block: 3rem; }
.marketplace .recent-payments h2 + p { max-width: 52rem; margin-top: .5rem; }
.marketplace #payments-time { margin-block: .8rem; }
.marketplace #payments-table { table-layout: fixed; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .marketplace .business-hero, .marketplace .editorial { grid-template-columns: 1fr; }
  .marketplace .business-hero { max-width: 39rem; }
  .marketplace .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketplace .quiet-button { justify-self: start; }
}
@media (max-width: 620px) {
  .mp-shell { width: calc(100% - 2.25rem); }
  .marketplace .ledger > div { grid-template-columns: 1fr; gap: .45rem; }
  .marketplace .catalog, .marketplace .catalog tbody { display: block; }
  .marketplace .catalog thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .marketplace .catalog tr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .85rem; border-top: var(--rule); padding-block: 1rem; }
  .marketplace .catalog :is(th,td) { border: 0; padding: 0; width: auto; }
  .marketplace .catalog tbody :is(th,td:last-child) { grid-column: 1 / -1; }
  .marketplace .catalog td::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--secondary); }
  .marketplace .catalog td:last-child::before { display: inline; margin-right: .5rem; }
  .marketplace .pager { justify-content: space-between; }
}
.marketplace .chart-area { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .6rem; }
.marketplace .y-ticks { display: flex; flex-direction: column; justify-content: space-between; color: var(--secondary); font-size: .85rem; font-variant-numeric: tabular-nums; }

.marketplace .chart-area .axis-labels { grid-column: 2; }
