/* providers.html — the reference "Top X Profiles" grid. Built on the kit (.nt-dcard from nett.css);
   only the grid, the "Start providing" card (3 steps + tiers strip) and the sort motion live here. */

/* ---- Grid: 4 / 3 / 2 / 1 columns by the width the page actually has ------------- */
.dk-wrap { container-type: inline-size; }
.dk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dk-grid > .nt-dcard { min-height: 100%; }
@container (min-width: 520px) { .dk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 740px) { .dk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1000px) { .dk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Until providers.js deals the eight cards, the grid holds their rows (1/2/3/4 across), so
   "Start providing" below paints where it stays. */
.dk-grid:empty { min-height: 1964px; }
@container (min-width: 520px) { .dk-grid:empty { min-height: 1241px; } }
@container (min-width: 740px) { .dk-grid:empty { min-height: 927px; } }
@container (min-width: 1000px) { .dk-grid:empty { min-height: 613px; } }

/* Provider cards are the kit's <article> (not links), so they stay still on hover. */

/* ---- "Start providing": same surface as a provider card, steps + tiers strip ------ */
.dk-join {
  container-type: inline-size;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--nt-r-card);
  background: var(--nt-surface);
  scroll-margin-top: 96px;
}
.dk-join__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "text" "steps" "tiers" "cta";
  gap: 16px;
  padding: 20px;
}
.dk-join__text { grid-area: text; min-width: 0; }
.dk-join__title { font-size: var(--nt-fs-h2); line-height: 1.25; letter-spacing: -0.01em; font-weight: var(--nt-w-regular); color: var(--nt-text-strong); }
.dk-join__sub { margin-top: 6px; font-size: 15px; line-height: 1.4; color: var(--nt-muted); }
.dk-join__cta { grid-area: cta; justify-self: start; }

.dk-steps { grid-area: steps; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dk-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--nt-r-inner);
  background: var(--nt-surface-2);
}
.dk-step__mark { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; }
.dk-step__mark .nt-lg, .dk-step__mark .nt-coin { --s: 30px; --nt-coin-ring: var(--nt-surface-2); }
.dk-step__mark--icon { border-radius: 50%; background: var(--nt-surface-3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); color: var(--nt-text-strong); }
.dk-step__text { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; min-width: 0; }
.dk-step__n { font-family: var(--nt-font-mono); font-size: var(--nt-fs-label); letter-spacing: var(--nt-ls-label); color: var(--nt-muted); }
.dk-step__title { font-size: 15px; line-height: 1.3; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-step__sub { grid-column: 2; margin-top: 2px; font-size: var(--nt-fs-micro); line-height: 1.35; color: var(--nt-muted); text-wrap: balance; }

/* ---- Tiers strip: one hairline box, three segments, dots fill as limits grow ------ */
.dk-tiers { grid-area: tiers; min-width: 0; }
.dk-tiers__label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; font-size: var(--nt-fs-small); color: var(--nt-text-2); }
.dk-tiers__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--nt-r-inner);
  overflow: hidden;
}
.dk-tier {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-areas: "n max" "n when" "n hold";
  align-items: center;
  column-gap: 12px;
  min-width: 0;
  padding: 12px 14px;
}
.dk-tier + .dk-tier { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.dk-tier__n { grid-area: n; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; font-family: var(--nt-font-mono); font-size: var(--nt-fs-label); letter-spacing: var(--nt-ls-label); text-transform: uppercase; color: var(--nt-muted); }
.dk-tier__dots { display: inline-flex; gap: 4px; }
.dk-tier__dots > i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.dk-tier__dots > i.is-on { background: var(--nt-text-strong); }
.dk-tier__max { grid-area: max; font-size: 17px; line-height: 1.3; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dk-tier__when { grid-area: when; font-size: var(--nt-fs-small); line-height: 1.35; color: var(--nt-muted); }
.dk-tier__hold { grid-area: hold; margin-top: 2px; font-size: var(--nt-fs-micro); line-height: 1.35; color: var(--nt-text-2); font-variant-numeric: tabular-nums; }
.dk-tiers__note { margin-top: 10px; font-size: var(--nt-fs-micro); line-height: 1.45; color: var(--nt-muted); text-wrap: pretty; }

/* Wide card: the three steps (and the three tiers) sit side by side. */
@container (min-width: 520px) {
  .dk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dk-step { flex-direction: column; align-items: flex-start; gap: 16px; padding: 14px 14px 16px; }
  .dk-step__n { position: absolute; top: 14px; right: 14px; }
  .dk-step__text { display: flex; flex-direction: column; gap: 4px; }
  .dk-tiers__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dk-tier { grid-template-columns: minmax(0, 1fr); grid-template-areas: "n" "max" "when" "hold"; row-gap: 4px; padding: 14px 16px 16px; }
  .dk-tier__n { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 6px; }
  .dk-tier + .dk-tier { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.07); }
}
/* Full-width card: intro + pill on the left, steps and tiers on the right. */
@container (min-width: 860px) {
  .dk-join__in { grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "text steps" "cta tiers"; column-gap: 32px; row-gap: 20px; padding: 28px; }
  .dk-join__cta { align-self: end; }
}

/* Section head on phones: pills under the title, desk link on the right of the title row. */
@media (max-width: 767px) {
  .dk .nt-section__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .dk .nt-section__head .nt-section__end { grid-column: 2; grid-row: 1; }
  .dk .dk-sort { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .dk-join { border-radius: var(--nt-r-row); }
}
/* The desk link: short form on small phones, so "Top providers" stays on one line. */
.dk-short { display: none; }
@media (max-width: 399px) {
  .dk-long { display: none; }
  .dk-short { display: inline; }
}

/* One column (phones): a shorter banner and a smaller avatar, so eight cards stay a quick scroll. */
@container (max-width: 519px) {
  .dk-grid { gap: 12px; }
  .dk-grid .nt-dcard__banner { height: 64px; }
  .dk-grid .nt-dcard > .nt-avatar { top: 36px; --nt-av-size: 52px; }
  .dk-grid .nt-dcard__body { padding: 30px 16px 14px; }
  .dk-grid .nt-dcard__name { font-size: 17px; }
  .dk-grid .nt-dcard__stats { margin-top: 8px; }
}

/* ---- Real mode (providers.js) ------------------------------------------------------------ */
/* "Demo data" chip, top right of the head card (demo mode only; nett.data fills it). */
.dk-head { position: relative; }
.dk-demochip { position: absolute; top: 16px; right: 16px; z-index: 2; }
/* The provider's wallet on the explorer, a quiet link at the end of the card's last line. */
.dk-card__link { color: var(--nt-text-2); text-decoration: none; }
.dk-card__link:hover { color: var(--nt-text-strong); }
/* Real mode: few providers so far, so the loading grid holds one row, not the demo's two. */
@container (min-width: 1000px) { html:not(.nt-demo) .dk-grid:empty { min-height: 315px; } }
@container (min-width: 740px) and (max-width: 999px) { html:not(.nt-demo) .dk-grid:empty { min-height: 315px; } }
/* No provider yet: the "Be the first provider" card alone, as tall as a provider card. */
.dk-grid > .nt-dcard--add:only-child { min-height: 315px; }
/* The upgrade notice or a load error, in place of the grid, as tall as a row of cards. */
.dk-grid.dk-grid--note { display: block; min-height: 0; }
.dk-grid--note > .nt-empty { min-height: 315px; }
.dk-note .nt-notice { padding: 0; border: 0; background: none; }
