/* Levels pages: the ladder, the member's standing and progress bar, the member card and the business verify page (logical properties only). */
.ladder-note {
  max-inline-size: 46rem;
  margin: var(--s-4) auto 0;
  color: var(--text-muted);
  text-align: center;
}

/* The path: thirty cards, one column on phones and as many as the section is wide beyond (container queries) */
.path {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: minmax(0, 1fr);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}

@container section (min-width: 40rem) {
  .path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container section (min-width: 62rem) {
  .path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.path-step {
  position: relative;
  display: grid;
  gap: var(--s-3);
  align-content: start;
  justify-items: start;
  padding: var(--s-5) var(--s-4) var(--s-4);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.path-step::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 5px;
  background: var(--level);
}

.path-step.is-locked::before {
  opacity: 0.4;
}

.path-step.is-current {
  border-color: var(--level);
  box-shadow:
    0 0 0 3px color-mix(in oklab, var(--level) 38%, transparent),
    var(--shadow-2);
}

.path-top {
  inline-size: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.path-num {
  color: var(--text-muted);
  font-size: var(--fs-0);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.path-need {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-0);
}

.path-state {
  --tone: var(--level);
  font-size: 0.8125rem;
}

.path-step.is-locked .path-state {
  --tone: var(--border-strong);
  color: var(--text-muted);
}

.path-step.is-current .path-state {
  background: var(--level);
  border-color: var(--level);
  color: var(--level-ink);
}

.standing,
.check {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  max-inline-size: 46rem;
  margin: var(--s-5) auto 0;
}

.standing p,
.check p,
.verdict p {
  margin: 0;
}

.standing .standing-name {
  color: var(--text);
  font-weight: 700;
}

.member-card {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  max-inline-size: 26rem;
  margin-inline: auto;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-block-start: 10px solid var(--level);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* A Better Volunteer with no fruit yet has no level colour: the card edge takes the border colour. */
.member-card.level-0 {
  --level: var(--border);
}

.member-card p {
  margin: 0;
}

.member-brand {
  color: var(--text-muted);
  font-size: var(--fs-0);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-name {
  font-size: var(--fs-3);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.member-level {
  font-weight: 700;
}

.member-status {
  display: flex;
}

.member-active-note {
  max-inline-size: 26rem;
  margin: var(--s-3) auto 0;
  color: var(--text-muted);
}

.member-number {
  display: grid;
  font-size: var(--fs-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.member-number span {
  color: var(--text-muted);
  font-size: var(--fs-0);
  letter-spacing: 0;
}

.check-qr {
  inline-size: min(100%, 16rem);
  padding: var(--s-3);
  background: var(--c-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.check-qr svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

.check-link {
  overflow-wrap: anywhere;
}

.check-code summary {
  cursor: pointer;
  font-weight: 700;
}

.check-code[open] > * + * {
  margin-block-start: var(--s-3);
}

.verify {
  max-inline-size: 32rem;
  padding-block-start: var(--s-6);
}

.verdict {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  margin-block-end: var(--s-5);
}

.verdict .verdict-state {
  color: var(--text);
  font-size: var(--fs-2);
  font-weight: 800;
}

.verdict-valid .verdict-state {
  color: var(--accent-text);
}

.verdict-bad {
  border-inline-start: 6px solid var(--c-coral);
}

.verdict-idle {
  border-inline-start: 6px solid var(--c-orange);
}

.verdict .verdict-level {
  color: var(--text);
  font-weight: 700;
}

.verdict-note {
  color: var(--text-muted);
}
