.trestly-profile {
  max-width: 62rem;
  padding-block: clamp(2rem, 6vw, 4.5rem);
}

.trestly-profile h2,
.trestly-profile h3 { margin: 0; }
.trestly-profile p { margin: 0; }

.trestly-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-block: 1.5rem 2rem;
}

.trestly-header img {
  width: 4rem;
  height: 4rem;
  border-radius: 0.9rem;
  background: #101c20;
  padding: 0.75rem;
}

.trestly-header h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 4.25rem); }
.trestly-header p { color: #b6c8ca; }

.trestly-activity,
.trestly-contract,
.trestly-method {
  border: 1px solid #314448;
  border-radius: 1rem;
  background: #10191c;
  padding: clamp(1rem, 4vw, 1.5rem);
}

.trestly-activity-heading,
.trestly-ranges,
.trestly-event-meta,
.trestly-event-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.trestly-activity-heading { justify-content: space-between; }
.trestly-ranges { gap: 0.5rem; }
.trestly-ranges button {
  min-height: 2.75rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid #456063;
  border-radius: 0.55rem;
  background: #142226;
  color: #e7f3f1;
  font: inherit;
  cursor: pointer;
}

.trestly-ranges button[aria-pressed='true'] {
  border-color: #70c7ba;
  background: #203d3d;
}

.trestly-count {
  display: block;
  margin-block: 0.5rem 0.25rem;
  color: #a4e7db;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.trestly-activity > h3,
.trestly-selected,
.trestly-scope,
.trestly-method { margin-top: 1.5rem; }

.trestly-list,
.trestly-contracts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trestly-event {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid #2a3d40;
  padding-block: 0.9rem;
}

.trestly-event:last-child { padding-bottom: 0; }
.trestly-event-meta,
.trestly-profile [data-trestly-window],
.trestly-profile [data-trestly-status],
.trestly-contract p { color: #b6c8ca; }

.trestly-selected {
  padding: 1rem;
  border: 1px solid #649991;
  border-radius: 0.7rem;
  background: #17292c;
}

.trestly-selected h3 { margin-bottom: 0.5rem; }
.trestly-event-id,
.trestly-contract code { overflow-wrap: anywhere; }
.trestly-profile a:not(.button) { color: #a4e7db; text-underline-offset: 0.2em; text-decoration: underline; }

.trestly-contracts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.trestly-contract { display: grid; align-content: start; gap: 0.5rem; }
.trestly-contract code { color: #b6c8ca; }
.trestly-method summary { cursor: pointer; font-weight: 700; }
.trestly-method p { margin-top: 0.75rem; }

@media (width <= 460px) {
  .trestly-header { gap: 0.8rem; }
  .trestly-header img { width: 3.25rem; height: 3.25rem; }
}
