.profile-wall-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border-medium);
}

.profile-wall-hero__identity {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-width: 0;
}

.profile-wall-avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
}

.profile-wall-avatar img,
.profile-wall-avatar__fallback {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-md);
}

.profile-wall-avatar img {
  display: block;
  object-fit: cover;
}

.profile-wall-avatar__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-contrast, #0E2233);
  background: var(--gradient-primary);
  font-size: var(--font-size-3xl);
}

.profile-wall-heading {
  min-width: 0;
}

.profile-wall-kicker,
.profile-wall-handle,
.profile-wall-muted {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.profile-wall-kicker {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* The page header (the <header> the partial emits) owns the gap above and
   below the name: the h1's own margin used to set it and stacked with the
   header's. Named by element, because static/core owns .ds-page-header. */
.profile-wall-heading > header {
  margin-block: var(--space-xs);
}

.profile-wall-heading h1 {
  color: var(--text-primary);
  font-size: var(--font-size-3xl);
  line-height: 1.1;
}

.profile-wall-badges,
.profile-wall-share,
.profile-wall-share-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.profile-wall-share {
  justify-content: flex-end;
}

.profile-wall-access {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface-subtle, var(--surface-light));
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.profile-wall-access--public {
  color: var(--accent-green, #198754);
  border-color: color-mix(in srgb, var(--accent-green, #198754) 45%, transparent);
  background: color-mix(in srgb, var(--accent-green, #198754) 12%, transparent);
}

.profile-wall-access-note {
  margin: var(--space-md) 0 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.profile-wall-copy-status {
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.profile-wall-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
}

.profile-wall-stat {
  padding: var(--space-md);
  background: var(--surface-light);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
}

.profile-wall-stat__value {
  display: block;
  color: var(--text-primary);
  font-size: var(--font-size-2xl);
  font-weight: 800;
  line-height: 1;
}

.profile-wall-stat__label {
  display: block;
  margin-top: var(--space-xs);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.profile-wall-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-lg);
}

.profile-wall-section {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-wall-section--share {
  margin-top: var(--space-lg);
}

.profile-wall-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.profile-wall-section__header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
}

.profile-wall-description {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
  line-height: 1.6;
}

.profile-wall-fields {
  display: grid;
  gap: var(--space-sm);
  margin: 0;
}

.profile-wall-field {
  display: grid;
  gap: 2px;
}

.profile-wall-field dt {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.profile-wall-field dd {
  margin: 0;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.profile-wall-blocks {
  display: grid;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-wall-block {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--surface-light);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
}

.profile-wall-block__label {
  color: var(--text-primary);
  font-weight: 700;
}

.profile-wall-block__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.profile-wall-block__visibility {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  width: fit-content;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-wall-block__visibility--public {
  border-color: rgba(46, 125, 86, 0.3);
  background: rgba(46, 125, 86, 0.1);
  color: var(--success, #2e7d56);
}

.profile-wall-block__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--link-color);
  overflow-wrap: anywhere;
}

.profile-wall-block__body {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
}

.profile-wall-share-text {
  width: 100%;
  min-height: 96px;
  padding: var(--space-md);
  color: var(--text-primary);
  background: var(--surface-light);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  resize: vertical;
}

.profile-wall-share-actions {
  margin-top: var(--space-sm);
}

@media (max-width: 760px) {
  .profile-wall-hero,
  .profile-wall-hero__identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-wall-share {
    justify-content: flex-start;
    width: 100%;
  }

  .profile-wall-grid {
    grid-template-columns: 1fr;
  }

  .profile-wall-avatar {
    width: 88px;
    height: 88px;
  }
}
